eoss 0.1.0-alpha.47 → 0.1.0-alpha.49

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 (117) hide show
  1. package/lib/3.js +1 -1
  2. package/lib/autocomplete.js +6 -6
  3. package/lib/ca-login.js +2 -2
  4. package/lib/calendar.js +2 -2
  5. package/lib/cascader-panel.js +2 -2
  6. package/lib/cascader.js +4 -4
  7. package/lib/code-editor.js +2 -2
  8. package/lib/collapse-item.js +2 -2
  9. package/lib/collapse.js +2 -2
  10. package/lib/color-picker.js +2 -2
  11. package/lib/cron.js +4 -4
  12. package/lib/data-table.js +366 -20
  13. package/lib/date-picker.js +3 -3
  14. package/lib/dialog.js +12 -10
  15. package/lib/drawer.js +2 -2
  16. package/lib/dropdown-item.js +23 -4
  17. package/lib/dropdown.js +4 -4
  18. package/lib/empty.js +2 -2
  19. package/lib/eoss.common.js +734 -322
  20. package/lib/flow-group.js +2 -2
  21. package/lib/flow.js +7 -7
  22. package/lib/form-editor.js +2 -2
  23. package/lib/form.js +12 -11
  24. package/lib/guide.js +2 -2
  25. package/lib/icons.js +4 -4
  26. package/lib/index.js +1 -1
  27. package/lib/input.js +2 -2
  28. package/lib/loading.js +4 -4
  29. package/lib/lowcode-view.js +2 -2
  30. package/lib/lowcode.js +7 -50
  31. package/lib/main.js +5 -5
  32. package/lib/menu-item-group.js +5 -1
  33. package/lib/menu.js +33 -43
  34. package/lib/message-box.js +4 -4
  35. package/lib/message.js +2 -2
  36. package/lib/notification.js +2 -2
  37. package/lib/pagination.js +2 -2
  38. package/lib/process-module.js +2 -2
  39. package/lib/rate.js +2 -2
  40. package/lib/scrollbar.js +71 -87
  41. package/lib/select.js +23 -13
  42. package/lib/selector-panel.js +2 -2
  43. package/lib/selector.js +16 -18
  44. package/lib/slider.js +2 -2
  45. package/lib/step.js +2 -2
  46. package/lib/steps.js +4 -4
  47. package/lib/submenu.js +16 -24
  48. package/lib/switch.js +2 -2
  49. package/lib/table-column.js +69 -3
  50. package/lib/table.js +162 -56
  51. package/lib/tabs.js +2 -2
  52. package/lib/theme-chalk/autocomplete.css +1 -1
  53. package/lib/theme-chalk/cascader-panel.css +1 -1
  54. package/lib/theme-chalk/cascader.css +1 -1
  55. package/lib/theme-chalk/data-table.css +1 -1
  56. package/lib/theme-chalk/date-picker.css +1 -1
  57. package/lib/theme-chalk/form.css +1 -1
  58. package/lib/theme-chalk/index.css +1 -1
  59. package/lib/theme-chalk/input-number.css +1 -1
  60. package/lib/theme-chalk/input.css +1 -1
  61. package/lib/theme-chalk/menu.css +1 -1
  62. package/lib/theme-chalk/message-box.css +1 -1
  63. package/lib/theme-chalk/pagination.css +1 -1
  64. package/lib/theme-chalk/scrollbar.css +1 -1
  65. package/lib/theme-chalk/select.css +1 -1
  66. package/lib/theme-chalk/selector.css +1 -1
  67. package/lib/theme-chalk/slider.css +1 -1
  68. package/lib/theme-chalk/table.css +1 -1
  69. package/lib/theme-chalk/time-picker.css +1 -1
  70. package/lib/theme-chalk/time-select.css +1 -1
  71. package/lib/theme-chalk/transfer.css +1 -1
  72. package/lib/theme-chalk/tree.css +1 -1
  73. package/lib/theme-chalk/upload.css +1 -1
  74. package/lib/time-picker.js +2 -2
  75. package/lib/time-select.js +6 -6
  76. package/lib/toolbar.js +2 -2
  77. package/lib/transfer.js +4 -4
  78. package/lib/tree.js +8 -15
  79. package/lib/upload.js +20 -20
  80. package/lib/utils/popup/popup-manager.js +24 -8
  81. package/package.json +4 -1
  82. package/packages/data-table/src/data-table.vue +43 -8
  83. package/packages/data-table/src/sizer.vue +104 -87
  84. package/packages/dialog/src/dialog.vue +4 -2
  85. package/packages/dropdown/src/dropdown-item.vue +21 -3
  86. package/packages/form/src/form.vue +5 -8
  87. package/packages/icons/src/icons.vue +2 -2
  88. package/packages/lowcode/src/util/components.js +0 -59
  89. package/packages/menu/src/menu.vue +7 -21
  90. package/packages/menu/src/mixins.js +6 -1
  91. package/packages/menu/src/submenu.vue +7 -16
  92. package/packages/scrollbar/src/main.js +64 -78
  93. package/packages/select/src/select.vue +13 -6
  94. package/packages/selector/src/selector.vue +6 -13
  95. package/packages/table/src/config.js +48 -0
  96. package/packages/table/src/store/index.js +19 -4
  97. package/packages/table/src/store/watcher.js +14 -3
  98. package/packages/table/src/table-body.js +9 -4
  99. package/packages/table/src/table-column.js +17 -3
  100. package/packages/table/src/table-footer.js +4 -2
  101. package/packages/table/src/table-header.js +9 -6
  102. package/packages/table/src/table.vue +48 -27
  103. package/packages/theme-chalk/src/data-table.scss +4 -0
  104. package/packages/theme-chalk/src/form.scss +3 -0
  105. package/packages/theme-chalk/src/input.scss +2 -2
  106. package/packages/theme-chalk/src/menu.scss +8 -0
  107. package/packages/theme-chalk/src/mixins/function.scss +61 -12
  108. package/packages/theme-chalk/src/mixins/utils.scss +12 -0
  109. package/packages/theme-chalk/src/scrollbar.scss +4 -5
  110. package/packages/theme-chalk/src/selector.scss +6 -1
  111. package/packages/theme-chalk/src/table.scss +40 -0
  112. package/packages/theme-chalk/src/tree.scss +7 -6
  113. package/packages/theme-chalk/src/upload.scss +5 -0
  114. package/packages/tree/src/tree.vue +2 -13
  115. package/packages/upload/src/upload-list.vue +5 -10
  116. package/src/index.js +1 -1
  117. package/src/utils/popup/popup-manager.js +24 -9
