eoss-ui 0.5.67 → 0.5.69

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 (70) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/lib/button-group.js +172 -25
  3. package/lib/button.js +5 -1
  4. package/lib/calendar.js +8 -4
  5. package/lib/data-table.js +31 -22
  6. package/lib/eoss-ui.common.js +1070 -741
  7. package/lib/form.js +22 -7
  8. package/lib/icon.js +12 -3593
  9. package/lib/icons.js +1 -1
  10. package/lib/index.js +1 -1
  11. package/lib/login.js +123 -110
  12. package/lib/main.js +41 -9
  13. package/lib/menu.js +90 -55
  14. package/lib/nav.js +32 -5
  15. package/lib/player.js +2 -2
  16. package/lib/selector.js +469 -429
  17. package/lib/theme-chalk/base.css +1 -1
  18. package/lib/theme-chalk/button-group.css +1 -1
  19. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  20. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  21. package/lib/theme-chalk/icon.css +1 -1
  22. package/lib/theme-chalk/index.css +1 -1
  23. package/lib/theme-chalk/login.css +1 -1
  24. package/lib/theme-chalk/main.css +1 -1
  25. package/lib/theme-chalk/menu.css +1 -1
  26. package/lib/theme-chalk/sizer.css +1 -1
  27. package/lib/theme-chalk/tree.css +1 -1
  28. package/lib/theme-chalk/upload.css +1 -1
  29. package/lib/toolbar.js +6 -0
  30. package/lib/upload.js +6 -6
  31. package/package.json +2 -2
  32. package/packages/button/src/main.vue +5 -1
  33. package/packages/button-group/src/main.vue +62 -7
  34. package/packages/calendar/src/main.vue +6 -2
  35. package/packages/data-table/src/column.vue +1 -1
  36. package/packages/data-table/src/main.vue +10 -5
  37. package/packages/form/src/main.vue +19 -5
  38. package/packages/icon/src/main.vue +10 -3
  39. package/packages/icons/src/icon.json +1 -1
  40. package/packages/login/src/main.vue +67 -66
  41. package/packages/main/src/main.vue +28 -6
  42. package/packages/menu/src/main.vue +75 -65
  43. package/packages/nav/src/main.vue +23 -4
  44. package/packages/selector/src/main.vue +31 -5
  45. package/packages/theme-chalk/lib/base.css +1 -1
  46. package/packages/theme-chalk/lib/button-group.css +1 -1
  47. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  48. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  49. package/packages/theme-chalk/lib/icon.css +1 -1
  50. package/packages/theme-chalk/lib/index.css +1 -1
  51. package/packages/theme-chalk/lib/login.css +1 -1
  52. package/packages/theme-chalk/lib/main.css +1 -1
  53. package/packages/theme-chalk/lib/menu.css +1 -1
  54. package/packages/theme-chalk/lib/sizer.css +1 -1
  55. package/packages/theme-chalk/lib/tree.css +1 -1
  56. package/packages/theme-chalk/lib/upload.css +1 -1
  57. package/packages/theme-chalk/package.json +35 -0
  58. package/packages/theme-chalk/src/button-group.scss +39 -0
  59. package/packages/theme-chalk/src/common/var.scss +2 -0
  60. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  61. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  62. package/packages/theme-chalk/src/icon.scss +430 -426
  63. package/packages/theme-chalk/src/login.scss +2 -3
  64. package/packages/theme-chalk/src/main.scss +14 -5
  65. package/packages/theme-chalk/src/menu.scss +1 -1
  66. package/packages/theme-chalk/src/nav.scss +2 -2
  67. package/packages/theme-chalk/src/tree.scss +1 -0
  68. package/packages/toolbar/src/main.vue +6 -0
  69. package/packages/upload/src/main.vue +1 -1
  70. package/src/index.js +1 -1
package/lib/menu.js CHANGED
@@ -87,6 +87,13 @@ module.exports =
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
+ /***/ 18:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("throttle-debounce");
94
+
95
+ /***/ }),
96
+
90
97
  /***/ 3:
91
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
99
 
