eoss-ui 0.5.63 → 0.5.65

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 (82) hide show
  1. package/lib/button-group.js +43 -23
  2. package/lib/button.js +65 -39
  3. package/lib/calendar.js +13 -5
  4. package/lib/checkbox-group.js +4 -2
  5. package/lib/data-table-form.js +4 -2
  6. package/lib/data-table.js +112 -25
  7. package/lib/date-picker.js +4 -2
  8. package/lib/dialog.js +4 -2
  9. package/lib/eoss-ui.common.js +635 -393
  10. package/lib/flow-group.js +4 -2
  11. package/lib/flow-list.js +4 -2
  12. package/lib/flow.js +153 -123
  13. package/lib/form.js +9 -4
  14. package/lib/handle-user.js +4 -2
  15. package/lib/handler.js +4 -2
  16. package/lib/icon.js +4 -2
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +4 -2
  19. package/lib/input.js +4 -2
  20. package/lib/login.js +23 -6
  21. package/lib/main.js +189 -128
  22. package/lib/nav.js +4 -2
  23. package/lib/page.js +4 -2
  24. package/lib/player.js +4 -2
  25. package/lib/qr-code.js +13 -13
  26. package/lib/radio-group.js +4 -2
  27. package/lib/retrial-auth.js +4 -2
  28. package/lib/select-ganged.js +4 -2
  29. package/lib/select.js +4 -2
  30. package/lib/selector-panel.js +4 -2
  31. package/lib/selector.js +4 -2
  32. package/lib/sizer.js +4 -2
  33. package/lib/steps.js +4 -2
  34. package/lib/switch.js +4 -2
  35. package/lib/table-form.js +4 -2
  36. package/lib/tabs.js +4 -2
  37. package/lib/theme-chalk/base.css +1 -1
  38. package/lib/theme-chalk/button-group.css +1 -1
  39. package/lib/theme-chalk/button.css +1 -1
  40. package/lib/theme-chalk/calendar.css +1 -1
  41. package/lib/theme-chalk/index.css +1 -1
  42. package/lib/theme-chalk/main.css +1 -1
  43. package/lib/theme-chalk/menu.css +1 -1
  44. package/lib/theme-chalk/qr-code.css +1 -1
  45. package/lib/theme-chalk/sizer.css +1 -1
  46. package/lib/theme-chalk/upload.css +1 -1
  47. package/lib/tips.js +4 -2
  48. package/lib/tree-group.js +4 -2
  49. package/lib/tree.js +4 -2
  50. package/lib/upload.js +12 -8
  51. package/lib/utils/util.js +4 -2
  52. package/lib/wujie.js +4 -2
  53. package/lib/wxlogin.js +4 -2
  54. package/package.json +2 -2
  55. package/packages/button/src/main.vue +92 -56
  56. package/packages/button-group/src/main.vue +10 -1
  57. package/packages/calendar/src/main.vue +11 -4
  58. package/packages/data-table/src/children.vue +3 -1
  59. package/packages/data-table/src/main.vue +55 -10
  60. package/packages/flow/src/processForm.vue +32 -4
  61. package/packages/form/src/main.vue +3 -0
  62. package/packages/login/src/main.vue +12 -1
  63. package/packages/main/src/main.vue +147 -101
  64. package/packages/qr-code/src/main.vue +10 -5
  65. package/packages/theme-chalk/lib/base.css +1 -1
  66. package/packages/theme-chalk/lib/button-group.css +1 -1
  67. package/packages/theme-chalk/lib/button.css +1 -1
  68. package/packages/theme-chalk/lib/calendar.css +1 -1
  69. package/packages/theme-chalk/lib/index.css +1 -1
  70. package/packages/theme-chalk/lib/main.css +1 -1
  71. package/packages/theme-chalk/lib/menu.css +1 -1
  72. package/packages/theme-chalk/lib/qr-code.css +1 -1
  73. package/packages/theme-chalk/lib/sizer.css +1 -1
  74. package/packages/theme-chalk/lib/upload.css +1 -1
  75. package/packages/theme-chalk/src/base.scss +3 -0
  76. package/packages/theme-chalk/src/button-group.scss +110 -0
  77. package/packages/theme-chalk/src/button.scss +6 -0
  78. package/packages/theme-chalk/src/calendar.scss +3 -0
  79. package/packages/theme-chalk/src/qr-code.scss +1 -1
  80. package/packages/upload/src/main.vue +3 -1
  81. package/src/index.js +1 -1
  82. package/src/utils/util.js +4 -1
