eoss-ui 0.4.85 → 0.4.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/lib/button-group.js +4 -0
  2. package/lib/button.js +4 -0
  3. package/lib/checkbox-group.js +4 -0
  4. package/lib/data-table-form.js +4 -0
  5. package/lib/data-table.js +73 -33
  6. package/lib/date-picker.js +4 -0
  7. package/lib/dialog.js +4 -0
  8. package/lib/eoss-ui.common.js +1744 -1582
  9. package/lib/flow-group.js +4 -0
  10. package/lib/flow-list.js +4 -0
  11. package/lib/flow.js +7 -3
  12. package/lib/form.js +10 -22
  13. package/lib/handle-user.js +4 -0
  14. package/lib/handler.js +4 -0
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +4 -0
  17. package/lib/input.js +4 -0
  18. package/lib/login.js +4 -0
  19. package/lib/main.js +4 -0
  20. package/lib/nav.js +9 -6
  21. package/lib/page.js +4 -0
  22. package/lib/player.js +4 -0
  23. package/lib/qr-code.js +4 -0
  24. package/lib/radio-group.js +4 -0
  25. package/lib/retrial-auth.js +4 -0
  26. package/lib/select-ganged.js +4 -0
  27. package/lib/select.js +4 -0
  28. package/lib/selector-panel.js +4 -0
  29. package/lib/selector.js +4 -0
  30. package/lib/sizer.js +4 -0
  31. package/lib/steps.js +4 -0
  32. package/lib/switch.js +4 -0
  33. package/lib/table-form.js +10 -6
  34. package/lib/tabs.js +1569 -1435
  35. package/lib/tips.js +4 -0
  36. package/lib/tree-group.js +4 -0
  37. package/lib/tree.js +4 -0
  38. package/lib/upload.js +76 -28
  39. package/lib/utils/util.js +4 -0
  40. package/lib/wujie.js +4 -0
  41. package/lib/wxlogin.js +4 -0
  42. package/package.json +2 -2
  43. package/packages/data-table/src/main.vue +74 -40
  44. package/packages/flow/src/main.vue +1 -1
  45. package/packages/form/src/main.vue +4 -18
  46. package/packages/form/src/table.vue +1 -1
  47. package/packages/nav/src/main.vue +3 -4
  48. package/packages/tabs/src/main.vue +479 -474
  49. package/packages/upload/src/main.vue +44 -30
  50. package/src/index.js +1 -1
  51. package/src/utils/util.js +4 -0
@@ -190,6 +190,7 @@ import {
190
190
  } from 'eoss-ui/src/config/api.js';
191
191
  import util from 'eoss-ui/src/utils/util.js';
192
192
  import picture from './picture.js';
193
+ import store from 'eoss-ui/src/utils/store';
193
194
  export default {
194
195
  name: 'EsUpload',
195
196
  components: {
@@ -479,7 +480,7 @@ export default {
479
480
  url() {
480
481
  let url = this.action
481
482
  ? this.action
482
- : this.portrait || !this.multiple
483
+ : this.portrait
483
484
  ? uploadOnlyOne
484
485
  : uploads;
485
486
  return url.indexOf(this.host) > -1 ? url : this.host + url;
@@ -694,37 +695,50 @@ export default {
694
695
  //根据code获取附件参数配置
695
696
  getAdjunctPropertie() {
696
697
  if (this.code !== undefined) {
697
- util
698
- .ajax({
699
- method: this.method,
700
- url: this.properties,
701
- data: { code: this.code, ...this.param },
702
- params: { code: this.code, ...this.param }
703
- })
704
- .then((res) => {
705
- if (res.rCode === 0) {
706
- if (res.results) {
707
- this.excludeNames = res.results.excludeName;
708
- if (res.results.fileTypeExtName) {
709
- let fileTypeExtName = res.results.fileTypeExtName.split(';');
710
- this.fileAccept = fileTypeExtName
711
- .filter((item) => {
712
- return item;
713
- })
714
- .join(',');
698
+ let config = store.get(this.code);
699
+ if (config) {
700
+ this.fileAccept = config.accept;
701
+ this.fileSize = config.size;
702
+ this.fileTotalSize = config.totalSize;
703
+ } else {
704
+ util
705
+ .ajax({
706
+ method: this.method,
707
+ url: this.properties,
708
+ data: { code: this.code, ...this.param },
709
+ params: { code: this.code, ...this.param }
710
+ })
711
+ .then((res) => {
712
+ if (res.rCode === 0) {
713
+ if (res.results) {
714
+ this.excludeNames = res.results.excludeName;
715
+ if (res.results.fileTypeExtName) {
716
+ let fileTypeExtName =
717
+ res.results.fileTypeExtName.split(';');
718
+ this.fileAccept = fileTypeExtName
719
+ .filter((item) => {
720
+ return item;
721
+ })
722
+ .join(',');
723
+ }
724
+ this.fileSize = res.results.limitFileSize
725
+ ? res.results.limitFileSize
726
+ : 0;
727
+ this.fileTotalSize = res.results.limitTotalSize;
728
+ store.set(this.code, {
729
+ accept: this.fileAccept,
730
+ size: this.fileSize,
731
+ totalSize: this.fileTotalSize
732
+ });
715
733
  }
716
- this.fileSize = res.results.limitFileSize
717
- ? res.results.limitFileSize
718
- : 0;
719
- this.fileTotalSize = res.results.limitTotalSize;
720
734
  }
721
- }
722
- })
723
- .catch((err) => {
724
- if (err.message && err.message !== 'canceled') {
725
- this.$message.error(err.message);
726
- }
727
- });
735
+ })
736
+ .catch((err) => {
737
+ if (err.message && err.message !== 'canceled') {
738
+ this.$message.error(err.message);
739
+ }
740
+ });
741
+ }
728
742
  }
729
743
  },
730
744
  getFiles(params) {
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.4.85',
120
+ version: '0.4.87',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,
package/src/utils/util.js CHANGED
@@ -396,6 +396,10 @@ const ajax = function ({
396
396
  if (!header['content-type']) {
397
397
  header['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
398
398
  }
399
+ } else {
400
+ if (!header['content-type']) {
401
+ header['content-type'] = 'application/json;charset=UTF-8';
402
+ }
399
403
  }
400
404
  return http({
401
405
  method,