package/lib/scrollbar.js CHANGED
@@ -108,13 +108,6 @@ module.exports = require("eoss/lib/utils/resize-event.js");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 27:
112
- /***/ (function(module, exports) {
113
-
114
- module.exports = require("eoss/lib/utils/scrollbar.js");
115
-
116
- /***/ }),
117
-
118
111
  /***/ 277:
119
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
120
113
 
@@ -128,16 +121,13 @@ var external_throttle_debounce_ = __webpack_require__(13);
128
121
  // EXTERNAL MODULE: external "eoss/lib/utils/resize-event.js"
129
122
  var resize_event_js_ = __webpack_require__(25);
130
123
 
131
- // EXTERNAL MODULE: external "eoss/lib/utils/scrollbar.js"
132
- var scrollbar_js_ = __webpack_require__(27);
133
-
134
- // EXTERNAL MODULE: external "eoss/lib/utils/util.js"
135
- var util_js_ = __webpack_require__(0);
136
-
137
124
  // EXTERNAL MODULE: external "eoss/lib/components/bar.js"
138
125
  var bar_js_ = __webpack_require__(45);
139
126
  var bar_js_default = /*#__PURE__*/__webpack_require__.n(bar_js_);
140
127
 
128
+ // EXTERNAL MODULE: external "eoss/lib/utils/util.js"
129
+ var util_js_ = __webpack_require__(0);
130
+
141
131
  // CONCATENATED MODULE: ./packages/scrollbar/src/scroll-mixin.js
