eoss-ui 0.5.64 → 0.5.66

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 (52) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/lib/button-group.js +209 -44
  3. package/lib/button.js +65 -37
  4. package/lib/calendar.js +18 -6
  5. package/lib/data-table.js +116 -31
  6. package/lib/eoss-ui.common.js +1143 -719
  7. package/lib/form.js +22 -7
  8. package/lib/index.js +1 -1
  9. package/lib/login.js +11 -2
  10. package/lib/main.js +183 -121
  11. package/lib/selector.js +469 -429
  12. package/lib/theme-chalk/base.css +1 -1
  13. package/lib/theme-chalk/button-group.css +1 -1
  14. package/lib/theme-chalk/button.css +1 -1
  15. package/lib/theme-chalk/calendar.css +1 -1
  16. package/lib/theme-chalk/index.css +1 -1
  17. package/lib/theme-chalk/main.css +1 -1
  18. package/lib/theme-chalk/menu.css +1 -1
  19. package/lib/theme-chalk/sizer.css +1 -1
  20. package/lib/theme-chalk/tree.css +1 -1
  21. package/lib/theme-chalk/upload.css +1 -1
  22. package/lib/toolbar.js +6 -0
  23. package/lib/upload.js +9 -7
  24. package/package.json +2 -2
  25. package/packages/button/src/main.vue +96 -56
  26. package/packages/button-group/src/main.vue +72 -8
  27. package/packages/calendar/src/main.vue +16 -5
  28. package/packages/data-table/src/children.vue +3 -1
  29. package/packages/data-table/src/column.vue +1 -1
  30. package/packages/data-table/src/main.vue +55 -10
  31. package/packages/form/src/main.vue +19 -5
  32. package/packages/login/src/main.vue +8 -0
  33. package/packages/main/src/main.vue +141 -96
  34. package/packages/selector/src/main.vue +31 -5
  35. package/packages/theme-chalk/lib/base.css +1 -1
  36. package/packages/theme-chalk/lib/button-group.css +1 -1
  37. package/packages/theme-chalk/lib/button.css +1 -1
  38. package/packages/theme-chalk/lib/calendar.css +1 -1
  39. package/packages/theme-chalk/lib/index.css +1 -1
  40. package/packages/theme-chalk/lib/main.css +1 -1
  41. package/packages/theme-chalk/lib/menu.css +1 -1
  42. package/packages/theme-chalk/lib/sizer.css +1 -1
  43. package/packages/theme-chalk/lib/tree.css +1 -1
  44. package/packages/theme-chalk/lib/upload.css +1 -1
  45. package/packages/theme-chalk/src/base.scss +3 -0
  46. package/packages/theme-chalk/src/button-group.scss +149 -0
  47. package/packages/theme-chalk/src/button.scss +6 -0
  48. package/packages/theme-chalk/src/calendar.scss +3 -0
  49. package/packages/theme-chalk/src/tree.scss +1 -0
  50. package/packages/toolbar/src/main.vue +6 -0
  51. package/packages/upload/src/main.vue +4 -2
  52. package/src/index.js +1 -1
