eoss 0.1.0-alpha.47 → 0.1.0-alpha.48

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 (114) 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.js +4 -4
  17. package/lib/empty.js +2 -2
  18. package/lib/eoss.common.js +706 -313
  19. package/lib/flow-group.js +2 -2
  20. package/lib/flow.js +7 -7
  21. package/lib/form-editor.js +2 -2
  22. package/lib/form.js +12 -11
  23. package/lib/guide.js +2 -2
  24. package/lib/icons.js +4 -4
  25. package/lib/index.js +1 -1
  26. package/lib/input.js +2 -2
  27. package/lib/loading.js +4 -4
  28. package/lib/lowcode-view.js +2 -2
  29. package/lib/lowcode.js +7 -50
  30. package/lib/main.js +5 -5
  31. package/lib/menu-item-group.js +5 -1
  32. package/lib/menu.js +33 -43
  33. package/lib/message-box.js +4 -4
  34. package/lib/message.js +2 -2
  35. package/lib/notification.js +2 -2
  36. package/lib/pagination.js +2 -2
  37. package/lib/process-module.js +2 -2
  38. package/lib/rate.js +2 -2
  39. package/lib/scrollbar.js +71 -87
  40. package/lib/select.js +23 -13
  41. package/lib/selector-panel.js +2 -2
  42. package/lib/selector.js +16 -18
  43. package/lib/slider.js +2 -2
  44. package/lib/step.js +2 -2
  45. package/lib/steps.js +4 -4
  46. package/lib/submenu.js +16 -24
  47. package/lib/switch.js +2 -2
  48. package/lib/table-column.js +69 -3
  49. package/lib/table.js +162 -56
  50. package/lib/tabs.js +2 -2
  51. package/lib/theme-chalk/autocomplete.css +1 -1
  52. package/lib/theme-chalk/cascader-panel.css +1 -1
  53. package/lib/theme-chalk/cascader.css +1 -1
  54. package/lib/theme-chalk/data-table.css +1 -1
  55. package/lib/theme-chalk/date-picker.css +1 -1
  56. package/lib/theme-chalk/form.css +1 -1
  57. package/lib/theme-chalk/index.css +1 -1
  58. package/lib/theme-chalk/input-number.css +1 -1
  59. package/lib/theme-chalk/input.css +1 -1
  60. package/lib/theme-chalk/menu.css +1 -1
  61. package/lib/theme-chalk/message-box.css +1 -1
  62. package/lib/theme-chalk/pagination.css +1 -1
  63. package/lib/theme-chalk/scrollbar.css +1 -1
  64. package/lib/theme-chalk/select.css +1 -1
  65. package/lib/theme-chalk/selector.css +1 -1
  66. package/lib/theme-chalk/slider.css +1 -1
  67. package/lib/theme-chalk/table.css +1 -1
  68. package/lib/theme-chalk/time-picker.css +1 -1
  69. package/lib/theme-chalk/time-select.css +1 -1
  70. package/lib/theme-chalk/transfer.css +1 -1
  71. package/lib/theme-chalk/tree.css +1 -1
  72. package/lib/theme-chalk/upload.css +1 -1
  73. package/lib/time-picker.js +2 -2
  74. package/lib/time-select.js +6 -6
  75. package/lib/toolbar.js +2 -2
  76. package/lib/transfer.js +4 -4
  77. package/lib/tree.js +8 -15
  78. package/lib/upload.js +20 -20
  79. package/lib/utils/popup/popup-manager.js +24 -8
  80. package/package.json +4 -1
  81. package/packages/data-table/src/data-table.vue +43 -8
  82. package/packages/data-table/src/sizer.vue +104 -87
  83. package/packages/dialog/src/dialog.vue +4 -2
  84. package/packages/form/src/form.vue +5 -8
  85. package/packages/icons/src/icons.vue +2 -2
  86. package/packages/lowcode/src/util/components.js +0 -59
  87. package/packages/menu/src/menu.vue +7 -21
  88. package/packages/menu/src/mixins.js +6 -1
  89. package/packages/menu/src/submenu.vue +7 -16
  90. package/packages/scrollbar/src/main.js +64 -78
  91. package/packages/select/src/select.vue +13 -6
  92. package/packages/selector/src/selector.vue +6 -13
  93. package/packages/table/src/config.js +48 -0
  94. package/packages/table/src/store/index.js +19 -4
  95. package/packages/table/src/store/watcher.js +14 -3
  96. package/packages/table/src/table-body.js +9 -4
  97. package/packages/table/src/table-column.js +17 -3
  98. package/packages/table/src/table-footer.js +4 -2
  99. package/packages/table/src/table-header.js +9 -6
  100. package/packages/table/src/table.vue +48 -27
  101. package/packages/theme-chalk/src/data-table.scss +4 -0
  102. package/packages/theme-chalk/src/form.scss +3 -0
  103. package/packages/theme-chalk/src/input.scss +2 -2
  104. package/packages/theme-chalk/src/menu.scss +8 -0
  105. package/packages/theme-chalk/src/mixins/utils.scss +12 -0
  106. package/packages/theme-chalk/src/scrollbar.scss +4 -5
  107. package/packages/theme-chalk/src/selector.scss +6 -1
  108. package/packages/theme-chalk/src/table.scss +40 -0
  109. package/packages/theme-chalk/src/tree.scss +7 -6
  110. package/packages/theme-chalk/src/upload.scss +5 -0
  111. package/packages/tree/src/tree.vue +2 -13
  112. package/packages/upload/src/upload-list.vue +5 -10
  113. package/src/index.js +1 -1
  114. package/src/utils/popup/popup-manager.js +24 -9
@@ -391,37 +391,37 @@ module.exports = require("eoss/lib/tooltip");
391
391
  /* 25 */
392
392
  /***/ (function(module, exports) {
393
393
 
394
- module.exports = require("eoss/lib/utils/scrollbar.js");
394
+ module.exports = require("eoss/lib/utils/bus.js");
395
395
 
396
396
  /***/ }),
397
397
  /* 26 */
398
398
  /***/ (function(module, exports) {
399
399
 
400
- module.exports = require("eoss/lib/utils/bus.js");
400
+ module.exports = require("eoss/lib/utils/merge.js");
401
401
 
402
402
  /***/ }),
403
403
  /* 27 */
404
404
  /***/ (function(module, exports) {
405
405
 
406
- module.exports = require("eoss/lib/utils/merge.js");
406
+ module.exports = require("eoss/lib/option");
407
407
 
408
408
  /***/ }),
409
409
  /* 28 */
410
410
  /***/ (function(module, exports) {
411
411
 
412
- module.exports = require("eoss/lib/option");
412
+ module.exports = require("eoss/lib/utils/clickoutside.js");
413
413
 
414
414
  /***/ }),
415
415
  /* 29 */
416
416
  /***/ (function(module, exports) {
417
417
 
418
- module.exports = require("eoss/lib/utils/clickoutside.js");
418
+ module.exports = require("eoss/lib/mixins/migrating.js");
419
419
 
420
420
  /***/ }),
421
421
  /* 30 */
422
422
  /***/ (function(module, exports) {
423
423
 
424
- module.exports = require("eoss/lib/mixins/migrating.js");
424
+ module.exports = require("eoss/lib/utils/scrollbar.js");
425
425
 
426
426
  /***/ }),
427
427
  /* 31 */
@@ -4097,7 +4097,7 @@ autocompletevue_type_template_id_2a7fb7a9_render._withStripped = true
4097
4097
  var external_throttle_debounce_ = __webpack_require__(11);
4098
4098
 
4099
4099
  // EXTERNAL MODULE: external "eoss/lib/utils/clickoutside.js"
4100
- var clickoutside_js_ = __webpack_require__(29);
4100
+ var clickoutside_js_ = __webpack_require__(28);
4101
4101
  var clickoutside_js_default = /*#__PURE__*/__webpack_require__.n(clickoutside_js_);
4102
4102
 
4103
4103
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=template&id=5bc092d2&
@@ -4273,7 +4273,7 @@ var autocomplete_suggestions_component = Object(componentNormalizer["a" /* defau
4273
4273
 
4274
4274
  /* harmony default export */ var autocomplete_suggestions = (autocomplete_suggestions_component.exports);
4275
4275
  // EXTERNAL MODULE: external "eoss/lib/mixins/migrating.js"
4276
- var migrating_js_ = __webpack_require__(30);
4276
+ var migrating_js_ = __webpack_require__(29);
4277
4277
  var migrating_js_default = /*#__PURE__*/__webpack_require__.n(migrating_js_);
4278
4278
 
4279
4279
  // EXTERNAL MODULE: external "eoss/lib/mixins/focus.js"
@@ -11831,11 +11831,11 @@ var store_Store = function () {
11831
11831
 
11832
11832
  /* harmony default export */ var src_store = (store_Store);
11833
11833
  // EXTERNAL MODULE: external "eoss/lib/utils/merge.js"
11834
- var merge_js_ = __webpack_require__(27);
11834
+ var merge_js_ = __webpack_require__(26);
11835
11835
  var merge_js_default = /*#__PURE__*/__webpack_require__.n(merge_js_);
11836
11836
 
11837
11837
  // EXTERNAL MODULE: external "eoss/lib/utils/scrollbar.js"
11838
- var scrollbar_js_ = __webpack_require__(25);
11838
+ var scrollbar_js_ = __webpack_require__(30);
11839
11839
 
11840
11840
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
11841
11841
  var cascader_panelvue_type_script_lang_js_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; };
@@ -17945,7 +17945,7 @@ cronvue_type_template_id_91c19ae2_render._withStripped = true
17945
17945
  // CONCATENATED MODULE: ./packages/cron/src/cron.vue?vue&type=template&id=91c19ae2&
17946
17946
 
17947
17947
  // EXTERNAL MODULE: external "eoss/lib/option"
17948
- var option_ = __webpack_require__(28);
17948
+ var option_ = __webpack_require__(27);
17949
17949
  var option_default = /*#__PURE__*/__webpack_require__.n(option_);
17950
17950
 
17951
17951
  // EXTERNAL MODULE: external "eoss/lib/tab-pane"
@@ -18999,8 +18999,8 @@ cron.install = function (Vue) {
18999
18999
  };
19000
19000
 
19001
19001
  /* harmony default export */ var packages_cron = (cron);
19002
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/data-table.vue?vue&type=template&id=a0d290e2&
19003
- var data_tablevue_type_template_id_a0d290e2_render = function () {
19002
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/data-table.vue?vue&type=template&id=0c0ac1b9&
19003
+ var data_tablevue_type_template_id_0c0ac1b9_render = function () {
19004
19004
  var _vm = this
19005
19005
  var _h = _vm.$createElement
19006
19006
  var _c = _vm._self._c || _h
@@ -19048,12 +19048,13 @@ var data_tablevue_type_template_id_a0d290e2_render = function () {
19048
19048
  {
19049
19049
  ref: "esTable",
19050
19050
  attrs: {
19051
- thead: _vm.thead,
19051
+ thead: _vm.theads,
19052
19052
  data: _vm.datas,
19053
19053
  height: _vm.tableHeight,
19054
19054
  readonly: _vm.readonly,
19055
19055
  "infinite-scroll": _vm.handleInfiniteScroll,
19056
19056
  "infinite-scroll-disabled": _vm.isInfiniteScrollDisabled,
19057
+ "show-summary": _vm.showSummary,
19057
19058
  },
19058
19059
  },
19059
19060
  "es-table",
@@ -19085,16 +19086,34 @@ var data_tablevue_type_template_id_a0d290e2_render = function () {
19085
19086
  )
19086
19087
  )
19087
19088
  : _vm._e(),
19089
+ _c(
19090
+ "es-dialog",
19091
+ {
19092
+ attrs: { title: "列表设置", visible: _vm.showSizer },
19093
+ on: {
19094
+ "update:visible": function ($event) {
19095
+ _vm.showSizer = $event
19096
+ },
19097
+ },
19098
+ },
19099
+ [
19100
+ _c("sizer", {
19101
+ attrs: { data: _vm.thead, "show-summary": _vm.showSummary },
19102
+ on: { confirm: _vm.mergeThead },
19103
+ }),
19104
+ ],
19105
+ 1
19106
+ ),
19088
19107
  _vm._t("default"),
19089
19108
  ],
19090
19109
  2
19091
19110
  )
19092
19111
  }
19093
- var data_tablevue_type_template_id_a0d290e2_staticRenderFns = []
19094
- data_tablevue_type_template_id_a0d290e2_render._withStripped = true
19112
+ var data_tablevue_type_template_id_0c0ac1b9_staticRenderFns = []
19113
+ data_tablevue_type_template_id_0c0ac1b9_render._withStripped = true
19095
19114
 
19096
19115
 
19097
- // CONCATENATED MODULE: ./packages/data-table/src/data-table.vue?vue&type=template&id=a0d290e2&
19116
+ // CONCATENATED MODULE: ./packages/data-table/src/data-table.vue?vue&type=template&id=0c0ac1b9&
19098
19117
 
19099
19118
  // EXTERNAL MODULE: external "eoss/lib/table"
19100
19119
  var table_ = __webpack_require__(58);
@@ -19239,6 +19258,277 @@ var pagination_default = /*#__PURE__*/__webpack_require__.n(pagination_);
19239
19258
  }