@@ -2201,7 +2201,7 @@ var isLogined = function isLogined(_ref8) {
2201
2201
  });
2202
2202
  }
2203
2203
  }).catch(function (e) {});
2204
- } else if (token || to.path === '/' || to.path === '/404' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2204
+ } else if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2205
2205
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2206
2206
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2207
2207
  } else {
@@ -2891,7 +2891,9 @@ var toFunction = function toFunction(str) {
2891
2891
  * @param {string} [$color] - 颜色值
2892
2892
  **/
2893
2893
  var updateTheme = function updateTheme(color, send) {
2894
- color = color && startWith(color, '#') ? color : '#409eff';
2894
+ if (!color) {
2895
+ return false;
2896
+ }
2895
2897
 
2896
2898
  if (send === undefined) {
2897
2899
  send = true;
@@ -3614,7 +3616,7 @@ function normalizeComponent(
3614
3616
  // ESM COMPAT FLAG
3615
3617
  __webpack_require__.r(__webpack_exports__);
3616
3618
 
3617
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button-group/src/main.vue?vue&type=template&id=a336a590&
3619
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button-group/src/main.vue?vue&type=template&id=1080b7f0&
3618
3620
  var render = function () {
3619
3621
  var _vm = this
3620
3622
  var _h = _vm.$createElement
@@ -3646,27 +3648,33 @@ var render = function () {
3646
3648
  )
3647
3649
  : _c(
3648
3650
  "es-button",
3649
- _vm._b(
3650
- {
3651
- key: index,
3652
- attrs: {
3653
- stop: _vm.stop,
3654
- size: _vm.size,
3655
- type: item.type,
3656
- },
3657
- on: {
3658
- click: function ($event) {
3659
- _vm.handleClick(
3660
- Object.assign({}, _vm.data, {
3661
- handle: item,
3662
- })
3663
- )
3651
+ _vm._g(
3652
+ _vm._b(
3653
+ {
3654
+ key: index,
3655
+ attrs: {
3656
+ stop: _vm.stop,
3657
+ size: _vm.size,
3658
+ type: item.type,
3659
+ },
3660
+ on: {
3661
+ click: function ($event) {
3662
+ _vm.handleClick(
3663
+ Object.assign({}, _vm.data, {
3664
+ handle: item,
3665
+ })
3666
+ )
3667
+ },
3664
3668
  },
3665
3669
  },
3666
- },
3667
- "es-button",
3668
- item,
3669
- false
3670
+ "es-button",
3671
+ _vm.exclAttribute({
3672
+ data: item,
3673
+ attrs: ["events"],
3674
+ }),
3675
+ false
3676
+ ),
3677
+ item.events
3670
3678
  ),
3671
3679
  [
3672
3680
  _vm._v(
@@ -3756,7 +3764,7 @@ var staticRenderFns = []
3756
3764
  render._withStripped = true
3757
3765
 
3758
3766
 
3759
- // CONCATENATED MODULE: ./packages/button-group/src/main.vue?vue&type=template&id=a336a590&
3767
+ // CONCATENATED MODULE: ./packages/button-group/src/main.vue?vue&type=template&id=1080b7f0&
3760
3768
 
3761
3769
  // EXTERNAL MODULE: ./src/utils/util.js
3762
3770
  var util = __webpack_require__(0);
@@ -3831,6 +3839,12 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3831
3839
  //
3832
3840
  //
3833
3841
  //
3842
+ //
3843
+ //
3844
+ //
3845
+ //
3846
+ //
3847
+ //
3834
3848
 
3835
3849
 
3836
3850
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -3889,6 +3903,12 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3889
3903
  },
3890
3904
 
3891
3905
  methods: {
3906
+ exclAttribute: function exclAttribute(_ref) {
3907
+ var data = _ref.data,
3908
+ attrs = _ref.attrs;
3909
+
3910
+ return util["a" /* default */].exclAttribute({ data: data, attrs: attrs });
3911
+ },
3892
3912
  getBtns: function getBtns() {
3893
3913
  var _this = this;
3894
3914
 
package/lib/button.js CHANGED
@@ -2201,7 +2201,7 @@ var isLogined = function isLogined(_ref8) {
2201
2201
  });
2202
2202
  }
2203
2203
  }).catch(function (e) {});
2204
- } else if (token || to.path === '/' || to.path === '/404' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2204
+ } else if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2205
2205
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2206
2206
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2207
2207
  } else {
@@ -2891,7 +2891,9 @@ var toFunction = function toFunction(str) {
2891
2891
  * @param {string} [$color] - 颜色值
2892
2892
  **/
2893
2893
  var updateTheme = function updateTheme(color, send) {
2894
- color = color && startWith(color, '#') ? color : '#409eff';
2894
+ if (!color) {
2895
+ return false;
2896
+ }
2895
2897
 
2896
2898
  if (send === undefined) {
2897
2899
  send = true;
@@ -3824,7 +3826,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3824
3826
  text: String,
3825
3827
  onClick: Function,
3826
3828
  badge: [Object, Number],
3827
- float: String
3829
+ float: String,
3830
+ selector: Boolean,
3831
+ upload: Boolean
3828
3832
  },
3829
3833
  computed: {
3830
3834
  _type: function _type() {
@@ -4010,52 +4014,74 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4010
4014
  }
4011
4015
  var tag = 'el-button';
4012
4016
  var clas = ['es-button'];
4013
- var props = { type: this._type, size: this.size };
4017
+ var props = {};
4014
4018
  var attrs = {};
4015
- if (this.link && !this.open) {
4016
- var link = this.param ? util["a" /* default */].urlJoinParams({ url: this.link, param: this.param }) : this.link;
4017
- attrs = { href: link };
4018
- tag = 'a';
4019
- clas = clas.concat(['el-button', this._type ? 'el-button--' + this._type : 'el-button--default', this.size ? 'el-button--' + this.size : '', this.float ? 'es-button--' + this.float : '']);
4020
- }
4021
- if (this.badge) {
4022
- var config = {};
4023
- if (typeof this.badge === 'number') {
4024
- config = { class: 'es-button-badge', props: { value: this.badge } };
4025
- } else {
4026
- var _badge = this.badge,
4027
- value = _badge.value,
4028
- max = _badge.max,
4029
- isDot = _badge.isDot,
4030
- hidden = _badge.hidden,
4031
- type = _badge.type;
4032
-
4033
- config = {
4034
- class: this.badge.class ? this.badge.class + ' es-button-badge' : 'es-button-badge',
4035
- props: { value: value, max: max, isDot: isDot, hidden: hidden, type: type }
4036
- };
4019
+ var listeners = {};
4020
+ var config = {};
4021
+ if (this.selector) {
4022
+ tag = 'es-selector';
4023
+ props = _extends({}, this.$attrs, { button: { type: this._type, size: this.size } });
4024
+ listeners = this.$listeners;
4025
+ } else if (this.upload) {
4026
+ tag = 'es-upload';
4027
+ props = _extends({}, this.$attrs, { showFileList: false });
4028
+ listeners = this.$listeners;
4029
+ config = {
4030
+ type: this._type,
4031
+ size: this.size
4032
+ };
4033
+ } else {
4034
+ props = _extends({}, this.$attrs, { type: this._type, size: this.size });
4035
+ listeners = _extends({}, this.$listeners, { click: this.handleClick });
4036
+ if (this.link && !this.open) {
4037
+ var link = this.param ? util["a" /* default */].urlJoinParams({ url: this.link, param: this.param }) : this.link;
4038
+ attrs = { href: link };
4039
+ tag = 'a';
4040
+ clas = clas.concat(['el-button', this._type ? 'el-button--' + this._type : 'el-button--default', this.size ? 'el-button--' + this.size : '', this.float ? 'es-button--' + this.float : '']);
4041
+ }
4042
+ if (this.badge) {
4043
+ var _config = {};
4044
+ if (typeof this.badge === 'number') {
4045
+ _config = { class: 'es-button-badge', props: { value: this.badge } };
4046
+ } else {
4047
+ var _badge = this.badge,
4048
+ value = _badge.value,
4049
+ max = _badge.max,
4050
+ isDot = _badge.isDot,
4051
+ hidden = _badge.hidden,
4052
+ type = _badge.type;
4053
+
4054
+ _config = {
4055
+ class: this.badge.class ? this.badge.class + ' es-button-badge' : 'es-button-badge',
4056
+ props: { value: value, max: max, isDot: isDot, hidden: hidden, type: type }
4057
+ };
4058
+ }
4059
+ return h('el-badge', _config, [h(tag, {
4060
+ class: clas,
4061
+ props: _extends({}, this.$attrs, props),
4062
+ attrs: attrs,
4063
+ on: _extends({}, this.$listeners, { click: this.handleClick }),
4064
+ directives: [{
4065
+ name: 'show',
4066
+ value: !this.hide
4067
+ }]
4068
+ }, this.iconPlacement === 'start' ? [this.icon ? h('i', { class: this.icon }) : '', this.$slots.default || this.text] : [this.$slots.default || this.text, this.icon ? h('i', { class: this.icon }) : ''])]);
4037
4069
  }
4038
- return h('el-badge', config, [h(tag, {
4039
- class: clas,
4040
- props: _extends({}, this.$attrs, props),
4041
- attrs: attrs,
4042
- on: _extends({}, this.$listeners, { click: this.handleClick }),
4043
- directives: [{
4044
- name: 'show',
4045
- value: !this.hide
4046
- }]
4047
- }, this.iconPlacement === 'start' ? [this.icon ? h('i', { class: this.icon }) : '', this.$slots.default || this.text] : [this.$slots.default || this.text, this.icon ? h('i', { class: this.icon }) : ''])]);
4048
4070
  }
4049
4071
  return h(tag, {
4050
4072
  class: clas,
4051
- props: _extends({}, this.$attrs, props),
4073
+ props: props,
4052
4074
  attrs: attrs,
4053
- on: _extends({}, this.$listeners, { click: this.handleClick }),
4075
+ on: listeners,
4054
4076
  directives: [{
4055
4077
  name: 'show',
4056
4078
  value: !this.hide
4057
4079
  }]
4058
- }, this.iconPlacement === 'start' ? [this.icon ? h('i', { class: this.icon }) : '', this.$slots.default || this.text] : [this.$slots.default || this.text, this.icon ? h('i', { class: this.icon }) : '']);
4080
+ }, this.iconPlacement === 'start' ? [this.icon ? h('i', { class: this.icon }) : '', this.upload ? h('el-button', {
4081
+ props: config
4082
+ }, [this.$slots.default || this.text]) : this.$slots.default || this.text] : [this.upload ? h('el-button', {
4083
+ props: config
4084
+ }, [this.$slots.default || this.text]) : this.$slots.default || this.text, this.icon ? h('i', { class: this.icon }) : '']);
4059
4085
  }
4060
4086
  });
4061
4087
  // CONCATENATED MODULE: ./packages/button/src/main.vue?vue&type=script&lang=js&
package/lib/calendar.js CHANGED
@@ -199,7 +199,7 @@ function normalizeComponent(
199
199
  // ESM COMPAT FLAG
200
200
  __webpack_require__.r(__webpack_exports__);
201
201
 
202
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=template&id=31c0856e&
202
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=template&id=aa9b4086&
203
203
  var render = function () {
204
204
  var _vm = this
205
205
  var _h = _vm.$createElement
@@ -292,6 +292,7 @@ var render = function () {
292
292
  "es-disabled-day": item.type == 0,
293
293
  "es-today": _vm.isSelect(item, _vm.today) && _vm.mark,
294
294
  "es-select": _vm.isSelect(item, _vm.select),
295
+ "es-disabled": item.disabled,
295
296
  },
296
297
  },
297
298
  [
@@ -352,7 +353,7 @@ var staticRenderFns = []
352
353
  render._withStripped = true
353
354
 
354
355
 
355
- // CONCATENATED MODULE: ./packages/calendar/src/main.vue?vue&type=template&id=31c0856e&
356
+ // CONCATENATED MODULE: ./packages/calendar/src/main.vue?vue&type=template&id=aa9b4086&
356
357
 
357
358
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=script&lang=js&
358
359
  //
@@ -415,6 +416,7 @@ render._withStripped = true
415
416
  //
416
417
  //
417
418
  //
419
+ //
418
420
 
419
421
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
420
422
  name: 'EsCalendar',
@@ -435,7 +437,8 @@ render._withStripped = true
435
437
  type: Boolean,
436
438
  default: true
437
439
  },
438
- mark: Boolean
440
+ mark: Boolean,
441
+ disabled: Boolean
439
442
  },
440
443
  watch: {
441
444
  date: {
@@ -545,6 +548,9 @@ render._withStripped = true
545
548
  return target == year + '/' + month + '/' + date;
546
549
  },
547
550
  handleClick: function handleClick(res) {
551
+ if (res.disabled) {
552
+ return false;
553
+ }
548
554
  var year = res.year,
549
555
  month = res.month,
550
556
  date = res.date;
@@ -673,7 +679,8 @@ render._withStripped = true
673
679
  date: _i3,
674
680
  type: 0,
675
681
  year: month == 0 ? year - 1 : year,
676
- month: month == 0 ? 12 : month
682
+ month: month == 0 ? 12 : month,
683
+ disabled: this.disabled
677
684
  });
678
685
  }
679
686
  }
@@ -694,7 +701,8 @@ render._withStripped = true
694
701
  date: i,
695
702
  type: 0,
696
703
  year: month == 11 ? year + 1 : year,
697
- month: month == 11 ? 1 : month + 2
704
+ month: month == 11 ? 1 : month + 2,
705
+ disabled: this.disabled
698
706
  });
699
707
  }
700
708
  }
@@ -2200,7 +2200,7 @@ var isLogined = function isLogined(_ref8) {
2200
2200
  });
2201
2201
  }