@@ -199,9 +206,13 @@ function normalizeComponent(
199
206
  // ESM COMPAT FLAG
200
207
  __webpack_require__.r(__webpack_exports__);
201
208
 
209
+ // EXTERNAL MODULE: external "throttle-debounce"
210
+ var external_throttle_debounce_ = __webpack_require__(18);
211
+
202
212
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/main.vue?vue&type=script&lang=js&
203
213
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
204
214
 
215
+
205
216
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
206
217
  name: 'EsMenu',
207
218
  inheritAttrs: false,
@@ -241,6 +252,15 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
241
252
  paddingLeft: {
242
253
  type: Number,
243
254
  default: 14
255
+ },
256
+ menuIcon: {
257
+ type: String,
258
+ default: 'es-icon-application'
259
+ },
260
+ icons: Object,
261
+ subIcon: {
262
+ type: Boolean,
263
+ default: true
244
264
  }
245
265
  },
246
266
  computed: {
@@ -248,37 +268,18 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
248
268
  return this.height === undefined ? this.maxH : this.height;
249
269
  },
250
270
  maxWidth: function maxWidth() {
251
- if (this.mode === 'vertical') {
252
- return this.width;
253
- }
254
271
  return this.maxW;
255
272
  }
256
273
  },
257
274
  watch: {
258
275
  data: {
259
- immediate: true,
260
276
  deep: true,
261
277
  handler: function handler() {
262
- var _this = this;
263
-
264
- if (this.mode === 'vertical') {
265
- this.$nextTick(function () {
266
- _this.maxH = _this.$refs.esMenu.$el.getBoundingClientRect().height + 'px';
267
- });
268
- } else {
269
- this.$nextTick(function () {
270
- var w = 0;
271
- Array.from(_this.$refs.menu.$el.children).forEach(function (item) {
272
- w += item.getBoundingClientRect().width;
273
- });
274
- var styles = window.getComputedStyle(_this.$refs.menu.$el);
275
- w += parseFloat(styles.paddingLeft) + parseFloat(styles.paddingRight);
276
- if (w > _this.$refs.esMenu.$el.getBoundingClientRect().width) {
277
- _this.maxW = w + 'px';
278
- }
279
- });
280
- }
278
+ this.getMaxWidth();
281
279
  }
280
+ },
281
+ width: function width() {
282
+ this.getMaxWidth();
282
283
  }
283
284
  },
284
285
  data: function data() {
@@ -290,19 +291,51 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
290
291
  isChange: false
291
292
  };
292
293
  },
293
- mounted: function mounted() {},
294
+ created: function created() {
295
+ var _this = this;
296
+
297
+ this.getMaxWidth = Object(external_throttle_debounce_["debounce"])(300, function () {
298
+ _this.getWidth();
299
+ });
300
+ },
301
+ mounted: function mounted() {
302
+ this.getMaxWidth();
303
+ },
294
304
 
295
305
  methods: {
296
- handleReady: function handleReady() {
306
+ getWidth: function getWidth() {
297
307
  var _this2 = this;
298
308
 
309
+ if (this.mode === 'vertical') {
310
+ this.$nextTick(function () {
311
+ _this2.maxH = _this2.$refs.esMenu.$el.getBoundingClientRect().height + 'px';
312
+ var styles = window.getComputedStyle(_this2.$refs.menu.$el.parentNode);
313
+ _this2.maxW = _this2.width ? parseInt(_this2.width, 10) - parseInt(styles.marginLeft, 10) - parseInt(styles.marginRight, 10) + 'px' : '';
314
+ });
315
+ } else {
316
+ this.$nextTick(function () {
317
+ var w = 0;
318
+ Array.from(_this2.$refs.menu.$el.children).forEach(function (item) {
319
+ w += item.getBoundingClientRect().width;
320
+ });
321
+ var styles = window.getComputedStyle(_this2.$refs.menu.$el);
322
+ w += parseFloat(styles.paddingLeft) + parseFloat(styles.paddingRight);
323
+ if (w > _this2.$refs.esMenu.$el.getBoundingClientRect().width) {
324
+ _this2.maxW = w + 'px';
325
+ }
326
+ });
327
+ }
328
+ },
329
+ handleReady: function handleReady() {
330
+ var _this3 = this;
331
+
299
332
  if (this.mode === 'horizontal') {
300
333
  this.$refs.esMenu.wrap.onmouseover = function (e) {
301
- _this2.$refs.esMenu.wrap.addEventListener('mousewheel', _this2.handleWheel, { passive: false }) || _this2.$refs.esMenu.wrap.addEventListener('DOMMouseScroll', _this2.handleWheel, false);
334
+ _this3.$refs.esMenu.wrap.addEventListener('mousewheel', _this3.handleWheel, { passive: false }) || _this3.$refs.esMenu.wrap.addEventListener('DOMMouseScroll', _this3.handleWheel, false);
302
335
  e.preventDefault();
303
336
  };
304
337
  this.$refs.esMenu.wrap.onmouseout = function (e) {
305
- _this2.$refs.esMenu.wrap.removeEventListener('mousewheel', _this2.handleWheel, { passive: false }) || _this2.$refs.esMenu.wrap.removeEventListener('DOMMouseScroll', _this2.handleWheel, false);
338
+ _this3.$refs.esMenu.wrap.removeEventListener('mousewheel', _this3.handleWheel, { passive: false }) || _this3.$refs.esMenu.wrap.removeEventListener('DOMMouseScroll', _this3.handleWheel, false);
306
339
  e.preventDefault();
307
340
  };
308
341
  }
@@ -360,7 +393,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
360
393
  }
361
394
  },
362
395
  handleSelect: function handleSelect(key, keyPath, item) {
363
- var _this3 = this;
396
+ var _this4 = this;
364
397
 
365
398
  this.isChange = true;
366
399
  if (this.menuId !== null && keyPath.indexOf(this.menuId) == -1) {
@@ -369,7 +402,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
369
402
  var openedMenus = item.rootMenu.openedMenus;
370
403
  openedMenus.forEach(function (item) {
371
404
  if (keyPath.indexOf(item) == -1) {
372
- _this3.$refs.menu.close(item);
405
+ _this4.$refs.menu.close(item);
373
406
  }
374
407
  });
375
408
  }
@@ -402,18 +435,24 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
402
435
  mode: this.mode
403
436
  });