142
132
  /**
143
133
  * Scrollbar 混入对象
@@ -278,18 +268,50 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
278
268
 
279
269
 
280
270
 
271
+ // 数字或纯数字字符串补 px,其余形式(100%、inherit 等)原样透传
272
+ function toCssSize(val) {
273
+ var str = String(val).trim();
274
+ return (/^-?\d+(\.\d+)?$/.test(str) ? str + 'px' : str
275
+ );
276
+ }
277
+
278
+ // 把 'a: b; c-d: e' 形式的样式串解析成驼峰对象
279
+ function parseStyleText(styleText) {
280
+ var res = {};
281
+ var list = String(styleText || '').split(';');
282
+ for (var i = 0; i < list.length; i++) {
283
+ var item = list[i];
284
+ var index = item.indexOf(':');
285
+ if (index < 0) continue;
286
+ var key = item.slice(0, index).trim();
287
+ if (!key) continue;
288
+ res[key.replace(/-(\w)/g, function (match, letter) {
289
+ return letter.toUpperCase();
290
+ })] = item.slice(index + 1).trim();
291
+ }
292
+ return res;
293
+ }
281
294
 
282
- // 缓存 getScrollbarWidth 计算结果
283
- var cachedScrollbarWidth = null;
284
- function getCachedScrollbarWidth() {
285
- if (cachedScrollbarWidth === null) {
286
- cachedScrollbarWidth = Object(scrollbar_js_["getScrollbarWidth"])();
287
- // 监听窗口大小变化,重置缓存
288
- window.addEventListener('resize', function () {
289
- cachedScrollbarWidth = null;
290
- });
295
+ // wrap-style 可以是 String / Object / Array,统一归一化成新对象:
296
+ // Vue 2 仅解析绑定为字符串的顶层 style,数组里的字符串项会被丢掉,
297
+ // 另外也不能直接在传入的对象上写字段,避免变更 prop
298
+ function normalizeWrapStyle(val) {
299
+ if (typeof val === 'string') {
300
+ return parseStyleText(val);
291
301
  }
292
- return cachedScrollbarWidth;
302
+ if (Array.isArray(val)) {
303
+ return Object(util_js_["toObject"])(val.map(function (item) {
304
+ return typeof item === 'string' ? parseStyleText(item) : item || {};
305
+ }));
306
+ }
307
+ var res = {};
308
+ var source = val || {};
309
+ for (var key in source) {
310
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
311
+ res[key] = source[key];
312
+ }
313
+ }
314
+ return res;
293
315
  }
294
316
 
295
317
  /* istanbul ignore next */
@@ -384,7 +406,6 @@ function getCachedScrollbarWidth() {
384
406
  sizeHeight: '0',
385
407
  moveX: 0,
386
408
  moveY: 0,
387
- height: null,
388
409
  initialized: false,
389
410
  isHovering: false,
390
411
  hideTimer: null,
@@ -415,45 +436,26 @@ function getCachedScrollbarWidth() {
415
436
  }
416
437
  },
417
438
 