19240
19259
  }
19241
19260
  });
19261
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/sizer.vue?vue&type=template&id=8a8cface&
19262
+ var sizervue_type_template_id_8a8cface_render = function () {
19263
+ var _vm = this
19264
+ var _h = _vm.$createElement
19265
+ var _c = _vm._self._c || _h
19266
+ return _c(
19267
+ "div",
19268
+ [
19269
+ _c("es-table", {
19270
+ attrs: { height: "380px", data: _vm.rows, thead: _vm.thead },
19271
+ on: {
19272
+ "update:data": function ($event) {
19273
+ _vm.rows = $event
19274
+ },
19275
+ },
19276
+ }),
19277
+ _c(
19278
+ "div",
19279
+ { staticClass: "es-data-table__sizer-btn" },
19280
+ [
19281
+ _c(
19282
+ "es-button",
19283
+ {
19284
+ attrs: { type: "primary", size: "medium" },
19285
+ on: { click: _vm.handleConfirm },
19286
+ },
19287
+ [_vm._v("确定")]
19288
+ ),
19289
+ ],
19290
+ 1
19291
+ ),
19292
+ ],
19293
+ 1
19294
+ )
19295
+ }
19296
+ var sizervue_type_template_id_8a8cface_staticRenderFns = []
19297
+ sizervue_type_template_id_8a8cface_render._withStripped = true
19298
+
19299
+
19300
+ // CONCATENATED MODULE: ./packages/data-table/src/sizer.vue?vue&type=template&id=8a8cface&
19301
+
19302
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/sizer.vue?vue&type=script&lang=js&
19303
+ var sizervue_type_script_lang_js_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; };
19304
+
19305
+ function sizervue_type_script_lang_js_objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
19306
+
19307
+ //
19308
+ //
19309
+ //
19310
+ //
19311
+ //
19312
+ //
19313
+ //
19314
+ //
19315
+ //
19316
+ //
19317
+ //
19318
+
19319
+
19320
+
19321
+
19322
+ /* harmony default export */ var sizervue_type_script_lang_js_ = ({
19323
+ name: 'Sizer',
19324
+ components: { EsButton: button_default.a, EsDataTable: data_table },
19325
+
19326
+ props: {
19327
+ data: Array,
19328
+ showSummary: Boolean
19329
+ },
19330
+ computed: {
19331
+ thead: function thead() {
19332
+ var thead = [{
19333
+ type: 'drag'
19334
+ }, {
19335
+ title: '名称',
19336
+ field: 'title'
19337
+ }, {
19338
+ title: '锁定列位置',
19339
+ field: 'fixed',
19340
+ type: 'select',
19341
+ config: {
19342
+ clearable: true
19343
+ },
19344
+ optionData: [{
19345
+ value: 'left',
19346
+ name: '左'
19347
+ }, {
19348
+ value: 'right',
19349
+ name: '右'
19350
+ }]
19351
+ }, {
19352
+ title: '列是否显示',
19353
+ field: 'hide',
19354
+ type: 'switch',
19355
+ align: 'center',
19356
+ // row.hide 为「是否显示」(true=显示),与 thead.hide(true=隐藏)互反,
19357
+ // es-switch 的 ON(true)/OFF(false) 文案按显示语义对应
19358
+ config: {
19359
+ data: [{
19360
+ value: false,
19361
+ name: '隐藏'
19362
+ }, {
19363
+ value: true,
19364
+ name: '显示'
19365
+ }]
19366
+ }
19367
+ }];
19368
+ return this.showSummary ? [].concat(thead, [{
19369
+ title: '是否开启合计',
19370
+ field: 'total',
19371
+ type: 'switch',
19372
+ align: 'center',
19373
+ data: [{
19374
+ value: false,
19375
+ name: '关闭'
19376
+ }, {
19377
+ value: true,
19378
+ name: '开启'
19379
+ }]
19380
+ }]) : thead;
19381
+ }
19382
+ },
19383
+ data: function data() {
19384
+ return {
19385
+ visible: false,
19386
+ newThead: [],
19387
+ // sizer 表格行模型(活模型):拖拽顺序经 :data.sync 回写,
19388
+ // 锁定/显示/合计等编辑由 renderDom 的 setValue 直接写回行对象
19389
+ rows: []
19390
+ };
19391
+ },
19392
+ mounted: function mounted() {
19393
+ this.newThead = Object(util_js_["extend"])(true, [], this.data);
19394
+ this.getThead(this.data, this.rows);
19395
+ },
19396
+
19397
+ methods: {
19398
+ show: function show() {
19399
+ this.visible = true;
19400
+ },
19401
+ getThead: function getThead(res, data) {
19402
+ var _this = this;
19403
+
19404
+ res.forEach(function (item, index) {
19405
+ if (item.type !== 'index' && item.type !== 'selection' && item.type !== 'handle' && item.type !== 'drag') {
19406
+ var fixed = item.fixed,
19407
+ hide = item.hide,
19408
+ childHead = item.childHead,
19409
+ children = item.children,
19410
+ title = item.title,
19411
+ other = sizervue_type_script_lang_js_objectWithoutProperties(item, ['fixed', 'hide', 'childHead', 'children', 'title']);
19412
+
19413
+ var items = sizervue_type_script_lang_js_extends({
19414
+ title: title ? title : item.label,
19415
+ fixed: fixed === true ? 'left' : fixed === undefined || fixed === false ? '' : fixed,
19416
+ hide: hide ? false : true,
19417
+ id: index
19418
+ }, other);
19419
+ if (childHead && childHead.length) {
19420
+ var childHeads = [];
19421
+ _this.getThead(childHead, childHeads);
19422
+ items.childHead = childHeads;
19423
+ }
19424
+ if (children && children.length) {
19425
+ var _childHeads = [];
19426
+ _this.getThead(children, _childHeads);
19427
+ items.children = _childHeads;
19428
+ }
19429
+ data.push(items);
19430
+ }
19431
+ });
19432
+ },
19433
+ setThead: function setThead(res, thead) {
19434
+ var name = res.name,
19435
+ value = res.value,
19436
+ data = res.data;
19437
+
19438
+ for (var i in thead) {
19439
+ var item = thead[i];
19440
+ if (data.field === item.field) {
19441
+ thead[i][name] = name === 'hide' ? !value : value;
19442
+ thead[i].hide === false && delete thead[i].hide;
19443
+ break;
19444
+ } else {
19445
+ if (item.childHead && item.childHead.length) {
19446
+ this.setThead(res, item.childHead);
19447
+ }
19448
+ if (item.children && item.children.length) {
19449
+ this.setThead(res, item.children);
19450
+ }
19451
+ }
19452
+ }
19453
+ },
19454
+ handleConfirm: function handleConfirm() {
19455
+ var _this2 = this;
19456
+
19457
+ console.log(this.newThead, this.rows);
19458
+ this.visible = false;
19459
+ // rows 是拖拽+编辑后的活模型:按 field 把各列新值反写回 newThead
19460
+ // (取值映射与 getThead/setThead 的约定互逆),再按 rows 顺序重排,
19461
+ // drag/handle 等不在 rows 里的结构列保持原槽位不动
19462
+ var rowByField = {};
19463
+ this.rows.forEach(function (row) {
19464
+ rowByField[row.field] = row;
19465
+ });
19466
+ var applyRow = function applyRow(item) {
19467
+ var row = rowByField[item.field];
19468
+ if (row) {
19469
+ if (row.fixed === 'left') {
19470
+ item.fixed = true;
19471
+ } else if (row.fixed === 'right') {
19472
+ item.fixed = 'right';
19473
+ } else {
19474
+ delete item.fixed;
19475
+ }
19476
+ // row.hide 为「是否显示」,与 thead.hide(true=隐藏)互反,回写时取反;
19477
+ // false 时删键保持 thead 干净(与 setThead 的历史处理一致)
19478
+ item.hide = !row.hide;
19479
+ item.hide === false && delete item.hide;
19480
+ // 合计列在展示时把每列 total 标记显式回写:table-footer 默认对
19481
+ // 除 total===false 外的所有列求和,不显式化会把未开启合计的列也算进去
19482
+ if (_this2.showSummary || 'total' in row) {
19483
+ item.total = !!row.total;
19484
+ }
19485
+ }
19486
+ if (item.childHead && item.childHead.length) {
19487
+ item.childHead.forEach(applyRow);
19488
+ }
19489
+ if (item.children && item.children.length) {
19490
+ item.children.forEach(applyRow);
19491
+ }
19492
+ };
19493
+ this.newThead.forEach(applyRow);
19494
+ var order = this.rows.map(function (row) {
19495
+ return row.field;
19496
+ });
19497
+ var pool = this.newThead.filter(function (item) {
19498
+ return order.includes(item.field);
19499
+ }).sort(function (a, b) {
19500
+ return order.indexOf(a.field) - order.indexOf(b.field);
19501
+ });
19502
+ var i = 0;
19503
+ var merged = this.newThead.map(function (item) {
19504
+ return order.includes(item.field) ? pool[i++] : item;
19505
+ });
19506
+ this.$emit('confirm', merged);
19507
+ }
19508
+ }
19509
+ });
19510
+ // CONCATENATED MODULE: ./packages/data-table/src/sizer.vue?vue&type=script&lang=js&
19511
+ /* harmony default export */ var src_sizervue_type_script_lang_js_ = (sizervue_type_script_lang_js_);
19512
+ // CONCATENATED MODULE: ./packages/data-table/src/sizer.vue
19513
+
19514
+
19515
+
19516
+
19517
+
19518
+ /* normalize component */
19519
+
19520
+ var sizer_component = Object(componentNormalizer["a" /* default */])(
19521
+ src_sizervue_type_script_lang_js_,
19522
+ sizervue_type_template_id_8a8cface_render,
19523
+ sizervue_type_template_id_8a8cface_staticRenderFns,
19524
+ false,
19525
+ null,
19526
+ null,
19527
+ null
19528
+
19529
+ )
19530
+
19531
+ /* harmony default export */ var sizer = (sizer_component.exports);
19242
19532
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/data-table.vue?vue&type=script&lang=js&
19243
19533
  var data_tablevue_type_script_lang_js_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
19244
19534
 