404
437
  },
405
- getSub: function getSub(item, h, popper, fourthTabs) {
406
- var _this4 = this;
438
+ getSub: function getSub(item, h, popper, fourthTabs, subIcon) {
439
+ var _this5 = this;
407
440
 
408
441
  if (popper) {
409
442
  popper += this.popperClass !== undefined ? ' ' + this.popperClass : ' es-menu-popper-' + this.mode;
410
443
  } else {
411
444
  popper = this.popperClass !== undefined ? this.popperClass : ' es-menu-popper-' + this.mode;
412
445
  }
413
- var title = [h('i', {
414
- class: [item.icons ? this.unicode(item.icons) ? item.icons : 'es-icon iconfont' : 'es-icon-application', 'es-menu-item-icon'],
415
- domProps: item.icons === '' || this.unicode(item.icons) ? {} : { innerHTML: item.icons }
416
- }), h('div', {
446
+ var title = [];
447
+ if (subIcon) {
448
+ title.push(h('es-icon', {
449
+ props: {
450
+ contents: item.icons || this.menuIcon
451
+ },
452
+ class: ['es-menu-item-icon']
453
+ }));
454
+ }
455
+ title.push(h('div', {
417
456
  class: ['es-menu-title-text es-menu-title-' + this.mode]
418
457
  }, [h('el-badge', {
419
458
  class: ['es-badge', {
@@ -431,14 +470,14 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
431
470
  max: 99,
432
471
  hidden: !item.tips
433
472
  }
434
- }, [item.text])])];
473
+ }, [item.text])]));
435
474
  var doms = [h('template', { slot: 'title' }, this.titleIcons ? title : [title[1]])];
436
475
  if (this.deep && item.children && item.children.length && (!item.extendData || item.extendData.businessStatus != 0)) {
437
476
  doms = doms.concat(item.children.map(function (ele, index) {
438
477
  if (!ele) {
439
478
  console.error('\u5BF9\u8C61\u5B50\u6570\u636E\u4E2D\u7B2C[' + index + ']\u6761\u6570\u636E\u9519\u8BEF', item);
440
479
  } else {
441
- return _this4.getSub(ele, h, popper);
480
+ return _this5.getSub(ele, h, popper, false, _this5.subIcon);
442
481
  }
443
482
  }));
444
483
  return [h('el-submenu', {
@@ -456,7 +495,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
456
495
  if (!ele) {
457
496
  console.error('\u5BF9\u8C61\u5B50\u6570\u636E\u4E2D\u7B2C[' + index + ']\u6761\u6570\u636E\u9519\u8BEF', item);
458
497
  } else {
459
- return _this4.getSub(ele, h, popper, true);
498
+ return _this5.getSub(ele, h, popper, true, _this5.subIcon);
460
499
  }
461
500
  }));
462
501
  return [h('el-submenu', {
@@ -484,28 +523,23 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
484
523
  }
485
524
  }, this.titleIcons ? title : [title[1]])];
486
525
  }