418
- // 在 render 方法中使用缓存
419
439
  render: function render(h) {
420
- var gutter = getCachedScrollbarWidth();
421
- var style = this.wrapStyle;
422
- if (gutter) {
423
- var gutterWith = '-' + gutter + 'px';
424
- var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
425
- if (this.styles || this.height || this.maxHeight) {
426
- var height = this.height || this.styles && this.styles.height;
427
- if (height === '100%') {
428
- gutterStyle += 'height:calc(100% + ' + gutter + 'px);';
429
- } else {
430
- gutterStyle += height ? 'height:' + (parseInt(height, 10) + gutter) + 'px' : '';
431
- }
432
- var maxHeight = this.maxHeight || this.styles && this.styles.maxHeight || this.styles && this.styles['max-height'];
433
- if (maxHeight === '100%') {
434
- gutterStyle += 'max-height:calc(100% + ' + gutter + 'px);';
435
- } else {
436
- gutterStyle += maxHeight ? 'max-height:' + parseInt(maxHeight, 10) + 'px' : '';
437
- }
438
- } else {
439
- gutterStyle += 'height:calc(100% + ' + gutter + 'px);';
440
- }
441
-
442
- if (Array.isArray(this.wrapStyle)) {
443
- style = Object(util_js_["toObject"])(this.wrapStyle);
444
- style.marginRight = style.marginBottom = gutterWith;
445
- if (!style.height && !style.maxHeight) {
446
- style.height = '100%';
447
- }
448
- } else if (typeof this.wrapStyle === 'string') {
449
- style += gutterStyle;
450
- } else {
451
- style = gutterStyle;
452
- }
453
- } else {
454
- style = 'height:100%;';
440
+ // wrap 内联样式只负责高度声明与自定义样式,不再做原生滚动条的占位补偿:
441
+ // 原生滚动条已由 CSS 隐藏(--hidden-default 恒挂,IE 走 -ms-overflow-style),
442
+ // 本身不占位;此前的负 margin + calc(100% + gutter) 在浏览器缩放时,量取的
443
+ // gutter 取整宽度和实际渲染宽度对不上,底部/右侧就会露出一条灰边。
444
+ var wrapStyles = normalizeWrapStyle(this.wrapStyle);
445
+ var height = this.styles && this.styles.height;
446
+ var maxHeight = this.maxHeight || this.styles && (this.styles.maxHeight || this.styles['max-height']);
447
+
448
+ // 已有的键不覆盖,保证用户显式写的 wrap-style 优先
449
+ if (height && wrapStyles.height === undefined) {
450
+ wrapStyles.height = toCssSize(height);
451
+ }
452
+ if (maxHeight && wrapStyles.maxHeight === undefined) {
453
+ wrapStyles.maxHeight = toCssSize(maxHeight);
455
454
  }
456
455
 
456
+ var hasStyle = Object.keys(wrapStyles).length > 0;
457
+ var style = hasStyle ? wrapStyles : undefined;
458
+
457
459
  // 虚拟滚动实现
458
460
  var view = h(this.tag, {
459
461
  class: ['es-scrollbar__view', this.viewClass],
@@ -470,7 +472,7 @@ function getCachedScrollbarWidth() {
470
472
  'scroll': this.handleScroll
471
473
  },
472
474
 
473
- 'class': [this.wrapClass, 'es-scrollbar__wrap', gutter ? '' : 'es-scrollbar__wrap--hidden-default']
475
+ 'class': [this.wrapClass, 'es-scrollbar__wrap es-scrollbar__wrap--hidden-default']
474
476
  },
475
477
  [[view]]
476
478
  );
@@ -508,8 +510,12 @@ function getCachedScrollbarWidth() {
508
510
  'div',
509
511
  {
510
512
  ref: 'wrap',
511
- 'class': [this.wrapClass, 'es-scrollbar__wrap'],
512
- style: style
513
+ style: style,
514
+ on: {
515
+ 'scroll': this.handleScroll
516
+ },
517
+
518
+ 'class': [this.wrapClass, 'es-scrollbar__wrap']
513
519
  },
514
520
  [[view]]
515
521
  )];
@@ -838,18 +844,8 @@ function getCachedScrollbarWidth() {
838
844
  var wrap = _this5.wrap;
839
845
  if (!wrap) return;
840
846
 
841
- // 确保 wrap 元素有正确的高度设置,特别是在嵌套场景下
842
- if (!wrap.style.height && !wrap.style.maxHeight && !_this5.height && !_this5.maxHeight) {
843
- // 如果没有设置高度,尝试从父元素获取
844
- var parent = wrap.parentNode;
845
- if (parent && parent.style.height) {
846
- wrap.style.height = parent.style.height;
847
- } else if (parent && parent.style.maxHeight) {
848
- wrap.style.height = parent.style.maxHeight;
849
- } else if (parent && parent.clientHeight) {
850
- wrap.style.height = parent.clientHeight + 'px';
851
- }
852
- }
847
+ // wrap 高度:CSS 给默认的 height: 100%,需要限高时由调用方通过
848
+ // max-height / wrap-style 声明(组件自身的 wrap-class 限高不受干扰)
853
849
 
854
850
  // 缓存计算值
855
851
  var clientHeight = wrap.clientHeight;
@@ -870,18 +866,6 @@ function getCachedScrollbarWidth() {
870
866
  }
871
867
 
872
868
  _this5.onReady && _this5.onReady(_this5.sizeHeight, _this5.sizeWidth);
873
-
874
- // 延迟执行高度计算逻辑
875
- requestAnimationFrame(function () {
876
- var maxH = wrap.parentNode.style['max-height'];
877
- if (maxH) {
878
- maxH = parseInt(maxH, 10);
879
- var gutter = getCachedScrollbarWidth();
880
- if (wrap.offsetHeight - gutter > maxH) {
881
- _this5.height = maxH;
882
- }
883
- }
884
- });
885
869
  });
886
870
  },
887
871
 
package/lib/select.js CHANGED
@@ -713,7 +713,7 @@ module.exports = require("eoss/lib/utils/vue-popper.js");
713
713
  // ESM COMPAT FLAG
714
714
  __webpack_require__.r(__webpack_exports__);
715
715
 