@@ -19326,6 +19616,12 @@ var data_tablevue_type_script_lang_js_extends = Object.assign || function (targe
19326
19616
  //
19327
19617
  //
19328
19618
  //
19619
+ //
19620
+ //
19621
+ //
19622
+ //
19623
+ //
19624
+
19329
19625
 
19330
19626
 
19331
19627
 
@@ -19343,6 +19639,7 @@ var DEFAULT_PAGES = {
19343
19639
  name: 'EsDataTable',
19344
19640
  mixins: [table_methods],
19345
19641
  components: {
19642
+ sizer: sizer,
19346
19643
  EsTable: table_default.a,
19347
19644
  EsToolbar: toolbar_default.a,
19348
19645
  EsPagination: pagination_default.a
@@ -19440,7 +19737,11 @@ var DEFAULT_PAGES = {
19440
19737
  * @type {Boolean}
19441
19738
  * @default false
19442
19739
  */
19443
- infiniteScrollDisabled: Boolean
19740
+ infiniteScrollDisabled: Boolean,
19741
+ /**
19742
+ * 筛选列配置
19743
+ */
19744
+ showSummary: Boolean
19444
19745
  },
19445
19746
  computed: {
19446
19747
  /**
@@ -19496,7 +19797,12 @@ var DEFAULT_PAGES = {
19496
19797
  tableListeners: function tableListeners() {
19497
19798
  var _this = this;
19498
19799
 
19499
- var listeners = data_tablevue_type_script_lang_js_extends({}, this.$listeners);
19800
+ var listeners = data_tablevue_type_script_lang_js_extends({
19801
+ 'filter-column': function filterColumn() {
19802
+ console.log('filter-column');
19803
+ _this.showSizer = !_this.showSizer;
19804
+ }
19805
+ }, this.$listeners);
19500
19806
  var originChange = listeners.change;
19501
19807
  listeners.change = function () {
19502
19808
  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
@@ -19528,6 +19834,13 @@ var DEFAULT_PAGES = {
19528
19834
  this.getData(val);
19529
19835
  }
19530
19836
  },
19837
+ thead: {
19838
+ immediate: true,
19839
+ deep: true,
19840
+ handler: function handler(val) {
19841
+ this.theads = val;
19842
+ }
19843
+ },
19531
19844
  data: {
19532
19845
  immediate: true,
19533
19846
  deep: true,
@@ -19567,6 +19880,7 @@ var DEFAULT_PAGES = {
19567
19880
  },
19568
19881
  data: function data() {
19569
19882
  return {
19883
+ theads: [],
19570
19884
  toolbars: [],
19571
19885
  tableHeight: this.height,
19572
19886
  datas: [],
@@ -19578,7 +19892,8 @@ var DEFAULT_PAGES = {
19578
19892
  currentPage: 1,
19579
19893
  pageSize: 20
19580
19894
  },
19581
- isInfiniteScrollDisabled: this.infiniteScrollDisabled
19895
+ isInfiniteScrollDisabled: this.infiniteScrollDisabled,
19896
+ showSizer: false
19582
19897
  };
19583
19898
  },
19584
19899
  created: function created() {
@@ -19594,6 +19909,11 @@ var DEFAULT_PAGES = {
19594
19909
  },
19595
19910
 
19596
19911
  methods: {
19912
+ mergeThead: function mergeThead(thead) {
19913
+ this.showSizer = false;
19914
+ this.theads = thead;
19915
+ },
19916
+
19597
19917
  /**
19598
19918
  * 对外抛数据变化通知(:data.sync / v-model 承接)
19599
19919
  * @param {Array} val - 最新表格数据,默认当前 datas
@@ -19651,6 +19971,10 @@ var DEFAULT_PAGES = {
19651
19971
  * @param {Array} val - 表格数据
19652
19972
  */
19653
19973
  setDatas: function setDatas(val) {
19974
+ // 回写拦截:datas 对外 emit 后被 .sync 原样带回时与 datas 同引用,
19975
+ // 再走下面的空数据分支会每次新建引用,让 data watch 与 datas watch
19976
+ // 互相触发无限循环(拖拽排序先 emit [] 重置时必现,数组无限增长卡死页面)
19977
+ if (val === this.datas) return;
19654
19978
  if (!this.isTotal || !this.showPagination) {
19655
19979
  this.datas = val || [];
19656
19980
  return;
@@ -19663,7 +19987,8 @@ var DEFAULT_PAGES = {
19663
19987
  this.datas = val;
19664
19988
  }
19665
19989
  } else {
19666
- this.datas = [];
19990
+ // 复用传入引用而非新建 [],避免与 .sync 回写形成引用循环
19991
+ this.datas = val || [];
19667
19992
  }
19668
19993
  },
19669
19994
 
@@ -19833,8 +20158,8 @@ var DEFAULT_PAGES = {
19833
20158
 
19834
20159
  var data_table_component = Object(componentNormalizer["a" /* default */])(
19835
20160
  src_data_tablevue_type_script_lang_js_,
19836
- data_tablevue_type_template_id_a0d290e2_render,
19837
- data_tablevue_type_template_id_a0d290e2_staticRenderFns,
20161
+ data_tablevue_type_template_id_0c0ac1b9_render,
20162
+ data_tablevue_type_template_id_0c0ac1b9_staticRenderFns,
19838
20163
  false,
19839
20164
  null,
19840
20165
  null,
@@ -26870,8 +27195,8 @@ src_item.install = function install(Vue) {
26870
27195
  };
26871
27196
 
26872
27197
  /* harmony default export */ var descriptions_item = (src_item);
26873
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/dialog.vue?vue&type=template&id=3526f8eb&
26874
- var dialogvue_type_template_id_3526f8eb_render = function () {
27198
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/dialog.vue?vue&type=template&id=8f9d4b2c&
27199
+ var dialogvue_type_template_id_8f9d4b2c_render = function () {
26875
27200
  var _vm = this
26876
27201
  var _h = _vm.$createElement
26877
27202
  var _c = _vm._self._c || _h
@@ -27021,11 +27346,11 @@ var dialogvue_type_template_id_3526f8eb_render = function () {
27021
27346
  ]
27022
27347
  )
27023
27348
  }
27024
- var dialogvue_type_template_id_3526f8eb_staticRenderFns = []
27025
- dialogvue_type_template_id_3526f8eb_render._withStripped = true
27349
+ var dialogvue_type_template_id_8f9d4b2c_staticRenderFns = []
27350
+ dialogvue_type_template_id_8f9d4b2c_render._withStripped = true
27026
27351
 
27027
27352
 
27028
- // CONCATENATED MODULE: ./packages/dialog/src/dialog.vue?vue&type=template&id=3526f8eb&
27353
+ // CONCATENATED MODULE: ./packages/dialog/src/dialog.vue?vue&type=template&id=8f9d4b2c&
27029
27354
 
27030
27355
  // EXTERNAL MODULE: external "eoss/lib/utils/popup/popup-manager.js"
27031
27356
  var popup_manager_js_ = __webpack_require__(47);
@@ -27990,14 +28315,16 @@ var availHeight = 600;
27990
28315
  * 获取定位基准矩形(视口)
27991
28316
  * wujie 沙箱(非降级)下 document.body 为 shadowRoot.body,其 rect 只是子应用在主应用内的容器区域
27992
28317
  * (扣除了主应用侧栏/顶栏),fixed 定位的 dialog 用它居中、定边界会整体偏移;
27993
- * documentElement 的尺寸已被 wujie-polyfill 的 DocElementRectPlugin 修正为主应用视口值,改用它做基准;
28318
+ * 沙箱内 documentElement 仅在主应用注册了 wujie-polyfill 的 DocElementRectPlugin 时才被修正(如 eoss-ui 的 main 未注册),
28319
+ * 故直接通过 __WUJIE_RAW_WINDOW__ 取主应用真实视口尺寸做基准,不依赖主应用是否配置插件;
27994
28320
  * 降级模式与非微前端环境保持原有 document.body 基准不变
27995
28321
  */
27996
28322
  getViewportRect: function getViewportRect() {
27997
28323
  if (window.__WUJIE && !window.__WUJIE.degrade) {
27998
- var _document$documentEle = document.documentElement,
27999
- width = _document$documentEle.clientWidth,
28000
- height = _document$documentEle.clientHeight;
28324
+ var rawWindow = window.__WUJIE_RAW_WINDOW__ || window;
28325
+ var _rawWindow$document$d = rawWindow.document.documentElement,
28326
+ width = _rawWindow$document$d.clientWidth,
28327
+ height = _rawWindow$document$d.clientHeight;
28001
28328
 
28002
28329
  return { width: width, height: height, top: 0, left: 0 };
28003
28330
  }
@@ -28299,8 +28626,8 @@ var availHeight = 600;
28299
28626
 
28300
28627
  var dialog_component = Object(componentNormalizer["a" /* default */])(
28301
28628
  src_dialogvue_type_script_lang_js_,
28302
- dialogvue_type_template_id_3526f8eb_render,
28303
- dialogvue_type_template_id_3526f8eb_staticRenderFns,
28629
+ dialogvue_type_template_id_8f9d4b2c_render,
28630
+ dialogvue_type_template_id_8f9d4b2c_staticRenderFns,
28304
28631
  false,
28305
28632
  null,
28306
28633
  null,
@@ -68552,8 +68879,8 @@ flow_list_src_main.install = function (Vue) {
68552
68879
  };
68553
68880
 
68554
68881
  /* harmony default export */ var flow_list = (flow_list_src_main);
68555
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=template&id=00fbe61f&
68556
- var formvue_type_template_id_00fbe61f_render = function () {
68882
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=template&id=17d1941f&
68883
+ var formvue_type_template_id_17d1941f_render = function () {
68557
68884
  var _vm = this
68558
68885
  var _h = _vm.$createElement
68559
68886
  var _c = _vm._self._c || _h
@@ -68736,11 +69063,11 @@ var formvue_type_template_id_00fbe61f_render = function () {
68736
69063
  2
68737
69064
  )
68738
69065
  }
68739
- var formvue_type_template_id_00fbe61f_staticRenderFns = []
68740
- formvue_type_template_id_00fbe61f_render._withStripped = true
69066
+ var formvue_type_template_id_17d1941f_staticRenderFns = []
69067
+ formvue_type_template_id_17d1941f_render._withStripped = true
68741
69068
 
68742
69069
 
68743
- // CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=template&id=00fbe61f&
69070
+ // CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=template&id=17d1941f&
68744
69071
 
68745
69072
  // EXTERNAL MODULE: external "eoss/lib/utils/rules.js"
68746
69073
  var rules_js_ = __webpack_require__(62);
@@ -71784,11 +72111,12 @@ var formvue_type_script_lang_js_win = Object(util_js_["getWinTop"])();
71784
72111
  return this.$refs.scrollbar;
71785
72112
  },
71786
72113
 
71787
- // 滚动条样式
72114
+ // 滚动条样式:只声明滚动方向,原生滚动条由 CSS 隐藏(见 form.scss 的
72115
+ // .es-form-scroll),它不占位,也就不需要再按条宽加宽容器——那样在浏览器
72116
+ // 缩放时量到的 15px 和实际渲染宽度对不上,容器右侧会露出一条灰边
71788
72117
  scrollStyle: function scrollStyle() {
71789
72118
  if (!this.inline && !this.accordion) {
71790
- var barWidth = Object(scrollbar_js_["getScrollbarWidth"])();
71791
- return { width: 'calc(100% + ' + barWidth + 'px)', 'overflow-y': 'scroll' };
72119
+ return { 'overflow-y': 'scroll' };
71792
72120
  }
71793
72121
  return {};
71794
72122
  }
@@ -72470,8 +72798,8 @@ var formvue_type_script_lang_js_win = Object(util_js_["getWinTop"])();
72470
72798
 
72471
72799
  var src_form_component = Object(componentNormalizer["a" /* default */])(
72472
72800
  packages_form_src_formvue_type_script_lang_js_,
72473
- formvue_type_template_id_00fbe61f_render,
72474
- formvue_type_template_id_00fbe61f_staticRenderFns,
72801
+ formvue_type_template_id_17d1941f_render,
72802
+ formvue_type_template_id_17d1941f_staticRenderFns,
72475
72803
  false,
72476
72804
  null,
72477
72805
  null,
@@ -80598,8 +80926,8 @@ icon.install = function (Vue) {
80598
80926
  };
80599
80927
 
80600
80928
  /* harmony default export */ var packages_icon = (icon);
80601
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/icons/src/icons.vue?vue&type=template&id=3012fd9e&
80602
- var iconsvue_type_template_id_3012fd9e_render = function () {
80929
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/icons/src/icons.vue?vue&type=template&id=40e06ef0&
80930
+ var iconsvue_type_template_id_40e06ef0_render = function () {
80603
80931
  var _vm = this
80604
80932
  var _h = _vm.$createElement
80605
80933
  var _c = _vm._self._c || _h
@@ -80724,11 +81052,11 @@ var iconsvue_type_template_id_3012fd9e_render = function () {
80724
81052
  2
80725
81053
  )
80726
81054
  }
80727
- var iconsvue_type_template_id_3012fd9e_staticRenderFns = []
80728
- iconsvue_type_template_id_3012fd9e_render._withStripped = true
81055
+ var iconsvue_type_template_id_40e06ef0_staticRenderFns = []
81056
+ iconsvue_type_template_id_40e06ef0_render._withStripped = true
80729
81057
 
80730
81058
 
80731
- // CONCATENATED MODULE: ./packages/icons/src/icons.vue?vue&type=template&id=3012fd9e&
81059
+ // CONCATENATED MODULE: ./packages/icons/src/icons.vue?vue&type=template&id=40e06ef0&
80732
81060
 
80733
81061
  // CONCATENATED MODULE: ./packages/icons/src/icon.js
80734
81062
  /* harmony default export */ var src_icon = ([{
@@ -83411,7 +83739,7 @@ var iconsvue_type_script_lang_js_extends = Object.assign || function (target) {
83411
83739
  }
83412
83740
 
83413
83741
  var keyword = newVal.toLowerCase();
83414
- this.filteredIconsList = this.filterIcon(keyword);
83742
+ this.filteredIconsList = this.filterIcons(keyword);
83415
83743
  }),
83416
83744
  immediate: true
83417
83745
  }
@@ -83432,7 +83760,7 @@ var iconsvue_type_script_lang_js_extends = Object.assign || function (target) {
83432
83760
  * @param {string} keyword - 搜索关键词
83433
83761
  * @returns {Array} 过滤后的图标列表
83434
83762
  */
83435
- filterIcon: function filterIcon(keyword) {
83763
+ filterIcons: function filterIcons(keyword) {
83436
83764
  var _this = this;
83437
83765
 
83438
83766
  return this.allIcons.filter(function (name) {
@@ -83560,8 +83888,8 @@ var iconsvue_type_script_lang_js_extends = Object.assign || function (target) {
83560
83888
 
83561
83889
  var icons_component = Object(componentNormalizer["a" /* default */])(
83562
83890
  src_iconsvue_type_script_lang_js_,
83563
- iconsvue_type_template_id_3012fd9e_render,
83564
- iconsvue_type_template_id_3012fd9e_staticRenderFns,
83891
+ iconsvue_type_template_id_40e06ef0_render,
83892
+ iconsvue_type_template_id_40e06ef0_staticRenderFns,
83565
83893
  false,
83566
83894
  null,
83567
83895
  null,
@@ -90017,7 +90345,7 @@ lowcodevue_type_template_id_562c9876_render._withStripped = true
90017
90345
  // CONCATENATED MODULE: ./packages/lowcode/src/lowcode.vue?vue&type=template&id=562c9876&
90018
90346
 
90019
90347
  // EXTERNAL MODULE: external "eoss/lib/utils/bus.js"
90020
- var bus_js_ = __webpack_require__(26);
90348
+ var bus_js_ = __webpack_require__(25);
90021
90349
  var bus_js_default = /*#__PURE__*/__webpack_require__.n(bus_js_);
90022
90350
 
90023
90351
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/toolbar.vue?vue&type=template&id=2a1307ec&
@@ -107456,27 +107784,6 @@ var lowcode_view_default = /*#__PURE__*/__webpack_require__.n(lowcode_view_);
107456
107784
  type: 'text',
107457
107785
  contents: 'tooltipWidth'
107458
107786
  }]
107459
- }, {
107460
- name: 'dragSort',
107461
- type: 'switch',
107462
- default: false,
107463
- label: [{
107464
- type: 'tips',
107465
- contents: '是否行拖拽排序(需清除列固定)'
107466
- }, {
107467
- type: 'text',
107468
- contents: 'dragSort'
107469
- }]
107470
- }, {
107471
- name: 'dragSortClass',
107472
- type: 'text',
107473
- label: [{
107474
- type: 'tips',
107475
- contents: '行拖拽排序指示器(handle)类名'
107476
- }, {
107477
- type: 'text',
107478
- contents: 'dragSortClass'
107479
- }]
107480
107787
  }, {
107481
107788
  name: 'infiniteScroll',
107482
107789
  type: 'text',
@@ -107649,17 +107956,6 @@ var lowcode_view_default = /*#__PURE__*/__webpack_require__.n(lowcode_view_);
107649
107956
  type: 'text',
107650
107957
  contents: 'defaultExpandAll'
107651
107958
  }]
107652
- }, {
107653
- name: 'dragSort',
107654
- type: 'switch',
107655
- default: false,
107656
- label: [{
107657
- type: 'tips',
107658
- contents: '是否行拖拽排序'
107659
- }, {
107660
- type: 'text',
107661
- contents: 'dragSort'
107662
- }]
107663
107959
  }, {
107664
107960
  name: 'readonly',
107665
107961
  type: 'switch',
@@ -108061,17 +108357,6 @@ var lowcode_view_default = /*#__PURE__*/__webpack_require__.n(lowcode_view_);
108061
108357
  type: 'text',
108062
108358
  contents: 'executeFilter'
108063
108359
  }]
108064
- }, {
108065
- name: 'dragSortIcon',
108066
- type: 'text',
108067
- default: 'es-icon-caidan',
108068
- label: [{
108069
- type: 'tips',
108070
- contents: '行拖拽排序操作列图标'
108071
- }, {
108072
- type: 'text',
108073
- contents: 'dragSortIcon'
108074
- }]
108075
108360
  }]
108076
108361
  }, {
108077
108362
  name: 'EsTree',
@@ -127692,8 +127977,12 @@ function mixins_objectWithoutProperties(obj, keys) { var target = {}; for (var i
127692
127977
  open = item.open,
127693
127978
  extendData = item.extendData,
127694
127979
  rest = mixins_objectWithoutProperties(item, ['id', 'index', 'open', 'extendData']);
127980
+ // extendData 存在时以它为准,没有则回退到 item 自身的 open;
127981
+ // 原写法 `open || extendData ? Boolean(extendData.openStatus)` 在
127982
+ // 只声明了 open、没带 extendData 的菜单项上会直接抛错
127983
+
127695
127984
 
127696
- var openStatus = open || extendData ? Boolean(extendData.openStatus) : false;
127985
+ var openStatus = extendData ? Boolean(extendData.openStatus) : Boolean(open);
127697
127986
  var props = void 0;
127698
127987
  if (this.isFourthTabs) {
127699
127988
  if (item.children && item.children.length || item.fourthTabs && item.fourthTabs.length) {
@@ -127851,8 +128140,8 @@ menu_item_group.install = function (Vue) {
127851
128140
  };
127852
128141
 
127853
128142
  /* harmony default export */ var packages_menu_item_group = (menu_item_group);
127854
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu.vue?vue&type=template&id=31887554&
127855
- var menuvue_type_template_id_31887554_render = function () {
128143
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu.vue?vue&type=template&id=6eb83e82&
128144
+ var menuvue_type_template_id_6eb83e82_render = function () {
127856
128145
  var _vm = this
127857
128146
  var _h = _vm.$createElement
127858
128147
  var _c = _vm._self._c || _h
@@ -127946,14 +128235,14 @@ var menuvue_type_template_id_31887554_render = function () {
127946
128235
  1
127947
128236
  )
127948
128237
  }
127949
- var menuvue_type_template_id_31887554_staticRenderFns = []
127950
- menuvue_type_template_id_31887554_render._withStripped = true
128238
+ var menuvue_type_template_id_6eb83e82_staticRenderFns = []
128239
+ menuvue_type_template_id_6eb83e82_render._withStripped = true
127951
128240
 
127952
128241
 
127953
- // CONCATENATED MODULE: ./packages/menu/src/menu.vue?vue&type=template&id=31887554&
128242
+ // CONCATENATED MODULE: ./packages/menu/src/menu.vue?vue&type=template&id=6eb83e82&
127954
128243
 
127955
- // 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&
127956
- var submenuvue_type_template_id_09f0751a_render = function () {
128244
+ // 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&
128245
+ var submenuvue_type_template_id_87f03422_render = function () {
127957
128246
  var _vm = this
127958
128247
  var _h = _vm.$createElement
127959
128248
  var _c = _vm._self._c || _h
@@ -128163,8 +128452,11 @@ var submenuvue_type_template_id_09f0751a_render = function () {
128163
128452
  style: {
128164
128453
  backgroundColor:
128165
128454
  _vm.rootMenu.backgroundColor || "",
128455
+ // 原生条已由 CSS 隐藏(见 menu.scss 的
128456
+ // .es-menu-hidden > .es-menu--popup),不占位也就无需再用
128457
+ // marginRight: -条宽 把它推出容器——缩放时量到的 15px 和
128458
+ // 实际渲染宽度对不上,popup 右/下侧会露出一条灰边
128166
128459
  maxHeight: _vm.maxH === undefined ? "" : _vm.maxH,
128167
- marginRight: _vm.isScroll ? _vm.gutterWith : "",
128168
128460
  },
128169
128461
  attrs: { role: "menu" },
128170
128462
  },
@@ -128255,11 +128547,11 @@ var submenuvue_type_template_id_09f0751a_render = function () {
128255
128547
  2
128256
128548
  )
128257
128549
  }
128258
- var submenuvue_type_template_id_09f0751a_staticRenderFns = []
128259
- submenuvue_type_template_id_09f0751a_render._withStripped = true
128550
+ var submenuvue_type_template_id_87f03422_staticRenderFns = []
128551
+ submenuvue_type_template_id_87f03422_render._withStripped = true
128260
128552
 
128261
128553
 
128262
- // CONCATENATED MODULE: ./packages/menu/src/submenu.vue?vue&type=template&id=09f0751a&
128554
+ // CONCATENATED MODULE: ./packages/menu/src/submenu.vue?vue&type=template&id=87f03422&
128263
128555
 
128264
128556
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/submenu.vue?vue&type=script&lang=js&
128265
128557
  //
@@ -128425,7 +128717,9 @@ submenuvue_type_template_id_09f0751a_render._withStripped = true
128425
128717
  //
128426
128718
  //
128427
128719
  //
128428
-
128720
+ //
128721
+ //
128722
+ //
128429
128723
 
128430
128724
 
128431
128725
 
@@ -128659,9 +128953,6 @@ var poperMixins = {
128659
128953
  }
128660
128954
  return rootMenu.mode === 'horizontal' && isFirstLevel ? 'es-icon-xia' : 'es-icon-you';
128661
128955
  },
128662
- gutterWith: function gutterWith() {
128663
- return '-' + Object(scrollbar_js_["getScrollbarWidth"])() + 'px';
128664
- },
128665
128956
  iconClass: function iconClass() {
128666
128957
  return this.icon || this.rootMenu.parentMenuIcon || this.rootMenu.icon;
128667
128958
  },
@@ -128721,7 +129012,6 @@ var poperMixins = {
128721
129012
  items: {},
128722
129013
  submenus: {},
128723
129014
  mouseInChild: false,
128724
- isScroll: false,
128725
129015
  height: '',
128726
129016
  isHoveringTitle: false
128727
129017
  };
@@ -128864,11 +129154,8 @@ var poperMixins = {
128864
129154
 
128865
129155
  this.$nextTick(function () {
128866
129156
  var dom = _this5.$refs.menucontent;
128867
- if (dom && (dom.scrollHeight > dom.clientHeight || dom.offsetHeight > dom.clientHeight)) {
128868
- _this5.isScroll = true;
128869
- } else {
128870
- _this5.isScroll = false;
128871
- }
129157
+ // 只需要给 es-scrollbar 分支算高度;popup 分支的原生条由 CSS 隐藏,
129158
+ // 不再需要判定是否出了滚动条去抵消它的占位
128872
129159
  if (dom && _this5.maxH && dom.clientHeight > parseInt(_this5.maxH, 10)) {
128873
129160
  _this5.height = _this5.maxH;
128874
129161
  } else {
@@ -128893,8 +129180,8 @@ var poperMixins = {
128893
129180
 
128894
129181
  var submenu_component = Object(componentNormalizer["a" /* default */])(
128895
129182
  src_submenuvue_type_script_lang_js_,
128896
- submenuvue_type_template_id_09f0751a_render,
128897
- submenuvue_type_template_id_09f0751a_staticRenderFns,
129183
+ submenuvue_type_template_id_87f03422_render,
129184
+ submenuvue_type_template_id_87f03422_staticRenderFns,
128898
129185
  false,
128899
129186
  null,
128900
129187
  null,
@@ -129240,18 +129527,12 @@ var aria_menubar_js_default = /*#__PURE__*/__webpack_require__.n(aria_menubar_js
129240
129527
  isMenuPopup: function isMenuPopup() {
129241
129528
  return this.mode === 'horizontal' || this.mode === 'vertical' && this.collapse;
129242
129529
  },
129530
+
129531
+ // 菜单容器自身滚动,原生条由 CSS 隐藏(见 menu.scss 的 .es-menu-container),
129532
+ // 不占位也就无需按条宽加大容器把它推出去——那样在浏览器缩放时量到的 15px
129533
+ // 和实际渲染宽度对不上,容器右/下侧会露出一条灰边
129243
129534
  styles: function styles() {
129244
- // 优化:使用预计算的滚动条宽度,避免重复计算
129245
- var barWidth = this.scrollbarWidth;
129246
- return this.mode === 'horizontal' ? {
129247
- height: 'calc(100% + ' + barWidth + 'px)',
129248
- width: '100%',
129249
- 'overflow-x': 'scroll'
129250
- } : {
129251
- width: 'calc(100% + ' + barWidth + 'px)',
129252
- height: '100%',
129253
- 'overflow-y': 'scroll'
129254
- };
129535
+ return this.mode === 'horizontal' ? { height: '100%', width: '100%', 'overflow-x': 'scroll' } : { width: '100%', height: '100%', 'overflow-y': 'scroll' };
129255
129536
  }
129256
129537
  },
129257
129538
  watch: {
@@ -129301,8 +129582,7 @@ var aria_menubar_js_default = /*#__PURE__*/__webpack_require__.n(aria_menubar_js
129301
129582
  items: {},
129302
129583
  submenus: {},
129303
129584
  moveTo: 0,
129304
- barSize: 0,
129305
- scrollbarWidth: 0
129585
+ barSize: 0
129306
129586
  };
129307
129587
  },
129308
129588
  beforeCreate: function beforeCreate() {
@@ -129314,8 +129594,6 @@ var aria_menubar_js_default = /*#__PURE__*/__webpack_require__.n(aria_menubar_js
129314
129594
  },
129315
129595
  created: function created() {},
129316
129596
  mounted: function mounted() {
129317
- // 计算并存储滚动条宽度,避免重复计算
129318
- this.scrollbarWidth = Object(scrollbar_js_["getScrollbarWidth"])();
129319
129597
  this.initOpenedMenu();
129320
129598
  this.$on('item-click', this.handleItemClick);
129321
129599
  this.$on('submenu-click', this.handleSubmenuClick);
@@ -129587,8 +129865,8 @@ var aria_menubar_js_default = /*#__PURE__*/__webpack_require__.n(aria_menubar_js
129587
129865
 
129588
129866
  var menu_component = Object(componentNormalizer["a" /* default */])(
129589
129867
  src_menuvue_type_script_lang_js_,
129590
- menuvue_type_template_id_31887554_render,
129591
- menuvue_type_template_id_31887554_staticRenderFns,
129868
+ menuvue_type_template_id_6eb83e82_render,
129869
+ menuvue_type_template_id_6eb83e82_staticRenderFns,
129592
129870
  false,
129593
129871
  null,
129594
129872
  null,
@@ -138689,18 +138967,50 @@ var src_main_typeof = typeof Symbol === "function" && typeof Symbol.iterator ===
138689
138967
 
138690
138968
 
138691
138969
 
138970
+ // 数字或纯数字字符串补 px,其余形式(100%、inherit 等)原样透传
138971
+ function toCssSize(val) {
138972
+ var str = String(val).trim();
138973
+ return (/^-?\d+(\.\d+)?$/.test(str) ? str + 'px' : str
138974
+ );
138975
+ }
138692
138976
 
138693
- // 缓存 getScrollbarWidth 计算结果
138694
- var cachedScrollbarWidth = null;
138695
- function getCachedScrollbarWidth() {
138696
- if (cachedScrollbarWidth === null) {
138697
- cachedScrollbarWidth = Object(scrollbar_js_["getScrollbarWidth"])();
138698
- // 监听窗口大小变化,重置缓存
138699
- window.addEventListener('resize', function () {
138700
- cachedScrollbarWidth = null;
138701
- });
138977
+ // 把 'a: b; c-d: e' 形式的样式串解析成驼峰对象
138978
+ function parseStyleText(styleText) {
138979
+ var res = {};
138980
+ var list = String(styleText || '').split(';');
138981
+ for (var i = 0; i < list.length; i++) {
138982
+ var item = list[i];
138983
+ var index = item.indexOf(':');
138984
+ if (index < 0) continue;
138985
+ var key = item.slice(0, index).trim();
138986
+ if (!key) continue;
138987
+ res[key.replace(/-(\w)/g, function (match, letter) {
138988
+ return letter.toUpperCase();
138989
+ })] = item.slice(index + 1).trim();
138990
+ }
138991
+ return res;
138992
+ }
138993
+
138994
+ // wrap-style 可以是 String / Object / Array,统一归一化成新对象:
138995
+ // Vue 2 仅解析绑定为字符串的顶层 style,数组里的字符串项会被丢掉,
138996
+ // 另外也不能直接在传入的对象上写字段,避免变更 prop
138997
+ function normalizeWrapStyle(val) {
138998
+ if (typeof val === 'string') {
138999
+ return parseStyleText(val);
139000
+ }
139001
+ if (Array.isArray(val)) {
139002
+ return Object(util_js_["toObject"])(val.map(function (item) {
139003
+ return typeof item === 'string' ? parseStyleText(item) : item || {};
139004
+ }));
139005
+ }
139006
+ var res = {};
139007
+ var source = val || {};
139008
+ for (var key in source) {
139009
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
139010
+ res[key] = source[key];
139011
+ }
138702
139012
  }
138703
- return cachedScrollbarWidth;
139013
+ return res;
138704
139014
  }
138705
139015
 
138706
139016
  /* istanbul ignore next */
@@ -138795,7 +139105,6 @@ function getCachedScrollbarWidth() {
138795
139105
  sizeHeight: '0',
138796
139106
  moveX: 0,
138797
139107
  moveY: 0,
138798
- height: null,
138799
139108
  initialized: false,
138800
139109
  isHovering: false,
138801
139110
  hideTimer: null,
@@ -138826,44 +139135,25 @@ function getCachedScrollbarWidth() {
138826
139135
  }
138827
139136
  },
138828
139137
 
138829
- // 在 render 方法中使用缓存
138830
139138
  render: function render(h) {
138831
- var gutter = getCachedScrollbarWidth();
138832
- var style = this.wrapStyle;
138833
- if (gutter) {
138834
- var gutterWith = '-' + gutter + 'px';
138835
- var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
138836
- if (this.styles || this.height || this.maxHeight) {
138837
- var height = this.height || this.styles && this.styles.height;
138838
- if (height === '100%') {
138839
- gutterStyle += 'height:calc(100% + ' + gutter + 'px);';
138840
- } else {
138841
- gutterStyle += height ? 'height:' + (parseInt(height, 10) + gutter) + 'px' : '';
138842
- }
138843
- var maxHeight = this.maxHeight || this.styles && this.styles.maxHeight || this.styles && this.styles['max-height'];
138844
- if (maxHeight === '100%') {
138845
- gutterStyle += 'max-height:calc(100% + ' + gutter + 'px);';
138846
- } else {
138847
- gutterStyle += maxHeight ? 'max-height:' + parseInt(maxHeight, 10) + 'px' : '';
138848
- }
138849
- } else {
138850
- gutterStyle += 'height:calc(100% + ' + gutter + 'px);';
138851
- }
139139
+ // wrap 内联样式只负责高度声明与自定义样式,不再做原生滚动条的占位补偿:
139140
+ // 原生滚动条已由 CSS 隐藏(--hidden-default 恒挂,IE 走 -ms-overflow-style),
139141
+ // 本身不占位;此前的负 margin + calc(100% + gutter) 在浏览器缩放时,量取的
139142
+ // gutter 取整宽度和实际渲染宽度对不上,底部/右侧就会露出一条灰边。
139143
+ var wrapStyles = normalizeWrapStyle(this.wrapStyle);
139144
+ var height = this.styles && this.styles.height;
139145
+ var maxHeight = this.maxHeight || this.styles && (this.styles.maxHeight || this.styles['max-height']);
138852
139146
 
138853
- if (Array.isArray(this.wrapStyle)) {
138854
- style = Object(util_js_["toObject"])(this.wrapStyle);
138855
- style.marginRight = style.marginBottom = gutterWith;
138856
- if (!style.height && !style.maxHeight) {
138857
- style.height = '100%';
138858
- }
138859
- } else if (typeof this.wrapStyle === 'string') {
138860
- style += gutterStyle;
138861
- } else {
138862
- style = gutterStyle;
138863
- }
138864
- } else {
138865
- style = 'height:100%;';
139147
+ // 已有的键不覆盖,保证用户显式写的 wrap-style 优先
139148
+ if (height && wrapStyles.height === undefined) {
139149
+ wrapStyles.height = toCssSize(height);
138866
139150
  }
139151
+ if (maxHeight && wrapStyles.maxHeight === undefined) {
139152
+ wrapStyles.maxHeight = toCssSize(maxHeight);
139153
+ }
139154
+
139155
+ var hasStyle = Object.keys(wrapStyles).length > 0;
139156
+ var style = hasStyle ? wrapStyles : undefined;
138867
139157
 
138868
139158
  // 虚拟滚动实现
138869
139159
  var view = h(this.tag, {
@@ -138881,7 +139171,7 @@ function getCachedScrollbarWidth() {
138881
139171
  'scroll': this.handleScroll
138882
139172
  },
138883
139173
 
138884
- 'class': [this.wrapClass, 'es-scrollbar__wrap', gutter ? '' : 'es-scrollbar__wrap--hidden-default']
139174
+ 'class': [this.wrapClass, 'es-scrollbar__wrap es-scrollbar__wrap--hidden-default']
138885
139175
  },
138886
139176
  [[view]]
138887
139177
  );
@@ -138919,8 +139209,12 @@ function getCachedScrollbarWidth() {
138919
139209
  'div',
138920
139210
  {
138921
139211
  ref: 'wrap',
138922
- 'class': [this.wrapClass, 'es-scrollbar__wrap'],
138923
- style: style
139212
+ style: style,
139213
+ on: {
139214
+ 'scroll': this.handleScroll
139215
+ },
139216
+
139217
+ 'class': [this.wrapClass, 'es-scrollbar__wrap']
138924
139218
  },
138925
139219
  [[view]]
138926
139220
  )];
@@ -139249,18 +139543,8 @@ function getCachedScrollbarWidth() {
139249
139543
  var wrap = _this5.wrap;
139250
139544
  if (!wrap) return;
139251
139545
 
139252
- // 确保 wrap 元素有正确的高度设置,特别是在嵌套场景下
139253
- if (!wrap.style.height && !wrap.style.maxHeight && !_this5.height && !_this5.maxHeight) {
139254
- // 如果没有设置高度,尝试从父元素获取
139255
- var parent = wrap.parentNode;
139256
- if (parent && parent.style.height) {
139257
- wrap.style.height = parent.style.height;
139258
- } else if (parent && parent.style.maxHeight) {
139259
- wrap.style.height = parent.style.maxHeight;
139260
- } else if (parent && parent.clientHeight) {
139261
- wrap.style.height = parent.clientHeight + 'px';
139262
- }
139263
- }
139546
+ // wrap 高度:CSS 给默认的 height: 100%,需要限高时由调用方通过
139547
+ // max-height / wrap-style 声明(组件自身的 wrap-class 限高不受干扰)
139264
139548
 
139265
139549
  // 缓存计算值
139266
139550
  var clientHeight = wrap.clientHeight;
@@ -139281,18 +139565,6 @@ function getCachedScrollbarWidth() {
139281
139565
  }
139282
139566
 
139283
139567
  _this5.onReady && _this5.onReady(_this5.sizeHeight, _this5.sizeWidth);
139284
-
139285
- // 延迟执行高度计算逻辑
139286
- requestAnimationFrame(function () {
139287
- var maxH = wrap.parentNode.style['max-height'];
139288
- if (maxH) {
139289
- maxH = parseInt(maxH, 10);
139290
- var gutter = getCachedScrollbarWidth();
139291
- if (wrap.offsetHeight - gutter > maxH) {
139292
- _this5.height = maxH;
139293
- }
139294
- }
139295
- });
139296
139568
  });
139297
139569
  },
139298
139570
 
@@ -139373,8 +139645,8 @@ scrollbar_src_main.install = function (Vue) {
139373
139645
  };
139374
139646
 
139375
139647
  /* harmony default export */ var packages_scrollbar = (scrollbar_src_main);
139376
- // 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&
139377
- var selectvue_type_template_id_5f1334b0_render = function () {
139648
+ // 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&
139649
+ var selectvue_type_template_id_4639eab5_render = function () {
139378
139650
  var _vm = this
139379
139651
  var _h = _vm.$createElement
139380
139652
  var _c = _vm._self._c || _h
@@ -140105,11 +140377,11 @@ var selectvue_type_template_id_5f1334b0_render = function () {
140105
140377
  2
140106
140378
  )
140107
140379
  }
140108
- var selectvue_type_template_id_5f1334b0_staticRenderFns = []
140109
- selectvue_type_template_id_5f1334b0_render._withStripped = true
140380
+ var selectvue_type_template_id_4639eab5_staticRenderFns = []
140381
+ selectvue_type_template_id_4639eab5_render._withStripped = true
140110
140382
 
140111
140383
 
140112
- // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=5f1334b0&
140384
+ // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=4639eab5&
140113
140385
 
140114
140386
  // 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-dropdown.vue?vue&type=template&id=3d0b907d&
140115
140387
  var select_dropdownvue_type_template_id_3d0b907d_render = function () {
@@ -141687,6 +141959,10 @@ var selectvue_type_script_lang_js_this = undefined;
141687
141959
 
141688
141960
 
141689
141961
  results: {
141962
+ // 树形模式的 options 完全由 data/results 驱动(树节点不是 es-option,不会自注册),
141963
+ // 必须 immediate:否则静态传入 data 时 results 初始化不触发 watcher,
141964
+ // options 恒为 [],下拉被 v-show="options.length > 0" 隐藏并显示「无数据」
141965
+ immediate: true,
141690
141966
  deep: true,
141691
141967
  handler: function handler(val) {
141692
141968
  if (this.tree) {
@@ -142280,11 +142556,17 @@ var selectvue_type_script_lang_js_this = undefined;
142280
142556
  if (this.filterable) this.$refs.input.focus();
142281
142557
  this.resetInputHeight();
142282
142558
  } else {
142559
+ var selectValue = option.value;
142283
142560
  if (this.valueType === 'string') {
142284
- this.$emit('input', Object(util_js_["getValueByPath"])(option.value, this.actualValueKey));
142285
- } else {
142286
- this.$emit('input', option.value);
142561
+ selectValue = Object(util_js_["getValueByPath"])(option.value, this.actualValueKey);
142562
+ // 树节点未提供 value-key 对应字段时取值为 undefined,直接写入 v-model 会让
142563
+ // setSelected 解析不出 label(表现为选中后不回显),此处退回整节点对象,
142564
+ // 由 getOption 的对象分支按 label-key 取标签
142565
+ if (this.tree && selectValue === undefined) {
142566
+ selectValue = option.value;
142567
+ }
142287
142568
  }
142569
+ this.$emit('input', selectValue);
142288
142570
  this.emitChange(option.value);
142289
142571
  this.visible = false;
142290
142572
  }
@@ -142508,8 +142790,8 @@ var selectvue_type_script_lang_js_this = undefined;
142508
142790
 
142509
142791
  var select_component = Object(componentNormalizer["a" /* default */])(
142510
142792
  src_selectvue_type_script_lang_js_,
142511
- selectvue_type_template_id_5f1334b0_render,
142512
- selectvue_type_template_id_5f1334b0_staticRenderFns,
142793
+ selectvue_type_template_id_4639eab5_render,
142794
+ selectvue_type_template_id_4639eab5_staticRenderFns,
142513
142795
  false,
142514
142796
  null,
142515
142797
  null,
@@ -142526,8 +142808,8 @@ src_select.install = function (Vue) {
142526
142808
  };
142527
142809
 
142528
142810
  /* harmony default export */ var packages_select = (src_select);
142529
- // 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&
142530
- var selectorvue_type_template_id_015c6e04_render = function () {
142811
+ // 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&
142812
+ var selectorvue_type_template_id_950e8dd4_render = function () {
142531
142813
  var _vm = this
142532
142814
  var _h = _vm.$createElement
142533
142815
  var _c = _vm._self._c || _h
@@ -142783,11 +143065,11 @@ var selectorvue_type_template_id_015c6e04_render = function () {
142783
143065
  )
142784
143066
  : _vm._e()
142785
143067
  }
142786
- var selectorvue_type_template_id_015c6e04_staticRenderFns = []
142787
- selectorvue_type_template_id_015c6e04_render._withStripped = true
143068
+ var selectorvue_type_template_id_950e8dd4_staticRenderFns = []
143069
+ selectorvue_type_template_id_950e8dd4_render._withStripped = true
142788
143070
 
142789
143071
 
142790
- // CONCATENATED MODULE: ./packages/selector/src/selector.vue?vue&type=template&id=015c6e04&
143072
+ // CONCATENATED MODULE: ./packages/selector/src/selector.vue?vue&type=template&id=950e8dd4&
142791
143073
 
142792
143074
  // EXTERNAL MODULE: external "eoss/lib/autocomplete"
142793
143075
  var autocomplete_ = __webpack_require__(120);
@@ -143381,8 +143663,7 @@ var selectorvue_type_script_lang_js_extends = Object.assign || function (target)
143381
143663
  timer: null,
143382
143664
  tagsHeight: 0,
143383
143665
  moveTo: 0,
143384
- barSize: 0,
143385
- scrollbarWidth: 0
143666
+ barSize: 0
143386
143667
  };
143387
143668
  },
143388
143669
 
@@ -143390,12 +143671,12 @@ var selectorvue_type_script_lang_js_extends = Object.assign || function (target)
143390
143671
  styles: function styles() {
143391
143672
  return this.tagsHeight ? { 'max-height': this.tagsHeight + 'px', overflow: 'hidden' } : {};
143392
143673
  },
143674
+
143675
+ // tags 折叠限高时内层容器自身滚动,原生条由 CSS 隐藏(见 selector.scss),
143676
+ // 不占位也就无需按条宽加宽容器把它推出去——那样在浏览器缩放时量到的
143677
+ // 15px 和实际渲染宽度对不上,右侧会露出一条灰边
143393
143678
  tagsStyle: function tagsStyle() {
143394
- return this.tagsHeight ? {
143395
- 'max-height': this.tagsHeight + 'px',
143396
- overflowY: 'scroll',
143397
- width: 'calc(100% + ' + this.scrollbarWidth + 'px)'
143398
- } : {};
143679
+ return this.tagsHeight ? { 'max-height': this.tagsHeight + 'px', overflowY: 'scroll' } : {};
143399
143680
  },
143400
143681
 
143401
143682
  // 滚动容器
@@ -143516,7 +143797,6 @@ var selectorvue_type_script_lang_js_extends = Object.assign || function (target)
143516
143797
  mounted: function mounted() {
143517
143798
  var _this2 = this;
143518
143799
 
143519
- this.scrollbarWidth = Object(scrollbar_js_["getScrollbarWidth"])();
143520
143800
  //this.resetInputHeight();
143521
143801
  if (this.filterable) {
143522
143802
  this.$nextTick(function () {
@@ -143827,8 +144107,8 @@ var selectorvue_type_script_lang_js_extends = Object.assign || function (target)
143827
144107
 
143828
144108
  var selector_component = Object(componentNormalizer["a" /* default */])(
143829
144109
  src_selectorvue_type_script_lang_js_,
143830
- selectorvue_type_template_id_015c6e04_render,
143831
- selectorvue_type_template_id_015c6e04_staticRenderFns,
144110
+ selectorvue_type_template_id_950e8dd4_render,
144111
+ selectorvue_type_template_id_950e8dd4_staticRenderFns,
143832
144112
  false,
143833
144113
  null,
143834
144114
  null,
@@ -148118,8 +148398,8 @@ src_switch.install = function (Vue) {
148118
148398
  };
148119
148399
 
148120
148400
  /* harmony default export */ var packages_switch = (src_switch);
148121
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=template&id=10e33a98&
148122
- var tablevue_type_template_id_10e33a98_render = function () {
148401
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=template&id=4f193eb2&
148402
+ var tablevue_type_template_id_4f193eb2_render = function () {
148123
148403
  var _vm = this
148124
148404
  var _h = _vm.$createElement
148125
148405
  var _c = _vm._self._c || _h
@@ -148327,7 +148607,7 @@ var tablevue_type_template_id_10e33a98_render = function () {
148327
148607
  1
148328
148608
  )
148329
148609
  : _vm._e(),
148330
- _vm.fixedColumns.length > 0 && !_vm.dragSort
148610
+ _vm.fixedColumns.length > 0 && !_vm.dragEnabled
148331
148611
  ? _c(
148332
148612
  "div",
148333
148613
  {
@@ -148485,7 +148765,7 @@ var tablevue_type_template_id_10e33a98_render = function () {
148485
148765
  ]
148486
148766
  )
148487
148767
  : _vm._e(),
148488
- _vm.rightFixedColumns.length > 0 && !_vm.dragSort
148768
+ _vm.rightFixedColumns.length > 0 && !_vm.dragEnabled
148489
148769
  ? _c(
148490
148770
  "div",
148491
148771
  {
@@ -148689,11 +148969,11 @@ var tablevue_type_template_id_10e33a98_render = function () {
148689
148969
  2
148690
148970
  )
148691
148971
  }
148692
- var tablevue_type_template_id_10e33a98_staticRenderFns = []
148693
- tablevue_type_template_id_10e33a98_render._withStripped = true
148972
+ var tablevue_type_template_id_4f193eb2_staticRenderFns = []
148973
+ tablevue_type_template_id_4f193eb2_render._withStripped = true
148694
148974
 
148695
148975
 
148696
- // CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=template&id=10e33a98&
148976
+ // CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=template&id=4f193eb2&
148697
148977
 
148698
148978
  // EXTERNAL MODULE: external "eoss/lib/directives/mousewheel.js"
148699
148979
  var mousewheel_js_ = __webpack_require__(122);
@@ -148726,6 +149006,13 @@ var cellStarts = {
148726
149006
  minWidth: 48,
148727
149007
  realWidth: 48,
148728
149008
  order: ''
149009
+ },
149010
+ drag: {
149011
+ width: 48,
149012
+ minWidth: 48,
149013
+ realWidth: 48,
149014
+ order: '',
149015
+ className: 'es-table__drag-column'
148729
149016
  }
148730
149017
  };
148731
149018
 
@@ -148890,6 +149177,51 @@ var cellForced = {
148890
149177
  sortable: false,
148891
149178
  resizable: false,
148892
149179
  className: 'es-table__expand-column'
149180
+ },
149181
+
149182
+ drag: {
149183
+ /**
149184
+ * 拖拽列默认不渲染表头文案
149185
+ * @param {Function} h - createElement函数
149186
+ * @param {Object} options - 包含列配置的对象
149187
+ * @returns {VNode} Vue虚拟节点
149188
+ */
149189
+ renderHeader: function renderHeader(h, _ref7) {
149190
+ var column = _ref7.column;
149191
+
149192
+ return column.label || '';
149193
+ },
149194
+
149195
+ /**
149196
+ * 渲染拖拽手柄图标:这一列存在即代表开启行拖拽排序(见 table.vue 的
149197
+ * dragEnabled),Sortable 的 handle 指向 es-table__drag-handle。
149198
+ * rules 为函数时按行判定(返回假值该行不可拖),rules 显式为 false 时
149199
+ * 整列不可拖;不可拖时不给手柄类,Sortable 自然拖不动该行
149200
+ * @param {Function} h - createElement函数
149201
+ * @param {Object} options - 包含行数据、列配置等的对象
149202
+ * @returns {VNode} Vue虚拟节点
149203
+ */
149204
+ renderCell: function renderCell(h, _ref8) {
149205
+ var row = _ref8.row,
149206
+ column = _ref8.column,
149207
+ $index = _ref8.$index,
149208
+ store = _ref8.store;
149209
+
149210
+ var rules = column.rules;
149211
+ var byRules = typeof rules === 'function' ? rules(row, { row: row, column: column, $index: $index, store: store }) !== false : rules !== false;
149212
+ // 行数据 fixed 为 true 的行本来就不可拖(tr 上的 drag-sort-disabled
149213
+ // 会被 Sortable 的 filter 拦掉),图标同步置灰
149214
+ var enabled = byRules && !(row && row.fixed);
149215
+ var classes = ['es-icon-tuozhuai'];
149216
+ if (enabled) {
149217
+ classes.push('es-table__drag-handle');
149218
+ } else {
149219
+ classes.push('is-disabled');
149220
+ }
149221
+ return h('i', { 'class': classes });
149222
+ },
149223
+ sortable: false,
149224
+ resizable: false
148893
149225
  }
148894
149226
  };
148895
149227
  // CONCATENATED MODULE: ./packages/table/src/util.js
@@ -150652,7 +150984,12 @@ var doFlattenColumns = function doFlattenColumns(columns) {
150652
150984
  */
150653
150985
  updateColumns: function updateColumns() {
150654
150986
  var states = this.states;
150655
- var _columns = states._columns || [];
150987
+ // hide 是「是否隐藏列」的列级契约(文档 thead 列配置):隐藏列不参与
150988
+ // 渲染与布局,在列构建入口统一剔除,首屏与运行中换 thead(setThead)
150989
+ // 都经这一条路径生效;states._columns 仍保留全量供增删列等操作使用
150990
+ var _columns = (states._columns || []).filter(function (column) {
150991
+ return !column.hide;
150992
+ });
150656
150993
 
150657
150994
  // 计算固定列和右侧固定列
150658
150995
  states.fixedColumns = _columns.filter(function (column) {
@@ -150668,11 +151005,17 @@ var doFlattenColumns = function doFlattenColumns(columns) {
150668
151005
  states.fixedColumns.unshift(_columns[0]);
150669
151006
  }
150670
151007
 
151008
+ // 开启拖拽排序时左右固定层不渲染(见 table.vue 的 dragEnabled),fixed 不生效,
151009
+ // 也就不做「固定列前置」重排,保持声明顺序,避免列序被静默打乱
151010
+ var dragEnabled = _columns.some(function (column) {
151011
+ return column.type === 'drag';
151012
+ });
151013
+
150671
151014
  // 计算非固定列并生成原始列配置
150672
151015
  var notFixedColumns = _columns.filter(function (column) {
150673
151016
  return !column.fixed;
150674
151017
  });
150675
- states.originColumns = [].concat(states.fixedColumns, notFixedColumns, states.rightFixedColumns);
151018
+ states.originColumns = dragEnabled ? [].concat(_columns) : [].concat(states.fixedColumns, notFixedColumns, states.rightFixedColumns);
150676
151019
 
150677
151020
  // 扁平化各类列配置
150678
151021
  var leafColumns = doFlattenColumns(notFixedColumns);
@@ -150685,7 +151028,7 @@ var doFlattenColumns = function doFlattenColumns(columns) {
150685
151028
  states.rightFixedLeafColumnsLength = rightFixedLeafColumns.length;
150686
151029
 
150687
151030
  // 生成最终的列配置和复杂度标记
150688
- states.columns = [].concat(fixedLeafColumns, leafColumns, rightFixedLeafColumns);
151031
+ states.columns = dragEnabled ? doFlattenColumns(_columns) : [].concat(fixedLeafColumns, leafColumns, rightFixedLeafColumns);
150689
151032
  states.isComplex = states.fixedColumns.length > 0 || states.rightFixedColumns.length > 0;
150690
151033
  },
150691
151034
 
@@ -151279,14 +151622,17 @@ watcher.prototype.mutations = {
151279
151622
  // 特殊类型列不设置默认 renderHeader,交由 setColumnRenders 应用 cellForced 的强制渲染(如 selection 复选框)
151280
151623
  var columnId = 'es-table_1_column_' + Math.floor(Math.random() * 10000);
151281
151624
  var column = null;
151282
- if (type === 'selection' || type === 'index' || type === 'expand') {
151625
+ if (type === 'selection' || type === 'index' || type === 'expand' || type === 'drag') {
151283
151626
  column = store_extends({
151284
151627
  id: columnId,
151285
151628
  type: type,
151286
151629
  label: _label,
151287
151630
  prop: _field,
151288
151631
  property: _field
151289
- }, cellStarts[type], normalized, config);
151632
+ }, cellStarts[type], normalized, config, {
151633
+ // drag 列用 rules 控制行是否可拖(见 config.js)
151634
+ rules: rules
151635
+ });
151290
151636
  } else {
151291
151637
  column = store_extends({
151292
151638
  id: columnId,
@@ -151295,7 +151641,9 @@ watcher.prototype.mutations = {
151295
151641
  property: _field,
151296
151642
  formatter: formatter
151297
151643
  }, normalized, {
151298
- required: _required
151644
+ required: _required,
151645
+ // 保留 rules 到列对象:drag 列用它控制行是否可拖(见 config.js)
151646
+ rules: rules
151299
151647
  });
151300
151648
  }
151301
151649
  var childrens = null;
@@ -151467,7 +151815,7 @@ watcher.prototype.mutations = {
151467
151815
  };
151468
151816
  } else if (children) {
151469
151817
  column.children = createColumns(children);
151470
- } else if (type === 'selection' || type === 'index' || type === 'expand') {
151818
+ } else if (type === 'selection' || type === 'index' || type === 'expand' || type === 'drag') {
151471
151819
  // 特殊类型列不设置默认 renderCell,由 setColumnRenders 套用 cellForced 中的强制渲染函数
151472
151820
  } else {
151473
151821
  // 如果用户配置了render函数,则使用用户的render函数
@@ -151549,6 +151897,11 @@ watcher.prototype.mutations = {
151549
151897
 
151550
151898
  states._columns = createColumns(thead);
151551
151899
  this.updateColumns();
151900
+ // 换 thead 后列对象全部新建、realWidth 为空,若不重排布局,
151901
+ // 表头与表体 colgroup 会各自按内容回退自动表格布局,列宽错位(sizer 确认改表头后必现)
151902
+ if (this.table && this.table.$ready) {
151903
+ this.scheduleLayout();
151904
+ }
151552
151905
  },
151553
151906
 
151554
151907
 
@@ -152977,8 +153330,8 @@ var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator =
152977
153330
  },
152978
153331
 
152979
153332
 
152980
- // 监听拖拽排序配置变化
152981
- '$parent.dragSort': function $parentDragSort(val) {
153333
+ // 监听拖拽列(type: 'drag')的增删,有则开启拖拽排序
153334
+ 'table.dragEnabled': function tableDragEnabled(val) {
152982
153335
  if (val) {
152983
153336
  this.initSortable();
152984
153337
  } else {
@@ -153001,7 +153354,7 @@ var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator =
153001
153354
  });
153002
153355
  },
153003
153356
  mounted: function mounted() {
153004
- if (this.$parent.dragSort) {
153357
+ if (this.table.dragEnabled) {
153005
153358
  this.initSortable();
153006
153359
  }
153007
153360
  },
@@ -153026,7 +153379,9 @@ var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator =
153026
153379
  this.$nextTick(function () {
153027
153380
  try {
153028
153381
  _this3._sortable = new external_sortablejs_default.a(_this3.$refs.dragSort, {
153029
- handle: _this3.$parent.dragSortClass ? '.' + _this3.$parent.dragSortClass : undefined,
153382
+ // 手柄就是拖拽列里的图标;不可拖的行(rules 判定为假、
153383
+ // 或行数据 fixed 为 true)不带这个类,因此拖不动
153384
+ handle: '.es-table__drag-handle',
153030
153385
  animation: 150,
153031
153386
  onUpdate: _this3.handleUpdate,
153032
153387
  filter: '.drag-sort-disabled'
@@ -153076,6 +153431,9 @@ var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator =
153076
153431
  } else if (this.fixed === 'right') {
153077
153432
  return index < this.columnsCount - this.rightFixedLeafCount;
153078
153433
  } else {
153434
+ // 开启拖拽排序时左右固定层不渲染(见 table.vue 的 dragEnabled),
153435
+ // 固定列只能靠主表显示,不能再用 is-hidden 藏起来
153436
+ if (this.table.dragEnabled) return false;
153079
153437
  return index < this.leftFixedLeafCount || index >= this.columnsCount - this.rightFixedLeafCount;
153080
153438
  }
153081
153439
  },
@@ -154598,7 +154956,7 @@ var convertToRows = function convertToRows(originColumns) {
154598
154956
  {
154599
154957
  'class': ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName]
154600
154958
  },
154601
- [_this._renderFilterIcon(h, column), _this._renderColumnLabel(h, cellIndex, column), _this._renderSortIcon(h, column), _this._renderFilterTrigger(h, column), _this._renderColumnIcon(h, column), _this._renderColumnButton(h, column)]
154959
+ [_this._renderfilterColumn(h, column), _this._renderColumnLabel(h, cellIndex, column), _this._renderSortIcon(h, column), _this._renderFilterTrigger(h, column), _this._renderColumnIcon(h, column), _this._renderColumnButton(h, column)]
154602
154960
  )]
154603
154961
  );
154604
154962
  }), _this.hasGutter && _this._renderGutterCell(columnRows, rowIndex)]
@@ -154749,6 +155107,8 @@ var convertToRows = function convertToRows(originColumns) {
154749
155107
  } else if (this.fixed === 'right') {
154750
155108
  return start < this.columnsCount - this.rightFixedLeafCount;
154751
155109
  } else {
155110
+ // 开启拖拽排序时左右固定层不渲染,固定列表头只能靠主表显示
155111
+ if (this.table.dragEnabled) return false;
154752
155112
  return after < this.leftFixedLeafCount || start >= this.columnsCount - this.rightFixedLeafCount;
154753
155113
  }
154754
155114
  },
@@ -154919,7 +155279,8 @@ var convertToRows = function convertToRows(originColumns) {
154919
155279
  * @param {Event} event - 事件对象
154920
155280
  * @param {Object} column - 列配置
154921
155281
  */
154922
- handleFilterColumn: function handleFilterColumn(event, column) {
155282
+ handlefilterColumnumn: function handlefilterColumnumn(event, column) {
155283
+ console.log('filter-column');
154923
155284
  if (this.$parent) {
154924
155285
  this.$parent.$emit('filter-column', column, event);
154925
155286
  }
@@ -155054,10 +155415,10 @@ var convertToRows = function convertToRows(originColumns) {
155054
155415
  * @param {Object} column - 列配置
155055
155416
  * @returns {VNode|null} 渲染结果
155056
155417
  */
155057
- _renderFilterIcon: function _renderFilterIcon(h, column) {
155418
+ _renderfilterColumn: function _renderfilterColumn(h, column) {
155058
155419
  var _this3 = this;
155059
155420
 
155060
- if (!column.filterIcon) return null;
155421
+ if (!column.filterColumn) return null;
155061
155422
 
155062
155423
  return h(
155063
155424
  'span',
@@ -155065,12 +155426,12 @@ var convertToRows = function convertToRows(originColumns) {
155065
155426
  'class': 'filter-column',
155066
155427
  on: {
155067
155428
  'click': function click($event) {
155068
- return _this3.handleFilterColumn($event, column);
155429
+ return _this3.handlefilterColumnumn($event, column);
155069
155430
  }
155070
155431
  }
155071
155432
  },
155072
155433
  [h('i', {
155073
- 'class': [typeof column.filterIcon === 'string' ? column.filterIcon : 'es-icon-menu', 'filter-icon']
155434
+ 'class': [typeof column.filterColumn === 'string' ? column.filterColumn : 'es-icon-yingyong', 'filter-icon']
155074
155435
  })]
155075
155436
  );
155076
155437
  },
@@ -155877,9 +156238,11 @@ var table_footer_typeof = typeof Symbol === "function" && typeof Symbol.iterator
155877
156238
  }
155878
156239
  return before < this.columnsCount - this.rightFixedLeafCount;
155879
156240
  } else if (!this.fixed && column && column.fixed) {
155880
- // 当页脚实例不固定而列固定时隐藏单元格
155881
- return true;
156241
+ // 当页脚实例不固定而列固定时隐藏单元格;
156242
+ // 开启拖拽排序时固定层不渲染,固定列要留在主表里显示
156243
+ return !this.table.dragEnabled;
155882
156244
  } else {
156245
+ if (this.table.dragEnabled) return false;
155883
156246
  return index < this.leftFixedCount || index >= this.columnsCount - this.rightFixedCount;
155884
156247
  }
155885
156248
  },
@@ -156583,17 +156946,6 @@ var tableIdSeed = 1;
156583
156946
  * @default 'auto'
156584
156947
  */
156585
156948
  tooltipWidth: { type: String, default: 'auto' },
156586
- /**
156587
- * 是否开启拖拽排序
156588
- * @type {Boolean}
156589
- * @default false
156590
- */
156591
- dragSort: Boolean,
156592
- /**
156593
- * 拖拽排序的类名
156594
- * @type {String}
156595
- */
156596
- dragSortClass: String,
156597
156949
  /**
156598
156950
  * 无限滚动的回调方法
156599
156951
  * @type {Function}
@@ -156691,13 +157043,10 @@ var tableIdSeed = 1;
156691
157043
  },
156692
157044
  scrollStyle: function scrollStyle() {
156693
157045
  var _layout3 = this.layout,
156694
- gutterWidth = _layout3.gutterWidth,
156695
157046
  _layout3$headerHeight = _layout3.headerHeight,
156696
157047
  headerHeight = _layout3$headerHeight === undefined ? 0 : _layout3$headerHeight,
156697
157048
  _layout3$footerHeight = _layout3.footerHeight,
156698
- footerHeight = _layout3$footerHeight === undefined ? 0 : _layout3$footerHeight,
156699
- scrollX = _layout3.scrollX,
156700
- scrollY = _layout3.scrollY;
157049
+ footerHeight = _layout3$footerHeight === undefined ? 0 : _layout3$footerHeight;
156701
157050
 
156702
157051
  var height = 0;
156703
157052
  var maxHeight = 0;
@@ -156706,11 +157055,14 @@ var tableIdSeed = 1;
156706
157055
  } else if (this.maxHeight) {
156707
157056
  maxHeight = parseHeight(this.maxHeight) - footerHeight - (this.showHeader ? headerHeight : 0);
156708
157057
  }
157058
+ // 美化滚动条时原生条已由 CSS 隐藏(见 table.scss),不占位也就无需
157059
+ // 按条宽加宽/加高容器;此前的 calc(100% + gutterWidth) 在浏览器缩放时
157060
+ // 和实际条宽对不上,容器右、下两侧会露出一条灰边
156709
157061
  return {
156710
- width: gutterWidth && scrollY ? 'calc(100% + ' + gutterWidth + 'px)' : '100%',
156711
- height: height && gutterWidth ? height + (scrollX ? gutterWidth : 0) + 'px' : '100%',
157062
+ width: '100%',
157063
+ height: height ? height + 'px' : '100%',
156712
157064
  maxHeight: maxHeight ? maxHeight + 'px' : '',
156713
- 'overflow-x': height && gutterWidth ? '' : 'hidden'
157065
+ 'overflow-x': height ? '' : 'hidden'
156714
157066
  };
156715
157067
  },
156716
157068
  fixedBodyHeight: function fixedBodyHeight() {
@@ -156768,6 +157120,28 @@ var tableIdSeed = 1;
156768
157120
  rightFixedColumns: 'rightFixedColumns'
156769
157121
  }), {
156770
157122
 
157123
+ /**
157124
+ * 是否开启行拖拽排序:有 type 为 drag 的列即开启,
157125
+ * 该列自己渲染拖拽手柄图标(见 config.js 的 cellForced.drag)
157126
+ * @returns {Boolean}
157127
+ */
157128
+ dragEnabled: function dragEnabled() {
157129
+ return this.columns.some(function (column) {
157130
+ return column.type === 'drag';
157131
+ });
157132
+ },
157133
+
157134
+
157135
+ /**
157136
+ * 是否同时配了拖拽排序和固定列:两者互斥(开启拖拽后固定层不渲染),
157137
+ * 用于给一次显式告警,避免 fixed 静默失效
157138
+ * @returns {Boolean}
157139
+ */
157140
+ dragFixedConflict: function dragFixedConflict() {
157141
+ return this.dragEnabled && (this.fixedColumns.length > 0 || this.rightFixedColumns.length > 0);
157142
+ },
157143
+
157144
+
156771
157145
  // 优化类名绑定,提高模板可读性
156772
157146
  getTableClasses: function getTableClasses() {
156773
157147
  var _ref;
@@ -156795,6 +157169,18 @@ var tableIdSeed = 1;
156795
157169
  }),
156796
157170
 
156797
157171
  watch: {
157172
+ dragFixedConflict: {
157173
+ immediate: true,
157174
+ handler: function handler(val) {
157175
+ // 固定列靠另一张浮层表渲染,Sortable 只挪主表的行,两者没法共存;
157176
+ // 冲突时告警一次,避免消费方配了 fixed 却发现不生效又查不到原因
157177
+ if (val && "production" !== 'production' && !this._dragFixedWarned) {
157178
+ this._dragFixedWarned = true;
157179
+ console.warn('[Warn][Table]存在 type 为 drag 的列时开启行拖拽排序,左右固定列不会渲染,fixed 不生效');
157180
+ }
157181
+ }
157182
+ },
157183
+
156798
157184
  // 优化高度变化监听,使用防抖减少频繁更新
156799
157185
  height: {
156800
157186
  immediate: true,
@@ -157707,8 +158093,8 @@ var tableIdSeed = 1;
157707
158093
 
157708
158094
  var src_table_component = Object(componentNormalizer["a" /* default */])(
157709
158095
  packages_table_src_tablevue_type_script_lang_js_,
157710
- tablevue_type_template_id_10e33a98_render,
157711
- tablevue_type_template_id_10e33a98_staticRenderFns,
158096
+ tablevue_type_template_id_4f193eb2_render,
158097
+ tablevue_type_template_id_4f193eb2_staticRenderFns,
157712
158098
  false,
157713
158099
  null,
157714
158100
  null,
@@ -157747,7 +158133,19 @@ var columnIdSeed = 1;
157747
158133
  type: String,
157748
158134
  default: 'default'
157749
158135
  },
157750
- filterIcon: [String, Boolean],
158136
+ /**
158137
+ * 列的规则;type 为 drag 时用它判定行是否可拖:
158138
+ * 函数按行判定(返回 false 该行不可拖),false 表示整列不可拖。
158139
+ * 必须显式写 default: undefined:类型里带 Boolean 时,Vue 会把未传的
158140
+ * 值铸成 false,那就等于默认把整列拖拽关掉了
158141
+ * @type {Function|Boolean|Array|Object}
158142
+ */
158143
+ rules: {
158144
+ type: [Function, Boolean, Array, Object],
158145
+ default: undefined
158146
+ },
158147
+ // Boolean 必须在 String 前:裸写 filterColumn 时 Vue 才会把空串铸成 true(同 sortable 的约定)
158148
+ filterColumn: [Boolean, String],
157751
158149
  label: String,
157752
158150
  labelKey: String,
157753
158151
  valueKey: String,
@@ -158154,11 +158552,13 @@ var columnIdSeed = 1;
158154
158552
  filterPlacement: '',
158155
158553
  isColumnGroup: false,
158156
158554
  filterOpened: false,
158157
- filterIcon: this.filterIcon,
158555
+ filterColumn: this.filterColumn,
158158
158556
  // 排序相关属性
158159
158557
  sortable: sortable,
158160
158558
  // 索引列
158161
- index: this.index
158559
+ index: this.index,
158560
+ // drag 列用它控制行是否可拖(见 config.js 的 cellForced.drag)
158561
+ rules: this.rules
158162
158562
  });
158163
158563
 
158164
158564
  // 收集不同类型的属性
@@ -163292,8 +163692,8 @@ transfer.install = function (Vue) {
163292
163692
  };
163293
163693
 
163294
163694
  /* harmony default export */ var packages_transfer = (transfer);
163295
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=template&id=5e49a128&
163296
- var treevue_type_template_id_5e49a128_render = function () {
163695
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=template&id=79d373f6&
163696
+ var treevue_type_template_id_79d373f6_render = function () {
163297
163697
  var _vm = this
163298
163698
  var _h = _vm.$createElement
163299
163699
  var _c = _vm._self._c || _h
@@ -163476,11 +163876,11 @@ var treevue_type_template_id_5e49a128_render = function () {
163476
163876
  ]
163477
163877
  )
163478
163878
  }
163479
- var treevue_type_template_id_5e49a128_staticRenderFns = []
163480
- treevue_type_template_id_5e49a128_render._withStripped = true
163879
+ var treevue_type_template_id_79d373f6_staticRenderFns = []
163880
+ treevue_type_template_id_79d373f6_render._withStripped = true
163481
163881
 
163482
163882
 
163483
- // CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=template&id=5e49a128&
163883
+ // CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=template&id=79d373f6&
163484
163884
 
163485
163885
  // CONCATENATED MODULE: ./packages/tree/src/model/util.js
163486
163886
  var NODE_KEY = '$treeNodeId';
@@ -165528,8 +165928,7 @@ var treevue_type_script_lang_js_extends = Object.assign || function (target) { f
165528
165928
  },
165529
165929
  styles: function styles() {
165530
165930
  return {
165531
- height: this.height,
165532
- '--scrollbar-width': this.scrollbarWidth + 'px'
165931
+ height: this.height
165533
165932
  };
165534
165933
  },
165535
165934
  showSearch: function showSearch() {
@@ -165632,10 +166031,6 @@ var treevue_type_script_lang_js_extends = Object.assign || function (target) { f
165632
166031
  * 当前选中节点的键值
165633
166032
  */
165634
166033
  currentKey: '',
165635
- /**
165636
- * 滚动条宽度
165637
- */
165638
- scrollbarWidth: 0,
165639
166034
  /**
165640
166035
  * 搜索配置
165641
166036
  */
@@ -165732,8 +166127,6 @@ var treevue_type_script_lang_js_extends = Object.assign || function (target) { f
165732
166127
  var _this5 = this;
165733
166128
 
165734
166129
  !this.lazy && this.getData();
165735
- // 计算并存储滚动条宽度,避免重复计算
165736
- this.scrollbarWidth = Object(scrollbar_js_["getScrollbarWidth"])();
165737
166130
  this.isTree = true;
165738
166131
 
165739
166132
  this.store = new tree_store({
@@ -166441,8 +166834,8 @@ var treevue_type_script_lang_js_extends = Object.assign || function (target) { f
166441
166834
 
166442
166835
  var src_tree_component = Object(componentNormalizer["a" /* default */])(
166443
166836
  packages_tree_src_treevue_type_script_lang_js_,
166444
- treevue_type_template_id_5e49a128_render,
166445
- treevue_type_template_id_5e49a128_staticRenderFns,
166837
+ treevue_type_template_id_79d373f6_render,
166838
+ treevue_type_template_id_79d373f6_staticRenderFns,
166446
166839
  false,
166447
166840
  null,
166448
166841
  null,
@@ -167582,8 +167975,8 @@ srcvue_type_template_id_0f120158_render._withStripped = true
167582
167975
  // EXTERNAL MODULE: external "lodash"
167583
167976
  var external_lodash_ = __webpack_require__(135);
167584
167977
 
167585
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-list.vue?vue&type=template&id=667db7eb&
167586
- var upload_listvue_type_template_id_667db7eb_render = function () {
167978
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-list.vue?vue&type=template&id=30007bc1&
167979
+ var upload_listvue_type_template_id_30007bc1_render = function () {
167587
167980
  var _vm = this
167588
167981
  var _h = _vm.$createElement
167589
167982
  var _c = _vm._self._c || _h
@@ -167632,6 +168025,7 @@ var upload_listvue_type_template_id_667db7eb_render = function () {
167632
168025
  "div",
167633
168026
  {
167634
168027
  ref: "container",
168028
+ staticClass: "es-upload-lists__scroll",
167635
168029
  style: _vm.barStyles,
167636
168030
  on: { scroll: _vm.handleScroll, wheel: _vm.handleWheel },
167637
168031
  },
@@ -167851,11 +168245,11 @@ var upload_listvue_type_template_id_667db7eb_render = function () {
167851
168245
  ),
167852
168246
  ])
167853
168247
  }
167854
- var upload_listvue_type_template_id_667db7eb_staticRenderFns = []
167855
- upload_listvue_type_template_id_667db7eb_render._withStripped = true
168248
+ var upload_listvue_type_template_id_30007bc1_staticRenderFns = []
168249
+ upload_listvue_type_template_id_30007bc1_render._withStripped = true
167856
168250
 
167857
168251
 
167858
- // CONCATENATED MODULE: ./packages/upload/src/upload-list.vue?vue&type=template&id=667db7eb&
168252
+ // CONCATENATED MODULE: ./packages/upload/src/upload-list.vue?vue&type=template&id=30007bc1&
167859
168253
 
167860
168254
  // EXTERNAL MODULE: external "eoss/lib/progress"
167861
168255
  var progress_ = __webpack_require__(81);
@@ -168252,6 +168646,7 @@ var list_extends = Object.assign || function (target) { for (var i = 1; i < argu
168252
168646
  //
168253
168647
  //
168254
168648
  //
168649
+ //
168255
168650
 
168256
168651
 
168257
168652
 
@@ -168314,12 +168709,12 @@ var list_extends = Object.assign || function (target) { for (var i = 1; i < argu
168314
168709
  }
168315
168710
  },
168316
168711
  computed: {
168712
+ // 列表容器自身滚动,原生条由 CSS 隐藏(见 upload.scss 的
168713
+ // .es-upload-lists__scroll),不占位也就无需按条宽加宽容器把它推出去——
168714
+ // 那样在浏览器缩放时量到的 15px 和实际渲染宽度对不上,右侧会露出一条灰边
168317
168715
  barStyles: function barStyles() {
168318
- // 优化:使用预计算的滚动条宽度,避免重复计算
168319
168716
  if (this.height && this.height !== 'auto') {
168320
- var barWidth = this.scrollbarWidth;
168321
168717
  return {
168322
- width: 'calc(100% + ' + barWidth + 'px)',
168323
168718
  height: '100%',
168324
168719
  'overflow-y': 'scroll'
168325
168720
  };
@@ -168342,7 +168737,6 @@ var list_extends = Object.assign || function (target) { for (var i = 1; i < argu
168342
168737
  },
168343
168738
  data: function data() {
168344
168739
  return {
168345
- scrollbarWidth: 0,
168346
168740
  moveTo: 0,
168347
168741
  barSize: 0
168348
168742
  };
@@ -168355,7 +168749,6 @@ var list_extends = Object.assign || function (target) { for (var i = 1; i < argu
168355
168749
  });
168356
168750
  },
168357
168751
  mounted: function mounted() {
168358
- this.scrollbarWidth = Object(scrollbar_js_["getScrollbarWidth"])();
168359
168752
  if (this.dragSort && !this.disabled) {
168360
168753
  this.sortable = new external_sortablejs_default.a(this.$refs.listContainer.$el, {
168361
168754
  animation: 150,
@@ -168427,8 +168820,8 @@ var list_extends = Object.assign || function (target) { for (var i = 1; i < argu
168427
168820
 
168428
168821
  var upload_list_component = Object(componentNormalizer["a" /* default */])(
168429
168822
  src_upload_listvue_type_script_lang_js_,
168430
- upload_listvue_type_template_id_667db7eb_render,
168431
- upload_listvue_type_template_id_667db7eb_staticRenderFns,
168823
+ upload_listvue_type_template_id_30007bc1_render,
168824
+ upload_listvue_type_template_id_30007bc1_staticRenderFns,
168432
168825
  false,
168433
168826
  null,
168434
168827
  null,
@@ -175637,7 +176030,7 @@ if (typeof window !== 'undefined' && window.Vue) {
175637
176030
  }
175638
176031
 
175639
176032
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
175640
- version: '0.1.0-alpha.47',
176033
+ version: '0.1.0-alpha.48',
175641
176034
  install: src_install,
175642
176035
  CollapseTransition: collapse_transition_js_default.a,
175643
176036
  Loading: packages_loading,