487
- },
488
- unicode: function unicode(res) {
489
- if (!res) {
490
- return false;
491
- }
492
- var reg = new RegExp(/^es-\S+/, 'g');
493
- return res.match(reg) ? res.match(reg).length : 0;
494
526
  }
495
527
  },
496
528
  render: function render(h) {
497
- var _this5 = this;
529
+ var _this6 = this;
498
530
 
499
531
  var doms = [];
500
532
  this.data.forEach(function (item) {
501
533
  if (item.children && item.children.length && (!item.extendData || item.extendData.businessStatus != 0)) {
502
- doms = doms.concat(_this5.getSub(item, h, 'es-sub-menu'));
534
+ doms = doms.concat(_this6.getSub(item, h, 'es-sub-menu', false, true));
503
535
  } else {
504
- var title = [h('i', {
505
- class: [item.icons ? _this5.unicode(item.icons) ? item.icons : 'es-icon iconfont' : 'es-icon-application', 'es-menu-item-icon'],
506
- domProps: item.icons === '' || _this5.unicode(item.icons) ? {} : { innerHTML: item.icons }
536
+ var title = [h('es-icon', {
537
+ props: {
538
+ contents: item.icons || _this6.menuIcon
539
+ },
540
+ class: ['es-menu-item-icon']
507
541
  }), h('div', {
508
- class: ['es-menu-title-text es-menu-title-' + _this5.mode]
542
+ class: ['es-menu-title-text es-menu-title-' + _this6.mode]
509
543
  }, [h('el-badge', {
510
544
  class: ['es-badge', {
511
545
  'es-badge-right': item.tips && typeof item.tips !== 'boolean',
@@ -521,9 +555,9 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
521
555
  }
522
556
  }, [item.text])])];
523
557
  doms.push(h('el-menu-item', {
524
- class: ['es-menu-item-' + _this5.mode],
558
+ class: ['es-menu-item-' + _this6.mode],
525
559
  props: {
526
- paddingLeft: _this5.paddingLeft,
560
+ paddingLeft: _this6.paddingLeft,
527
561
  disabled: item.extendData && item.extendData.businessStatus == 0
528
562
  },
529
563
  attrs: {
@@ -531,7 +565,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
531
565
  index: item.id,
532
566
  key: item.id
533
567
  }
534
- }, _this5.titleIcons ? title : [title[1]]));
568
+ }, _this6.titleIcons ? title : [title[1]]));
535
569
  }
536
570
  });
537
571
  return h('el-scrollbar', {
@@ -549,7 +583,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
549
583
  defaultActive: this.defaultActive,
550
584
  collapse: this.collapse,
551
585
  mode: this.mode,
552
- uniqueOpened: this.uniqueOpened
586
+ uniqueOpened: this.uniqueOpened,
587
+ icons: this.icons
553
588
  },
554
589
  style: { width: this.maxWidth },
555
590
  attrs: _extends({}, this.$attrs),
package/lib/nav.js CHANGED
@@ -3630,7 +3630,7 @@ module.exports = require("axios");
3630
3630
  // ESM COMPAT FLAG
3631
3631
  __webpack_require__.r(__webpack_exports__);
3632
3632
 
3633
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=template&id=5d7ddb00&
3633
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=template&id=04099294&
3634
3634
  var render = function () {
3635
3635
  var _vm = this
3636
3636
  var _h = _vm.$createElement
@@ -3660,6 +3660,9 @@ var render = function () {
3660
3660
  deep: false,
3661
3661
  "default-active": _vm.subActive,
3662
3662
  biserial: _vm.biserial,
3663
+ "menu-icons": _vm.menuIcon,
3664
+ icons: _vm.icons,
3665
+ "sub-icon": _vm.subIcon,
3663
3666
  },
3664
3667
  on: { select: _vm.handleTrigger },
3665
3668
  },
@@ -3685,6 +3688,7 @@ var render = function () {
3685
3688
  ],
3686
3689
  staticClass: "es-nav-main",
3687
3690
  style: { width: _vm.biserial ? _vm.width : _vm.boxWidth },
3691
+ attrs: { biserial: _vm.biserial },
3688
3692
  },
3689
3693
  [
3690
3694
  _vm.showTitle
@@ -3751,6 +3755,10 @@ var render = function () {
3751
3755
  width: _vm.isTop ? _vm.boxWidth : _vm.menuWidth,
3752
3756
  "is-default": _vm.isDefault,
3753
3757
  biserial: _vm.biserial,
3758
+ paddingLeft: _vm.paddingLeft,
3759
+ "menu-icon": _vm.menuIcon,
3760
+ icons: _vm.icons,
3761
+ "sub-icon": _vm.subIcon,
3754
3762
  },
3755
3763
  on: {
3756
3764
  select: _vm.handleSelect,
@@ -3773,7 +3781,7 @@ var staticRenderFns = []
3773
3781
  render._withStripped = true
3774
3782
 
3775
3783
 
3776
- // CONCATENATED MODULE: ./packages/nav/src/main.vue?vue&type=template&id=5d7ddb00&
3784
+ // CONCATENATED MODULE: ./packages/nav/src/main.vue?vue&type=template&id=04099294&
3777
3785
 
3778
3786
  // EXTERNAL MODULE: ./src/utils/util.js
3779
3787
  var util = __webpack_require__(0);
@@ -3835,6 +3843,14 @@ var util = __webpack_require__(0);
3835
3843
  //
3836
3844
  //
3837
3845
  //
3846
+ //
3847
+ //
3848
+ //
3849
+ //
3850
+ //
3851
+ //
3852
+ //
3853
+ //
3838
3854
 
3839
3855
 
3840
3856
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -3854,6 +3870,10 @@ var util = __webpack_require__(0);
3854
3870
  type: String,
3855
3871
  default: '200px'
3856
3872
  },
3873
+ navWidth: {
3874
+ type: String,
3875
+ default: '70px'
3876
+ },
3857
3877
  showCollapse: {
3858
3878
  type: Boolean,
3859
3879
  default: true
@@ -3865,7 +3885,14 @@ var util = __webpack_require__(0);
3865
3885
  //是否双列导航
3866
3886
  biserial: Boolean,
3867
3887
  defaultActive: [String, Array],
3868
- isDefault: Boolean
3888
+ isDefault: Boolean,
3889
+ paddingLeft: Number,
3890
+ menuIcon: String,
3891
+ icons: Object,
3892
+ subIcon: {
3893
+ type: Boolean,
3894
+ default: true
3895
+ }
3869
3896
  },
3870
3897
  computed: {
3871
3898
  menu: function menu() {
@@ -3890,10 +3917,10 @@ var util = __webpack_require__(0);
3890
3917
  if (this.isShow) {
3891
3918
  return this.width;
3892
3919
  } else {
3893
- return '70px';
3920
+ return this.navWidth;
3894
3921
  }
3895
3922
  }
3896
- return this.subMenu && this.subMenu.length && this.isShow ? parseInt(this.width, 10) + 70 + 'px' : '70px';
3923
+ return this.subMenu && this.subMenu.length && this.isShow ? parseInt(this.width, 10) + parseInt(this.navWidth, 10) + 'px' : this.navWidth;
3897
3924
  }
3898
3925
  },
3899
3926
  watch: {
package/lib/player.js CHANGED
@@ -3497,7 +3497,7 @@ module.exports = require("sm-crypto");
3497
3497
 
3498
3498
  /***/ }),
3499
3499
 
3500
- /***/ 18:
3500
+ /***/ 19:
3501
3501
  /***/ (function(module, exports) {
3502
3502
 
3503
3503
  module.exports = require("video.js");
@@ -3672,7 +3672,7 @@ render._withStripped = true
3672
3672
  // CONCATENATED MODULE: ./packages/player/src/main.vue?vue&type=template&id=29c1659e&
3673
3673
 
3674
3674
  // EXTERNAL MODULE: external "video.js"
3675
- var external_video_js_ = __webpack_require__(18);
3675
+ var external_video_js_ = __webpack_require__(19);
3676
3676
  var external_video_js_default = /*#__PURE__*/__webpack_require__.n(external_video_js_);
3677
3677
 
3678
3678
  // EXTERNAL MODULE: external "video.js/dist/lang/zh-CN.json"