2202
2202
  }).catch(function (e) {});
2203
- } else if (token || to.path === '/' || to.path === '/404' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2203
+ } else if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2204
2204
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2205
2205
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2206
2206
  } else {
@@ -2890,7 +2890,9 @@ var toFunction = function toFunction(str) {
2890
2890
  * @param {string} [$color] - 颜色值
2891
2891
  **/
2892
2892
  var updateTheme = function updateTheme(color, send) {
2893
- color = color && startWith(color, '#') ? color : '#409eff';
2893
+ if (!color) {
2894
+ return false;
2895
+ }
2894
2896
 
2895
2897
  if (send === undefined) {
2896
2898
  send = true;
@@ -2200,7 +2200,7 @@ var isLogined = function isLogined(_ref8) {
2200
2200
  });
2201
2201
  }
2202
2202
  }).catch(function (e) {});
2203
- } else if (token || to.path === '/' || to.path === '/404' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2203
+ } else if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2204
2204
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2205
2205
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2206
2206
  } else {
@@ -2890,7 +2890,9 @@ var toFunction = function toFunction(str) {
2890
2890
  * @param {string} [$color] - 颜色值
2891
2891
  **/
2892
2892
  var updateTheme = function updateTheme(color, send) {
2893
- color = color && startWith(color, '#') ? color : '#409eff';
2893
+ if (!color) {
2894
+ return false;
2895
+ }
2894
2896
 
2895
2897
  if (send === undefined) {
2896
2898
  send = true;