@@ -3616,7 +3616,7 @@ function normalizeComponent(
3616
3616
  // ESM COMPAT FLAG
3617
3617
  __webpack_require__.r(__webpack_exports__);
3618
3618
 
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=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=1a095074&
3620
3620
  var render = function () {
3621
3621
  var _vm = this
3622
3622
  var _h = _vm.$createElement
@@ -3634,41 +3634,58 @@ var render = function () {
3634
3634
  item.upload || (item.code && item.ownId)
3635
3635
  ? _c(
3636
3636
  "es-upload",
3637
- _vm._b(
3638
- { staticClass: "el-button" },
3639
- "es-upload",
3640
- Object.assign({}, item, {
3641
- method: "post",
3642
- btnSize: _vm.size,
3643
- showFileList: false,
3644
- selectType: item.type ? item.type : "",
3645
- }),
3646
- false
3637
+ _vm._g(
3638
+ _vm._b(
3639
+ { staticClass: "el-button" },
3640
+ "es-upload",
3641
+ Object.assign(
3642
+ {},
3643
+ _vm.exclAttribute({
3644
+ data: item,
3645
+ attrs: ["events"],
3646
+ }),
3647
+ _vm.parseProps(),
3648
+ {
3649
+ method: "post",
3650
+ btnSize: _vm.size,
3651
+ showFileList: false,
3652
+ selectType: item.type ? item.type : "",
3653
+ }
3654
+ ),
3655
+ false
3656
+ ),
3657
+ item.events
3647
3658
  )
3648
3659
  )
3649
3660
  : _c(
3650
3661
  "es-button",
3651
- _vm._b(
3652
- {
3653
- key: index,
3654
- attrs: {
3655
- stop: _vm.stop,
3656
- size: _vm.size,
3657
- type: item.type,
3658
- },
3659
- on: {
3660
- click: function ($event) {
3661
- _vm.handleClick(
3662
- Object.assign({}, _vm.data, {
3663
- handle: item,
3664
- })
3665
- )
3662
+ _vm._g(
3663
+ _vm._b(
3664
+ {
3665
+ key: index,
3666
+ attrs: {
3667
+ stop: _vm.stop,
3668
+ size: _vm.size,
3669
+ type: item.type,
3670
+ },
3671
+ on: {
3672
+ click: function ($event) {
3673
+ _vm.handleClick(
3674
+ Object.assign({}, _vm.data, {
3675
+ handle: item,
3676
+ })
3677
+ )
3678
+ },
3666
3679
  },
3667
3680
  },
3668
- },
3669
- "es-button",
3670
- item,
3671
- false
3681
+ "es-button",
3682
+ _vm.exclAttribute({
3683
+ data: item,
3684
+ attrs: ["events"],
3685
+ }),
3686
+ false
3687
+ ),
3688
+ item.events
3672
3689
  ),
3673
3690
  [
3674
3691
  _vm._v(
@@ -3696,6 +3713,7 @@ var render = function () {
3696
3713
  ? _c(
3697
3714
  "el-dropdown",
3698
3715
  {
3716
+ ref: "dropdown",
3699
3717
  attrs: { trigger: _vm.trigger },
3700
3718
  on: {
3701
3719
  command: _vm.handleCommand,
@@ -3729,19 +3747,99 @@ var render = function () {
3729
3747
  _vm._l(_vm.other, function (item, index) {
3730
3748
  return _c(
3731
3749
  "el-dropdown-item",
3732
- { key: index, attrs: { command: item } },
3750
+ {
3751
+ key: index,
3752
+ class: {
3753
+ "es-dropdown-padding": item.upload || item.selector,
3754
+ },
3755
+ attrs: { command: item },
3756
+ },
3733
3757
  [
3734
- item.icon ? _c("i", { class: item.icon }) : _vm._e(),
3735
- _vm._v(
3736
- _vm._s(
3737
- item.template
3738
- ? item.template(
3739
- Object.assign({}, _vm.data, { config: item })
3740
- )
3741
- : item.text
3742
- )
3743
- ),
3744
- ]
3758
+ item.upload || (item.code && item.ownId)
3759
+ ? _c(
3760
+ "es-upload",
3761
+ _vm._g(
3762
+ _vm._b(
3763
+ { staticClass: "es-dropdown-upload" },
3764
+ "es-upload",
3765
+ Object.assign(
3766
+ {},
3767
+ _vm.exclAttribute({
3768
+ data: item,
3769
+ attrs: ["events"],
3770
+ }),
3771
+ _vm.parseProps(),
3772
+ {
3773
+ method: "post",
3774
+ showFileList: false,
3775
+ selectType: "text",
3776
+ }
3777
+ ),
3778
+ false
3779
+ ),
3780
+ item.events
3781
+ )
3782
+ )
3783
+ : item.selector
3784
+ ? _c(
3785
+ "es-selector",
3786
+ _vm._g(
3787
+ _vm._b(
3788
+ {
3789
+ staticClass: "es-dropdown-selector",
3790
+ attrs: {
3791
+ button: { size: "medium", type: "text" },
3792
+ },
3793
+ },
3794
+ "es-selector",
3795
+ Object.assign(
3796
+ {},
3797
+ { reset: true },
3798
+ _vm.exclAttribute({
3799
+ data: item,
3800
+ attrs: ["events", "type", "value"],
3801
+ }),
3802
+ { businessData: _vm.data }
3803
+ ),
3804
+ false
3805
+ ),
3806
+ item.events
3807
+ ),
3808
+ [
3809
+ item.icon
3810
+ ? _c("i", { class: item.icon })
3811
+ : _vm._e(),
3812
+ _vm._v(
3813
+ _vm._s(
3814
+ item.template
3815
+ ? item.template(
3816
+ Object.assign({}, _vm.data, {
3817
+ config: item,
3818
+ })
3819
+ )
3820
+ : item.text
3821
+ ) + "\n "
3822
+ ),
3823
+ ]
3824
+ )
3825
+ : [
3826
+ item.icon
3827
+ ? _c("i", { class: item.icon })
3828
+ : _vm._e(),
3829
+ _vm._v(
3830
+ _vm._s(
3831
+ item.template
3832
+ ? item.template(
3833
+ Object.assign({}, _vm.data, {
3834
+ config: item,
3835
+ })
3836
+ )
3837
+ : item.text
3838
+ ) + "\n "
3839
+ ),
3840
+ ],
3841
+ ],
3842
+ 2
3745
3843
  )
3746
3844
  }),
3747
3845
  1
@@ -3758,7 +3856,7 @@ var staticRenderFns = []
3758
3856
  render._withStripped = true
3759
3857
 
3760
3858
 
3761
- // CONCATENATED MODULE: ./packages/button-group/src/main.vue?vue&type=template&id=a336a590&
3859
+ // CONCATENATED MODULE: ./packages/button-group/src/main.vue?vue&type=template&id=1a095074&
3762
3860
 
3763
3861
  // EXTERNAL MODULE: ./src/utils/util.js
3764
3862
  var util = __webpack_require__(0);
@@ -3833,6 +3931,59 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3833
3931
  //
3834
3932
  //
3835
3933
  //
3934
+ //
3935
+ //
3936
+ //
3937
+ //
3938
+ //
3939
+ //
3940
+ //
3941
+ //
3942
+ //
3943
+ //
3944
+ //
3945
+ //
3946
+ //
3947
+ //
3948
+ //
3949
+ //
3950
+ //
3951
+ //
3952
+ //
3953
+ //
3954
+ //
3955
+ //
3956
+ //
3957
+ //
3958
+ //
3959
+ //
3960
+ //
3961
+ //
3962
+ //
3963
+ //
3964
+ //
3965
+ //
3966
+ //
3967
+ //
3968
+ //
3969
+ //
3970
+ //
3971
+ //
3972
+ //
3973
+ //
3974
+ //
3975
+ //
3976
+ //
3977
+ //
3978
+ //
3979
+ //
3980
+ //
3981
+ //
3982
+ //
3983
+ //
3984
+ //
3985
+ //
3986
+ //
3836
3987
 
3837
3988
 
3838
3989
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -3866,7 +4017,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3866
4017
  placement: {
3867
4018
  type: String,
3868
4019
  default: 'bottom'
3869
- }
4020
+ },
4021
+ parseData: Function
3870
4022
  },
3871
4023
  computed: {
3872
4024
  btns: function btns() {
@@ -3891,6 +4043,12 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3891
4043
  },
3892
4044
 
3893
4045
  methods: {
4046
+ exclAttribute: function exclAttribute(_ref) {
4047
+ var data = _ref.data,
4048
+ attrs = _ref.attrs;
4049
+
4050
+ return util["a" /* default */].exclAttribute({ data: data, attrs: attrs });
4051
+ },
3894
4052
  getBtns: function getBtns() {
3895
4053
  var _this = this;
3896
4054
 
@@ -3924,6 +4082,10 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3924
4082
  this.$emit('handle-click', obj);
3925
4083
  },
3926
4084
  handleCommand: function handleCommand(res) {
4085
+ if (res.upload || res.selector) {
4086
+ this.$refs.dropdown.hide();
4087
+ return false;
4088
+ }
3927
4089
  this.$emit('handleClick', _extends({}, this.data, { handle: res }));
3928
4090
  this.$emit('handle-click', _extends({}, this.data, { handle: res }));
3929
4091
  },
@@ -3943,6 +4105,9 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3943
4105
  _this2.$emit('input', w + 'px');
3944
4106
  }
3945
4107
  });
4108
+ },
4109
+ parseProps: function parseProps() {
4110
+ return this.parseData && this.data ? this.parseData(this.data) : {};
3946
4111
  }
3947
4112
  }
3948
4113
  });
package/lib/button.js CHANGED
@@ -3826,7 +3826,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3826
3826
  text: String,
3827
3827
  onClick: Function,
3828
3828
  badge: [Object, Number],
3829
- float: String
3829
+ float: String,
3830
+ selector: Boolean,
3831
+ upload: Boolean
3830
3832
  },
3831
3833
  computed: {
3832
3834
  _type: function _type() {
@@ -4012,52 +4014,78 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4012
4014
  }
4013
4015
  var tag = 'el-button';
4014
4016
  var clas = ['es-button'];
4015
- var props = { type: this._type, size: this.size };
4017
+ var props = {};
4016
4018
  var attrs = {};
4017
- if (this.link && !this.open) {
4018
- var link = this.param ? util["a" /* default */].urlJoinParams({ url: this.link, param: this.param }) : this.link;
4019
- attrs = { href: link };
4020
- tag = 'a';
4021
- 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 : '']);
4022
- }
4023
- if (this.badge) {
4024
- var config = {};
4025
- if (typeof this.badge === 'number') {
4026
- config = { class: 'es-button-badge', props: { value: this.badge } };
4027
- } else {
4028
- var _badge = this.badge,
4029
- value = _badge.value,
4030
- max = _badge.max,
4031
- isDot = _badge.isDot,
4032
- hidden = _badge.hidden,
4033
- type = _badge.type;
4034
-
4035
- config = {
4036
- class: this.badge.class ? this.badge.class + ' es-button-badge' : 'es-button-badge',
4037
- props: { value: value, max: max, isDot: isDot, hidden: hidden, type: type }
4038
- };
4019
+ var listeners = {};
4020
+ var config = {};
4021
+ if (this.selector) {
4022
+ tag = 'es-selector';
4023
+ props = _extends({
4024
+ reset: true
4025
+ }, this.$attrs, {
4026
+ button: { type: this._type, size: this.size }
4027
+ });
4028
+ listeners = this.$listeners;
4029
+ } else if (this.upload) {
4030
+ tag = 'es-upload';
4031
+ props = _extends({}, this.$attrs, { showFileList: false });
4032
+ listeners = this.$listeners;
4033
+ config = {
4034
+ type: this._type,
4035
+ size: this.size
4036
+ };
4037
+ } else {
4038
+ props = _extends({}, this.$attrs, { type: this._type, size: this.size });
4039
+ listeners = _extends({}, this.$listeners, { click: this.handleClick });
4040
+ if (this.link && !this.open) {
4041
+ var link = this.param ? util["a" /* default */].urlJoinParams({ url: this.link, param: this.param }) : this.link;
4042
+ attrs = { href: link };
4043
+ tag = 'a';
4044
+ 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 : '']);
4045
+ }
4046
+ if (this.badge) {
4047
+ var _config = {};
4048
+ if (typeof this.badge === 'number') {
4049
+ _config = { class: 'es-button-badge', props: { value: this.badge } };
4050
+ } else {
4051
+ var _badge = this.badge,
4052
+ value = _badge.value,
4053
+ max = _badge.max,
4054
+ isDot = _badge.isDot,
4055
+ hidden = _badge.hidden,
4056
+ type = _badge.type;
4057
+
4058
+ _config = {
4059
+ class: this.badge.class ? this.badge.class + ' es-button-badge' : 'es-button-badge',
4060
+ props: { value: value, max: max, isDot: isDot, hidden: hidden, type: type }
4061
+ };
4062
+ }
4063
+ return h('el-badge', _config, [h(tag, {
4064
+ class: clas,
4065
+ props: _extends({}, this.$attrs, props),
4066
+ attrs: attrs,
4067
+ on: _extends({}, this.$listeners, { click: this.handleClick }),
4068
+ directives: [{
4069
+ name: 'show',
4070
+ value: !this.hide
4071
+ }]
4072
+ }, 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 }) : ''])]);
4039
4073
  }
4040
- return h('el-badge', config, [h(tag, {
4041
- class: clas,
4042
- props: _extends({}, this.$attrs, props),
4043
- attrs: attrs,
4044
- on: _extends({}, this.$listeners, { click: this.handleClick }),
4045
- directives: [{
4046
- name: 'show',
4047
- value: !this.hide
4048
- }]
4049
- }, 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 }) : ''])]);
4050
4074
  }