716
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=5f1334b0&
716
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=4639eab5&
717
717
  var render = function () {
718
718
  var _vm = this
719
719
  var _h = _vm.$createElement
@@ -1449,7 +1449,7 @@ var staticRenderFns = []
1449
1449
  render._withStripped = true
1450
1450
 
1451
1451
 
1452
- // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=5f1334b0&
1452
+ // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=4639eab5&
1453
1453
 
1454
1454
  // EXTERNAL MODULE: external "eoss/lib/mixins/emitter.js"
1455
1455
  var emitter_js_ = __webpack_require__(8);
@@ -1921,14 +1921,14 @@ var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
1921
1921
  var external_throttle_debounce_ = __webpack_require__(13);
1922
1922
 
1923
1923
  // EXTERNAL MODULE: external "eoss/lib/utils/clickoutside.js"
1924
- var clickoutside_js_ = __webpack_require__(29);
1924
+ var clickoutside_js_ = __webpack_require__(28);
1925
1925
  var clickoutside_js_default = /*#__PURE__*/__webpack_require__.n(clickoutside_js_);
1926
1926
 
1927
1927
  // EXTERNAL MODULE: external "eoss/lib/utils/resize-event.js"
1928
1928
  var resize_event_js_ = __webpack_require__(25);
1929
1929
 
1930
1930
  // EXTERNAL MODULE: external "eoss/lib/utils/scrollbar.js"
1931
- var scrollbar_js_ = __webpack_require__(27);
1931
+ var scrollbar_js_ = __webpack_require__(33);
1932
1932
 
1933
1933
  // EXTERNAL MODULE: external "eoss/lib/utils/util.js"
1934
1934
  var util_js_ = __webpack_require__(0);
@@ -3093,6 +3093,10 @@ var _this = undefined;
3093
3093
 
3094
3094
 
3095
3095
  results: {
3096
+ // 树形模式的 options 完全由 data/results 驱动(树节点不是 es-option,不会自注册),
3097
+ // 必须 immediate:否则静态传入 data 时 results 初始化不触发 watcher,
3098
+ // options 恒为 [],下拉被 v-show="options.length > 0" 隐藏并显示「无数据」
3099
+ immediate: true,
3096
3100
  deep: true,
3097
3101
  handler: function handler(val) {
3098
3102
  if (this.tree) {
@@ -3686,11 +3690,17 @@ var _this = undefined;
3686
3690
  if (this.filterable) this.$refs.input.focus();
3687
3691
  this.resetInputHeight();
3688
3692
  } else {
3693
+ var selectValue = option.value;
3689
3694
  if (this.valueType === 'string') {
3690
- this.$emit('input', Object(util_js_["getValueByPath"])(option.value, this.actualValueKey));
3691
- } else {
3692
- this.$emit('input', option.value);
3695
+ selectValue = Object(util_js_["getValueByPath"])(option.value, this.actualValueKey);
3696
+ // 树节点未提供 value-key 对应字段时取值为 undefined,直接写入 v-model 会让
3697
+ // setSelected 解析不出 label(表现为选中后不回显),此处退回整节点对象,
3698
+ // 由 getOption 的对象分支按 label-key 取标签
3699
+ if (this.tree && selectValue === undefined) {
3700
+ selectValue = option.value;
3701
+ }
3693
3702
  }
3703
+ this.$emit('input', selectValue);
3694
3704
  this.emitChange(option.value);
3695
3705
  this.visible = false;
3696
3706
  }
@@ -3949,24 +3959,24 @@ module.exports = require("eoss/lib/utils/resize-event.js");
3949
3959
 
3950
3960
  /***/ }),
3951
3961
 
3952
- /***/ 27:
3962
+ /***/ 28:
3953
3963
  /***/ (function(module, exports) {
3954
3964
 
3955
- module.exports = require("eoss/lib/utils/scrollbar.js");
3965
+ module.exports = require("eoss/lib/utils/clickoutside.js");
3956
3966
 
3957
3967
  /***/ }),
3958
3968
 
3959
- /***/ 29:
3969
+ /***/ 3:
3960
3970
  /***/ (function(module, exports) {
3961
3971
 
3962
- module.exports = require("eoss/lib/utils/clickoutside.js");
3972
+ module.exports = require("eoss/lib/utils/ajax.js");
3963
3973
 
3964
3974
  /***/ }),
3965
3975
 
3966
- /***/ 3:
3976
+ /***/ 33:
3967
3977
  /***/ (function(module, exports) {
3968
3978
 
3969
- module.exports = require("eoss/lib/utils/ajax.js");
3979
+ module.exports = require("eoss/lib/utils/scrollbar.js");
3970
3980
 
3971
3981
  /***/ }),
3972
3982
 
@@ -1887,7 +1887,7 @@ var input_ = __webpack_require__(9);
1887
1887
  var input_default = /*#__PURE__*/__webpack_require__.n(input_);
1888
1888
 
1889
1889
  // EXTERNAL MODULE: external "eoss/lib/option"
1890
- var option_ = __webpack_require__(33);
1890
+ var option_ = __webpack_require__(32);
1891
1891
  var option_default = /*#__PURE__*/__webpack_require__.n(option_);
1892
1892
 
1893
1893
  // EXTERNAL MODULE: external "eoss/lib/select"
@@ -2493,7 +2493,7 @@ module.exports = require("eoss/lib/utils/ajax.js");
2493
2493
 
2494
2494
  /***/ }),
2495
2495
 
2496
- /***/ 33:
2496
+ /***/ 32:
2497
2497
  /***/ (function(module, exports) {
2498
2498
 
2499
2499
  module.exports = require("eoss/lib/option");
package/lib/selector.js CHANGED
@@ -255,7 +255,7 @@ module.exports = require("eoss/lib/utils/resize-event.js");
255
255
  // ESM COMPAT FLAG
256
256
  __webpack_require__.r(__webpack_exports__);
257
257
 
258
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector.vue?vue&type=template&id=015c6e04&
258
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector.vue?vue&type=template&id=950e8dd4&
259
259
  var render = function () {
260
260
  var _vm = this
261
261
  var _h = _vm.$createElement
@@ -516,7 +516,7 @@ var staticRenderFns = []
516
516
  render._withStripped = true
517
517
 
518
518
 
519
- // CONCATENATED MODULE: ./packages/selector/src/selector.vue?vue&type=template&id=015c6e04&
519
+ // CONCATENATED MODULE: ./packages/selector/src/selector.vue?vue&type=template&id=950e8dd4&
520
520
 
521
521
  // EXTERNAL MODULE: external "eoss/lib/utils/util.js"
522
522
  var util_js_ = __webpack_require__(0);
@@ -528,7 +528,7 @@ var types_js_ = __webpack_require__(22);
528
528
  var api_js_ = __webpack_require__(2);
529
529
 
530
530
  // EXTERNAL MODULE: external "eoss/lib/utils/clickoutside.js"
531
- var clickoutside_js_ = __webpack_require__(29);
531
+ var clickoutside_js_ = __webpack_require__(28);
532
532
  var clickoutside_js_default = /*#__PURE__*/__webpack_require__.n(clickoutside_js_);
533
533
 
534
534
  // EXTERNAL MODULE: external "eoss/lib/utils/ajax.js"
@@ -573,7 +573,7 @@ var selector_panel_default = /*#__PURE__*/__webpack_require__.n(selector_panel_)
573
573
  var resize_event_js_ = __webpack_require__(25);
574
574
 
575
575
  // EXTERNAL MODULE: external "eoss/lib/utils/scrollbar.js"
576
- var scrollbar_js_ = __webpack_require__(27);
576
+ var scrollbar_js_ = __webpack_require__(33);
577
577
 
578
578
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector.vue?vue&type=script&lang=js&
579
579
  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; };
@@ -1159,8 +1159,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
1159
1159
  timer: null,
1160
1160
  tagsHeight: 0,
1161
1161
  moveTo: 0,
1162
- barSize: 0,
1163
- scrollbarWidth: 0
1162
+ barSize: 0
1164
1163
  };
1165
1164
  },
1166
1165
 
@@ -1168,12 +1167,12 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
1168
1167
  styles: function styles() {
1169
1168
  return this.tagsHeight ? { 'max-height': this.tagsHeight + 'px', overflow: 'hidden' } : {};
1170
1169
  },
1170
+
1171
+ // tags 折叠限高时内层容器自身滚动,原生条由 CSS 隐藏(见 selector.scss),
1172
+ // 不占位也就无需按条宽加宽容器把它推出去——那样在浏览器缩放时量到的
1173
+ // 15px 和实际渲染宽度对不上,右侧会露出一条灰边
1171
1174
  tagsStyle: function tagsStyle() {
1172
- return this.tagsHeight ? {
1173
- 'max-height': this.tagsHeight + 'px',
1174
- overflowY: 'scroll',
1175
- width: 'calc(100% + ' + this.scrollbarWidth + 'px)'
1176
- } : {};
1175
+ return this.tagsHeight ? { 'max-height': this.tagsHeight + 'px', overflowY: 'scroll' } : {};
1177
1176
  },
1178
1177
 
1179
1178
  // 滚动容器
@@ -1294,7 +1293,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
1294
1293
  mounted: function mounted() {
1295
1294
  var _this2 = this;
1296
1295
 
1297
- this.scrollbarWidth = Object(scrollbar_js_["getScrollbarWidth"])();
1298
1296
  //this.resetInputHeight();
1299
1297
  if (this.filterable) {
1300
1298
  this.$nextTick(function () {
@@ -1629,24 +1627,24 @@ selector.install = function (Vue) {
1629
1627
 
1630
1628
  /***/ }),
1631
1629
 
1632
- /***/ 27:
1630
+ /***/ 28:
1633
1631
  /***/ (function(module, exports) {
1634
1632
 
1635
- module.exports = require("eoss/lib/utils/scrollbar.js");
1633
+ module.exports = require("eoss/lib/utils/clickoutside.js");
1636
1634
 
1637
1635
  /***/ }),
1638
1636
 
1639
- /***/ 29:
1637
+ /***/ 3:
1640
1638
  /***/ (function(module, exports) {
1641
1639
 
1642
- module.exports = require("eoss/lib/utils/clickoutside.js");
1640
+ module.exports = require("eoss/lib/utils/ajax.js");
1643
1641
 
1644
1642
  /***/ }),
1645
1643
 
1646
- /***/ 3:
1644
+ /***/ 33:
1647
1645
  /***/ (function(module, exports) {
1648
1646
 
1649
- module.exports = require("eoss/lib/utils/ajax.js");
1647
+ module.exports = require("eoss/lib/utils/scrollbar.js");
1650
1648
 
1651
1649
  /***/ }),
1652
1650
 
package/lib/slider.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 202);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 203);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -199,7 +199,7 @@ module.exports = require("eoss/lib/tooltip");
199
199
 
200
200
  /***/ }),