4051
4075
  return h(tag, {
4052
4076
  class: clas,
4053
- props: _extends({}, this.$attrs, props),
4077
+ props: props,
4054
4078
  attrs: attrs,
4055
- on: _extends({}, this.$listeners, { click: this.handleClick }),
4079
+ on: listeners,
4056
4080
  directives: [{
4057
4081
  name: 'show',
4058
4082
  value: !this.hide
4059
4083
  }]
4060
- }, 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 }) : '']);
4084
+ }, this.iconPlacement === 'start' ? [this.icon ? h('i', { class: this.icon }) : '', this.upload ? h('el-button', {
4085
+ props: config
4086
+ }, [this.$slots.default || this.text]) : this.$slots.default || this.text] : [this.upload ? h('el-button', {
4087
+ props: config
4088
+ }, [this.$slots.default || this.text]) : this.$slots.default || this.text, this.icon ? h('i', { class: this.icon }) : '']);
4061
4089
  }
4062
4090
  });
4063
4091
  // 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=37892338&
203
203
  var render = function () {
204
204
  var _vm = this
205
205
  var _h = _vm.$createElement
@@ -270,7 +270,7 @@ var render = function () {
270
270
  ),
271
271
  _c(
272
272
  "ul",
273
- { staticClass: "es-calendar-days" },
273
+ { staticClass: "es-calendar-days", style: { height: _vm._height } },
274
274
  _vm._l(_vm.lists, function (item, index) {
275
275
  return _c(
276
276
  "li",
@@ -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=37892338&
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,9 @@ render._withStripped = true
435
437
  type: Boolean,
436
438
  default: true
437
439
  },
438
- mark: Boolean
440
+ mark: Boolean,
441
+ disabled: Boolean,
442
+ height: String
439
443
  },
440
444
  watch: {
441
445
  date: {
@@ -470,6 +474,9 @@ render._withStripped = true
470
474
  }
471
475
  }
472
476
  });
477
+ },
478
+ _height: function _height() {
479
+ return this.height && this.all ? parseInt(this.height) + 'px' : '';
473
480
  }
474
481
  },
475
482
  data: function data() {
@@ -545,6 +552,9 @@ render._withStripped = true
545
552
  return target == year + '/' + month + '/' + date;
546
553
  },
547
554
  handleClick: function handleClick(res) {
555
+ if (res.disabled) {
556
+ return false;
557
+ }
548
558
  var year = res.year,
549
559
  month = res.month,
550
560
  date = res.date;
@@ -673,7 +683,8 @@ render._withStripped = true
673
683
  date: _i3,
674
684
  type: 0,
675
685
  year: month == 0 ? year - 1 : year,
676
- month: month == 0 ? 12 : month
686
+ month: month == 0 ? 12 : month,
687
+ disabled: this.disabled
677
688
  });
678
689
  }
679
690
  }
@@ -694,7 +705,8 @@ render._withStripped = true
694
705
  date: i,
695
706
  type: 0,
696
707
  year: month == 11 ? year + 1 : year,
697
- month: month == 11 ? 1 : month + 2
708
+ month: month == 11 ? 1 : month + 2,
709
+ disabled: this.disabled
698
710
  });
699
711
  }
700
712
  }