201
201
 
202
- /***/ 202:
202
+ /***/ 203:
203
203
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
204
204
 
205
205
  "use strict";
package/lib/step.js CHANGED
@@ -972,7 +972,7 @@ module.exports = require("eoss/lib/checkbox-group");
972
972
 
973
973
  /***/ }),
974
974
 
975
- /***/ 30:
975
+ /***/ 29:
976
976
  /***/ (function(module, exports) {
977
977
 
978
978
  module.exports = require("eoss/lib/radio-group");
@@ -1125,7 +1125,7 @@ var input_number_ = __webpack_require__(40);
1125
1125
  var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
1126
1126
 
1127
1127
  // EXTERNAL MODULE: external "eoss/lib/radio-group"
1128
- var radio_group_ = __webpack_require__(30);
1128
+ var radio_group_ = __webpack_require__(29);
1129
1129
  var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
1130
1130
 
1131
1131
  // EXTERNAL MODULE: external "eoss/lib/checkbox-group"
package/lib/steps.js CHANGED
@@ -1015,7 +1015,7 @@ render._withStripped = true
1015
1015
  // CONCATENATED MODULE: ./packages/steps/src/steps.vue?vue&type=template&id=23b8394e&
1016
1016
 
1017
1017
  // EXTERNAL MODULE: external "eoss/lib/mixins/migrating.js"
1018
- var migrating_js_ = __webpack_require__(31);
1018
+ var migrating_js_ = __webpack_require__(30);
1019
1019
  var migrating_js_default = /*#__PURE__*/__webpack_require__.n(migrating_js_);
1020
1020
 
1021
1021
  // EXTERNAL MODULE: ./packages/steps/src/step.vue + 4 modules
@@ -1276,14 +1276,14 @@ steps.install = function (Vue) {
1276
1276
 
1277
1277
  /***/ }),
1278
1278
 
1279
- /***/ 30:
1279
+ /***/ 29:
1280
1280
  /***/ (function(module, exports) {
1281
1281
 
1282
1282
  module.exports = require("eoss/lib/radio-group");
1283
1283
 
1284
1284
  /***/ }),
1285
1285
 
1286
- /***/ 31:
1286
+ /***/ 30:
1287
1287
  /***/ (function(module, exports) {
1288
1288
 
1289
1289
  module.exports = require("eoss/lib/mixins/migrating.js");
@@ -1436,7 +1436,7 @@ var input_number_ = __webpack_require__(40);
1436
1436
  var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
1437
1437
 
1438
1438
  // EXTERNAL MODULE: external "eoss/lib/radio-group"
1439
- var radio_group_ = __webpack_require__(30);
1439
+ var radio_group_ = __webpack_require__(29);
1440
1440
  var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
1441
1441
 
1442
1442
  // EXTERNAL MODULE: external "eoss/lib/checkbox-group"
package/lib/submenu.js CHANGED
@@ -197,7 +197,7 @@ function normalizeComponent(
197
197
 
198
198
  "use strict";
199
199
 
200
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/submenu.vue?vue&type=template&id=09f0751a&
200
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/submenu.vue?vue&type=template&id=87f03422&
201
201
  var render = function () {
202
202
  var _vm = this
203
203
  var _h = _vm.$createElement
@@ -408,8 +408,11 @@ var render = function () {
408
408
  style: {
409
409
  backgroundColor:
410
410
  _vm.rootMenu.backgroundColor || "",
411
+ // 原生条已由 CSS 隐藏(见 menu.scss 的
412
+ // .es-menu-hidden > .es-menu--popup),不占位也就无需再用
413
+ // marginRight: -条宽 把它推出容器——缩放时量到的 15px 和
414
+ // 实际渲染宽度对不上,popup 右/下侧会露出一条灰边
411
415
  maxHeight: _vm.maxH === undefined ? "" : _vm.maxH,
412
- marginRight: _vm.isScroll ? _vm.gutterWith : "",
413
416
  },
414
417
  attrs: { role: "menu" },
415
418
  },
@@ -504,10 +507,7 @@ var staticRenderFns = []
504
507
  render._withStripped = true
505
508
 
506
509
 
507
- // CONCATENATED MODULE: ./packages/menu/src/submenu.vue?vue&type=template&id=09f0751a&
508
-
509
- // EXTERNAL MODULE: external "eoss/lib/utils/scrollbar.js"
510
- var scrollbar_js_ = __webpack_require__(27);
510
+ // CONCATENATED MODULE: ./packages/menu/src/submenu.vue?vue&type=template&id=87f03422&
511
511
 
512
512
  // EXTERNAL MODULE: ./packages/menu/src/mixins.js
513
513
  var mixins = __webpack_require__(65);
@@ -705,7 +705,9 @@ var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
705
705
  //
706
706
  //
707
707
  //
708
-
708
+ //
709
+ //
710
+ //
709
711
 
710
712
 
711
713
 
@@ -939,9 +941,6 @@ var poperMixins = {
939
941
  }
940
942
  return rootMenu.mode === 'horizontal' && isFirstLevel ? 'es-icon-xia' : 'es-icon-you';
941
943
  },
942
- gutterWith: function gutterWith() {
943
- return '-' + Object(scrollbar_js_["getScrollbarWidth"])() + 'px';
944
- },
945
944
  iconClass: function iconClass() {
946
945
  return this.icon || this.rootMenu.parentMenuIcon || this.rootMenu.icon;
947
946
  },
@@ -1001,7 +1000,6 @@ var poperMixins = {
1001
1000
  items: {},
1002
1001
  submenus: {},
1003
1002
  mouseInChild: false,
1004
- isScroll: false,
1005
1003
  height: '',
1006
1004
  isHoveringTitle: false
1007
1005
  };
@@ -1144,11 +1142,8 @@ var poperMixins = {
1144
1142
 
1145
1143
  this.$nextTick(function () {
1146
1144
  var dom = _this5.$refs.menucontent;
1147
- if (dom && (dom.scrollHeight > dom.clientHeight || dom.offsetHeight > dom.clientHeight)) {
1148
- _this5.isScroll = true;
1149
- } else {
1150
- _this5.isScroll = false;
1151
- }
1145
+ // 只需要给 es-scrollbar 分支算高度;popup 分支的原生条由 CSS 隐藏,
1146
+ // 不再需要判定是否出了滚动条去抵消它的占位
1152
1147
  if (dom && _this5.maxH && dom.clientHeight > parseInt(_this5.maxH, 10)) {
1153
1148
  _this5.height = _this5.maxH;
1154
1149
  } else {
@@ -1234,13 +1229,6 @@ module.exports = require("eoss/lib/tooltip");
1234
1229
 
1235
1230
  /***/ }),
1236
1231
 
1237
- /***/ 27:
1238
- /***/ (function(module, exports) {
1239
-
1240
- module.exports = require("eoss/lib/utils/scrollbar.js");
1241
-
1242
- /***/ }),
1243
-
1244
1232
  /***/ 47:
1245
1233
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1246
1234
 
@@ -1778,8 +1766,12 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
1778
1766
  open = item.open,
1779
1767
  extendData = item.extendData,
1780
1768
  rest = _objectWithoutProperties(item, ['id', 'index', 'open', 'extendData']);
1769
+ // extendData 存在时以它为准,没有则回退到 item 自身的 open;
1770
+ // 原写法 `open || extendData ? Boolean(extendData.openStatus)` 在
1771
+ // 只声明了 open、没带 extendData 的菜单项上会直接抛错
1772
+
1781
1773
 
1782
- var openStatus = open || extendData ? Boolean(extendData.openStatus) : false;
1774
+ var openStatus = extendData ? Boolean(extendData.openStatus) : Boolean(open);
1783
1775
  var props = void 0;
1784
1776
  if (this.isFourthTabs) {
1785
1777
  if (item.children && item.children.length || item.fourthTabs && item.fourthTabs.length) {
package/lib/switch.js CHANGED
@@ -348,7 +348,7 @@ var focus_js_ = __webpack_require__(74);
348
348
  var focus_js_default = /*#__PURE__*/__webpack_require__.n(focus_js_);
349
349
 
350
350
  // EXTERNAL MODULE: external "eoss/lib/mixins/migrating.js"
351
- var migrating_js_ = __webpack_require__(31);
351
+ var migrating_js_ = __webpack_require__(30);
352
352
  var migrating_js_default = /*#__PURE__*/__webpack_require__.n(migrating_js_);
353
353
 
354
354
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/switch.vue?vue&type=script&lang=js&
@@ -769,7 +769,7 @@ src_switch.install = function (Vue) {
769
769
 
770
770
  /***/ }),
771
771
 
772
- /***/ 31:
772
+ /***/ 30:
773
773
  /***/ (function(module, exports) {
774
774
 
775
775
  module.exports = require("eoss/lib/mixins/migrating.js");