bkui-vue 2.0.1-beta.15.table.1 → 2.0.1-beta.15.table.11

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 (60) hide show
  1. package/dist/index.cjs.js +40 -40
  2. package/dist/index.esm.js +13786 -13670
  3. package/dist/index.umd.js +54 -54
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/checkbox/checkbox.d.ts +7 -7
  7. package/lib/checkbox/index.d.ts +11 -11
  8. package/lib/checkbox/index.js +9 -1
  9. package/lib/date-picker/date-picker.d.ts +0 -1
  10. package/lib/date-picker/index.d.ts +0 -3
  11. package/lib/date-picker/index.js +34 -13
  12. package/lib/dialog/dialog.d.ts +7 -2
  13. package/lib/dialog/index.d.ts +15 -4
  14. package/lib/dialog/props.d.ts +3 -1
  15. package/lib/index.js +1 -1
  16. package/lib/modal/index.d.ts +18 -5
  17. package/lib/modal/index.js +7 -1
  18. package/lib/modal/modal.d.ts +7 -2
  19. package/lib/modal/props.mixin.d.ts +3 -1
  20. package/lib/radio/index.d.ts +21 -21
  21. package/lib/radio/index.js +18 -7
  22. package/lib/radio/radio-button.d.ts +7 -7
  23. package/lib/radio/radio-group.d.ts +7 -7
  24. package/lib/radio/radio.d.ts +7 -7
  25. package/lib/scrollbar/index.js +36 -13
  26. package/lib/scrollbar/scrollbar-core/index.d.ts +2 -1
  27. package/lib/select/index.d.ts +24 -6
  28. package/lib/select/index.js +68 -56
  29. package/lib/select/select.d.ts +10 -2
  30. package/lib/shared/frame-throttle.d.ts +15 -0
  31. package/lib/shared/index.d.ts +1 -0
  32. package/lib/shared/index.js +72 -1
  33. package/lib/sideslider/index.d.ts +15 -4
  34. package/lib/sideslider/sideslider.d.ts +7 -2
  35. package/lib/steps/index.d.ts +3 -3
  36. package/lib/steps/steps.d.ts +1 -1
  37. package/lib/table/components/ghost-body.d.ts +2 -0
  38. package/lib/table/components/table-column.d.ts +3 -44
  39. package/lib/table/hooks/use-cell.d.ts +20 -0
  40. package/lib/table/hooks/use-column-resize.d.ts +3 -1
  41. package/lib/table/hooks/use-column-template.d.ts +2 -3
  42. package/lib/table/hooks/use-columns.d.ts +3 -2
  43. package/lib/table/hooks/use-layout.d.ts +7 -5
  44. package/lib/table/hooks/use-settings.d.ts +1 -1
  45. package/lib/table/hooks/use-shift-key.d.ts +4 -2
  46. package/lib/table/index.d.ts +18 -44
  47. package/lib/table/index.js +844 -595
  48. package/lib/table/props.d.ts +13 -1
  49. package/lib/table/table.css +35 -47
  50. package/lib/table/table.d.ts +7 -0
  51. package/lib/table/table.less +40 -60
  52. package/lib/table/table.variable.css +35 -47
  53. package/lib/table/utils.d.ts +7 -5
  54. package/lib/table-column/index.d.ts +9 -132
  55. package/lib/table-column/index.js +17298 -25
  56. package/lib/virtual-render/index.d.ts +4 -15
  57. package/lib/virtual-render/index.js +3 -4
  58. package/lib/virtual-render/props.d.ts +1 -3
  59. package/lib/virtual-render/virtual-render.d.ts +2 -7
  60. package/package.json +1 -1
@@ -4,29 +4,28 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../sh
4
4
  import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
6
6
  import * as __WEBPACK_EXTERNAL_MODULE_lodash_isElement_e6b2a6ce__ from "lodash/isElement";
7
- import * as __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__ from "lodash/throttle";
8
7
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
9
8
  import * as __WEBPACK_EXTERNAL_MODULE_lodash_debounce_3540babe__ from "lodash/debounce";
10
9
  import * as __WEBPACK_EXTERNAL_MODULE_lodash_get_9427f899__ from "lodash/get";
11
10
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_virtual_render_927587a8__ from "../virtual-render";
12
11
  import "../virtual-render/virtual-render.less";
13
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__ from "../checkbox";
14
- import "../checkbox/checkbox.less";
15
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
12
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__ from "../loading";
13
+ import "../loading/loading.less";
16
14
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_pagination_95c6c47e__ from "../pagination";
17
15
  import "../pagination/pagination.less";
18
16
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_exception_7490d0fd__ from "../exception";
19
17
  import "../exception/exception.less";
20
18
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__ from "../directives";
19
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__ from "../checkbox";
20
+ import "../checkbox/checkbox.less";
21
21
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_button_a2ea7c9a__ from "../button";
22
22
  import "../button/button.less";
23
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
23
24
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_input_d525237e__ from "../input";
24
25
  import "../input/input.less";
25
26
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
26
27
  import "../popover/popover.less";
27
28
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon__3efece53__ from "../icon/";
28
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__ from "../loading";
29
- import "../loading/loading.less";
30
29
  /******/ var __webpack_modules__ = ({
31
30
 
32
31
  /***/ 6635:
@@ -17321,11 +17320,11 @@ __webpack_require__.d(__webpack_exports__, {
17321
17320
  ;// CONCATENATED MODULE: external "../shared"
17322
17321
  var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
17323
17322
  var y = x => () => x
17324
- const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["RenderType"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.RenderType, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.classes, ["hasOverflowEllipsis"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.hasOverflowEllipsis, ["isElement"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.isElement, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstallProps });
17323
+ const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["RenderType"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.RenderType, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.classes, ["hasOverflowEllipsis"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.hasOverflowEllipsis, ["isElement"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.isElement, ["throttle"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.throttle, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstallProps });
17325
17324
  ;// CONCATENATED MODULE: external "vue"
17326
17325
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
17327
17326
  var external_vue_y = x => () => x
17328
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isRef, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["onUpdated"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUpdated, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
17327
+ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isRef, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
17329
17328
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
17330
17329
  function typeof_typeof(o) {
17331
17330
  "@babel/helpers - typeof";
@@ -17686,16 +17685,16 @@ var tableProps = {
17686
17685
  * 默认:auto 根据行数自动填充高度
17687
17686
  * 100%,依赖初始化时父级容器高度
17688
17687
  */
17689
- height: StringNumberType('100%'),
17688
+ height: StringNumberType('auto'),
17690
17689
  /**
17691
17690
  * 是否为斑马纹 Table
17692
17691
  */
17693
17692
  stripe: shared_namespaceObject.PropTypes.bool.def(false),
17694
17693
  /**
17695
17694
  * 设置表格最小高度
17696
- * 默认:300
17695
+ * 默认:LINE_HEIGHT * 4
17697
17696
  */
17698
- minHeight: StringNumberType(LINE_HEIGHT * 2),
17697
+ minHeight: StringNumberType(LINE_HEIGHT * 4),
17699
17698
  /**
17700
17699
  * 设置表格最d大高度
17701
17700
  * 默认:auto,依赖外层高度
@@ -17903,10 +17902,20 @@ var tableProps = {
17903
17902
  /**
17904
17903
  * 启用Scrollbar
17905
17904
  */
17906
- scrollbar: shared_namespaceObject.PropTypes.bool.def(true)
17905
+ scrollbar: shared_namespaceObject.PropTypes.bool.def(true),
17906
+ /**
17907
+ * 固定在底部的配置项
17908
+ */
17909
+ fixedBottom: (0,external_vue_types_namespaceObject.toType)('FixedBottomOption', {
17910
+ "default": {
17911
+ position: 'relative',
17912
+ height: LINE_HEIGHT
17913
+ }
17914
+ }).def(null)
17907
17915
  };
17916
+ // EXTERNAL MODULE: ../../node_modules/lodash/lodash.js
17917
+ var lodash = __webpack_require__(6635);
17908
17918
  ;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
17909
-
17910
17919
  /*
17911
17920
  * Tencent is pleased to support the open source community by making
17912
17921
  * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
@@ -17936,6 +17945,7 @@ var tableProps = {
17936
17945
 
17937
17946
 
17938
17947
 
17948
+
17939
17949
  var TableColumnProp = {
17940
17950
  label: LabelFunctionStringType,
17941
17951
  field: LabelFunctionStringType,
@@ -17959,33 +17969,31 @@ var TableColumnProp = {
17959
17969
  /* harmony default export */ const table_column = ((0,external_vue_namespaceObject.defineComponent)({
17960
17970
  name: 'TableColumn',
17961
17971
  props: TableColumnProp,
17962
- setup: function setup(props) {
17972
+ setup: function setup(props, _ref) {
17973
+ var slots = _ref.slots;
17963
17974
  var initTableColumns = (0,external_vue_namespaceObject.inject)(PROVIDE_KEY_INIT_COL, function () {});
17964
- var column = (0,external_vue_namespaceObject.reactive)(Object.assign({}, props, {
17965
- field: props.prop || props.field
17966
- }));
17967
- (0,external_vue_namespaceObject.onMounted)(function () {
17968
- initTableColumns();
17969
- });
17970
- (0,external_vue_namespaceObject.onUpdated)(function () {
17971
- initTableColumns();
17975
+ (0,external_vue_namespaceObject.watch)(function () {
17976
+ return [props];
17977
+ }, function (oldVal, newVal) {
17978
+ var _newVal$;
17979
+ if (!(0,lodash.isEqual)((0,external_vue_namespaceObject.toRaw)(oldVal === null || oldVal === void 0 ? void 0 : oldVal[0]), (0,external_vue_namespaceObject.toRaw)((_newVal$ = newVal === null || newVal === void 0 ? void 0 : newVal[0]) !== null && _newVal$ !== void 0 ? _newVal$ : {}))) {
17980
+ initTableColumns();
17981
+ }
17982
+ }, {
17983
+ immediate: true,
17984
+ deep: true
17972
17985
  });
17973
17986
  (0,external_vue_namespaceObject.onUnmounted)(function () {
17974
17987
  initTableColumns();
17975
17988
  });
17976
- return {
17977
- column: column
17989
+ return function () {
17990
+ var _slots$default;
17991
+ return (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, {
17992
+ row: {}
17993
+ });
17978
17994
  };
17979
- },
17980
- render: function render() {
17981
- var _this$$slots$default, _this$$slots;
17982
- return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots, {
17983
- row: {}
17984
- })]);
17985
17995
  }
17986
17996
  }));
17987
- // EXTERNAL MODULE: ../../node_modules/lodash/lodash.js
17988
- var lodash = __webpack_require__(6635);
17989
17997
  ;// CONCATENATED MODULE: ../../packages/table/src/events.ts
17990
17998
 
17991
17999
  var _EMIT_EVENT_TYPES;
@@ -18086,10 +18094,6 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18086
18094
  var isElement_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
18087
18095
  var isElement_y = x => () => x
18088
18096
  const isElement_namespaceObject = isElement_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_isElement_e6b2a6ce__["default"] });
18089
- ;// CONCATENATED MODULE: external "lodash/throttle"
18090
- var throttle_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
18091
- var throttle_y = x => () => x
18092
- const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"] });
18093
18097
  ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-column-resize.tsx
18094
18098
 
18095
18099
  /*
@@ -18121,7 +18125,8 @@ const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTER
18121
18125
 
18122
18126
 
18123
18127
 
18124
- /* harmony default export */ const use_column_resize = (function (columns) {
18128
+ /* harmony default export */ const use_column_resize = (function (columns, _ref) {
18129
+ var afterResize = _ref.afterResize;
18125
18130
  var getColumnAttribute = columns.getColumnAttribute,
18126
18131
  getColumnOrderWidth = columns.getColumnOrderWidth,
18127
18132
  setColumnAttribute = columns.setColumnAttribute;
@@ -18157,22 +18162,25 @@ const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTER
18157
18162
  var diff = e.clientX - startX;
18158
18163
  var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
18159
18164
  var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
18160
- setColumnAttribute(dragColumn, COLUMN_ATTRIBUTE.RESIZE_WIDTH, resolveWidth > minWidth ? resolveWidth : minWidth);
18165
+ var calcWidth = resolveWidth > minWidth ? resolveWidth : minWidth;
18166
+ setColumnAttribute(dragColumn, COLUMN_ATTRIBUTE.RESIZE_WIDTH, calcWidth);
18167
+ setColumnAttribute(dragColumn, COLUMN_ATTRIBUTE.CALC_WIDTH, calcWidth);
18161
18168
  document.removeEventListener('mouseup', handleMouseUp);
18162
18169
  document.removeEventListener('mousemove', handleMouseMove);
18163
18170
  startX = 0;
18164
18171
  dragOffsetX.value = -1000;
18165
18172
  dragColumn = null;
18173
+ afterResize === null || afterResize === void 0 || afterResize();
18166
18174
  };
18167
18175
  var updateOffsetX = function updateOffsetX(e) {
18168
- return (0,throttle_namespaceObject["default"])(function () {
18176
+ return (0,shared_namespaceObject.throttle)(function () {
18169
18177
  var diff = e.clientX - startX;
18170
18178
  var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
18171
18179
  var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
18172
18180
  if (minWidth < resolveWidth) {
18173
18181
  dragOffsetX.value = e.clientX - startX + dragStartOffsetX;
18174
18182
  }
18175
- }, 60);
18183
+ });
18176
18184
  };
18177
18185
  var handleMouseMove = function handleMouseMove(e) {
18178
18186
  stopDefaultEvent(e);
@@ -18182,13 +18190,8 @@ const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTER
18182
18190
  };
18183
18191
  var setChildrenNodeCursor = function setChildrenNodeCursor(root, cursor) {
18184
18192
  if ((0,isElement_namespaceObject["default"])(root)) {
18185
- var _root$style, _root$childNodes;
18193
+ var _root$style;
18186
18194
  (_root$style = root.style) === null || _root$style === void 0 || _root$style.setProperty('cursor', cursor);
18187
- if (((_root$childNodes = root.childNodes) === null || _root$childNodes === void 0 ? void 0 : _root$childNodes.length) > 0) {
18188
- root.childNodes.forEach(function (node) {
18189
- return setChildrenNodeCursor(node, cursor);
18190
- });
18191
- }
18192
18195
  }
18193
18196
  };
18194
18197
  var handler = defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, EVENTS.MOUSE_DOWN, function (e, column) {
@@ -18404,12 +18407,18 @@ function v4(options, buf, offset) {
18404
18407
  var columns = [];
18405
18408
  var columnIndex = 0;
18406
18409
  var columnCache = new WeakMap();
18410
+ var getPropRawData = function getPropRawData(prop) {
18411
+ if ((0,external_vue_namespaceObject.isRef)(prop)) {
18412
+ return (0,external_vue_namespaceObject.unref)(prop);
18413
+ }
18414
+ return (0,external_vue_namespaceObject.toRaw)(prop);
18415
+ };
18407
18416
  var copyProps = function copyProps(props) {
18408
18417
  return Object.keys(props !== null && props !== void 0 ? props : {}).reduce(function (result, key) {
18409
18418
  var target = key.replace(/-(\w)/g, function (_, letter) {
18410
18419
  return letter.toUpperCase();
18411
18420
  });
18412
- return Object.assign(result, defineProperty_defineProperty({}, target, props[key]));
18421
+ return Object.assign(result, defineProperty_defineProperty({}, target, getPropRawData(props[key])));
18413
18422
  }, {});
18414
18423
  };
18415
18424
  var getNodeCtxUid = function getNodeCtxUid(ctx) {
@@ -18440,6 +18449,9 @@ function v4(options, buf, offset) {
18440
18449
  }
18441
18450
  return;
18442
18451
  }
18452
+ if (Array.isArray(node)) {
18453
+ node.forEach(resolveChildNode);
18454
+ }
18443
18455
  if (Array.isArray(node === null || node === void 0 ? void 0 : node.children)) {
18444
18456
  node.children.forEach(resolveChildNode);
18445
18457
  }
@@ -18453,29 +18465,24 @@ function v4(options, buf, offset) {
18453
18465
  }
18454
18466
  return;
18455
18467
  };
18456
- var setNodeInstanceId = function setNodeInstanceId(column, uniqueId) {
18457
- if (!columnCache.has(column)) {
18458
- columnCache.set(columnCache, {
18459
- uniqueId: uniqueId,
18460
- column: column
18461
- });
18462
- }
18463
- };
18464
- var resolveColumns = function resolveColumns(target) {
18465
- var _instance$slots$defau, _instance$slots, _instance$slots$defau2;
18466
- var instance = target !== null && target !== void 0 ? target : (0,external_vue_namespaceObject.getCurrentInstance)();
18468
+ var resolveColumns = function resolveColumns(children) {
18467
18469
  columns.length = 0;
18468
18470
  columnIndex = 0;
18469
- var children = (_instance$slots$defau = (_instance$slots = instance.slots) === null || _instance$slots === void 0 || (_instance$slots$defau2 = _instance$slots["default"]) === null || _instance$slots$defau2 === void 0 ? void 0 : _instance$slots$defau2.call(_instance$slots)) !== null && _instance$slots$defau !== void 0 ? _instance$slots$defau : [];
18470
- children.forEach(resolveChildNode);
18471
+ var GhostBody = children.find(function (node) {
18472
+ var _node$type3;
18473
+ return ((_node$type3 = node.type) === null || _node$type3 === void 0 ? void 0 : _node$type3.name) === 'GhostBody';
18474
+ });
18475
+ if (GhostBody) {
18476
+ var _GhostBody$children$d, _GhostBody$children, _GhostBody$children$d2;
18477
+ ((_GhostBody$children$d = (_GhostBody$children = GhostBody.children) === null || _GhostBody$children === void 0 || (_GhostBody$children$d2 = _GhostBody$children["default"]) === null || _GhostBody$children$d2 === void 0 ? void 0 : _GhostBody$children$d2.call(_GhostBody$children)) !== null && _GhostBody$children$d !== void 0 ? _GhostBody$children$d : []).forEach(resolveChildNode);
18478
+ }
18471
18479
  columns.sort(function (col1, col2) {
18472
18480
  return col1.index - col2.index;
18473
18481
  });
18474
18482
  return columns;
18475
18483
  };
18476
18484
  return {
18477
- resolveColumns: resolveColumns,
18478
- setNodeInstanceId: setNodeInstanceId
18485
+ resolveColumns: resolveColumns
18479
18486
  };
18480
18487
  });
18481
18488
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
@@ -19631,7 +19638,7 @@ var observerResize = function observerResize(root, callbackFn) {
19631
19638
  callbackFn();
19632
19639
  }
19633
19640
  };
19634
- var execFn = resizerWay === 'debounce' ? (0,debounce_namespaceObject["default"])(resolveCallbackFn, delay) : (0,throttle_namespaceObject["default"])(resolveCallbackFn, delay);
19641
+ var execFn = resizerWay === 'debounce' ? (0,debounce_namespaceObject["default"])(resolveCallbackFn, delay) : (0,shared_namespaceObject.throttle)(resolveCallbackFn);
19635
19642
  var callFn = function callFn() {
19636
19643
  return Reflect.apply(execFn, _this, []);
19637
19644
  };
@@ -19967,6 +19974,21 @@ var getRawData = function getRawData(data) {
19967
19974
  }
19968
19975
  return data;
19969
19976
  };
19977
+ /**
19978
+ * 转换 px | % 为实际数值
19979
+ * @param val
19980
+ * @param parentVal
19981
+ * @returns
19982
+ */
19983
+ var getNumberOrPercentValue = function getNumberOrPercentValue(val, parentVal) {
19984
+ if (/^\d+\.?\d+(px)?$/.test("".concat(val))) {
19985
+ return Number("".concat(val).replace(/px/, ''));
19986
+ }
19987
+ if (/^\d+\.?\d+%$/.test("".concat(val))) {
19988
+ return Number("".concat(val).replace(/%/, '')) / 100 * (parentVal !== null && parentVal !== void 0 ? parentVal : 1);
19989
+ }
19990
+ return null;
19991
+ };
19970
19992
  ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-columns.tsx
19971
19993
 
19972
19994
 
@@ -20038,6 +20060,63 @@ var useColumns = function useColumns(props) {
20038
20060
  active: true
20039
20061
  }));
20040
20062
  };
20063
+ var setColumnCalcWidth = function setColumnCalcWidth(col, attrName, width) {
20064
+ var colWidth = 0;
20065
+ if (/^\d+\.?\d*(px)?$/.test("".concat(col[attrName]))) {
20066
+ colWidth = Number("".concat(col[attrName]).replace(/px/, ''));
20067
+ setColumnAttribute(col, COLUMN_ATTRIBUTE.CALC_WIDTH, colWidth);
20068
+ setColumnRect(col, {
20069
+ width: colWidth,
20070
+ left: null,
20071
+ right: null
20072
+ });
20073
+ }
20074
+ if (/^\d+\.?\d*%$/.test("".concat(col[attrName]))) {
20075
+ colWidth = Number("".concat(col[attrName]).replace(/%/, '')) / 100 * width;
20076
+ setColumnAttribute(col, COLUMN_ATTRIBUTE.CALC_WIDTH, colWidth);
20077
+ setColumnRect(col, {
20078
+ width: colWidth,
20079
+ left: null,
20080
+ right: null
20081
+ });
20082
+ }
20083
+ return colWidth;
20084
+ };
20085
+ /**
20086
+ * 根据表格外层宽度和表格列配置
20087
+ * 计算每一列的宽度
20088
+ * @param width
20089
+ */
20090
+ var resolveColsCalcWidth = function resolveColsCalcWidth(width) {
20091
+ var diffWidth = width;
20092
+ var minColWidth = COL_MIN_WIDTH;
20093
+ var resolveColWidth = function resolveColWidth(colList) {
20094
+ var attrName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'width';
20095
+ var filterList = [];
20096
+ colList.forEach(function (col) {
20097
+ var calcWidth = setColumnCalcWidth(col, attrName, width);
20098
+ diffWidth = diffWidth - calcWidth;
20099
+ if ([undefined, null, 'auto', 'undefined', 'null', ''].includes(col[attrName])) {
20100
+ filterList.push(col);
20101
+ }
20102
+ });
20103
+ if (diffWidth > 0 && filterList.length) {
20104
+ minColWidth = diffWidth / filterList.length;
20105
+ }
20106
+ return filterList;
20107
+ };
20108
+ var minWidthList = resolveColWidth(visibleColumns);
20109
+ var autoWidthList = resolveColWidth(minWidthList, 'minWidth');
20110
+ autoWidthList.forEach(function (col) {
20111
+ var calcWidth = minColWidth > COL_MIN_WIDTH ? minColWidth : COL_MIN_WIDTH;
20112
+ setColumnAttribute(col, COLUMN_ATTRIBUTE.CALC_WIDTH, calcWidth);
20113
+ setColumnRect(col, {
20114
+ width: calcWidth,
20115
+ left: null,
20116
+ right: null
20117
+ });
20118
+ });
20119
+ };
20041
20120
  /**
20042
20121
  * 用来记录列的过滤状态
20043
20122
  * @param col
@@ -20064,12 +20143,6 @@ var useColumns = function useColumns(props) {
20064
20143
  return !isHiddenColumn(col);
20065
20144
  })));
20066
20145
  };
20067
- var headHeight = (0,external_vue_namespaceObject.computed)(function () {
20068
- if (props.showHead) {
20069
- return props.headHeight;
20070
- }
20071
- return 0;
20072
- });
20073
20146
  var resolveDraggableColumn = function resolveDraggableColumn() {
20074
20147
  if (props.rowDraggable) {
20075
20148
  var _props$rowDraggable$w, _props$rowDraggable, _props$rowDraggable$l, _props$rowDraggable2;
@@ -20175,6 +20248,7 @@ var useColumns = function useColumns(props) {
20175
20248
  * @param columns
20176
20249
  */
20177
20250
  var formatColumns = function formatColumns() {
20251
+ sortColumns.length = 0;
20178
20252
  resolveDraggableColumn();
20179
20253
  var skipColNum = 0;
20180
20254
  (tableColumnList || []).forEach(function (col, index) {
@@ -20233,6 +20307,9 @@ var useColumns = function useColumns(props) {
20233
20307
  var getColumnRect = function getColumnRect(column) {
20234
20308
  return getColumnAttribute(column, COLUMN_ATTRIBUTE.COL_RECT);
20235
20309
  };
20310
+ var getColumnCalcWidth = function getColumnCalcWidth(column) {
20311
+ return getColumnAttribute(column, COLUMN_ATTRIBUTE.CALC_WIDTH);
20312
+ };
20236
20313
  var setColumnRect = function setColumnRect(col, _ref2) {
20237
20314
  var left = _ref2.left,
20238
20315
  right = _ref2.right,
@@ -20415,7 +20492,6 @@ var useColumns = function useColumns(props) {
20415
20492
  return {
20416
20493
  needColSpan: needColSpan,
20417
20494
  needRowSpan: needRowSpan,
20418
- headHeight: headHeight,
20419
20495
  tableColumnSchema: tableColumnSchema,
20420
20496
  tableColumnList: tableColumnList,
20421
20497
  visibleColumns: visibleColumns,
@@ -20434,6 +20510,7 @@ var useColumns = function useColumns(props) {
20434
20510
  getColumnRect: getColumnRect,
20435
20511
  getColumnCustomClass: getColumnCustomClass,
20436
20512
  getColumnRefAttribute: getColumnRefAttribute,
20513
+ getColumnCalcWidth: getColumnCalcWidth,
20437
20514
  resolveEventListener: resolveEventListener,
20438
20515
  setColumnIsHidden: setColumnIsHidden,
20439
20516
  setColumnResizeWidth: setColumnResizeWidth,
@@ -20444,7 +20521,8 @@ var useColumns = function useColumns(props) {
20444
20521
  setColumnSortActive: setColumnSortActive,
20445
20522
  setFixedStyle: setFixedStyle,
20446
20523
  setColumnRect: setColumnRect,
20447
- setVisibleColumns: setVisibleColumns
20524
+ setVisibleColumns: setVisibleColumns,
20525
+ resolveColsCalcWidth: resolveColsCalcWidth
20448
20526
  };
20449
20527
  };
20450
20528
  /* harmony default export */ const use_columns = (useColumns);
@@ -20652,10 +20730,10 @@ var useColumns = function useColumns(props) {
20652
20730
  var length = fixedRightColumns.value.length;
20653
20731
  for (var i = length - 1; i >= 0; i--) {
20654
20732
  var col = fixedRightColumns.value[i];
20655
- var _columns$getColumnRec = columns.getColumnRect(col),
20656
- width = _columns$getColumnRec.width;
20733
+ var width = columns.getColumnCalcWidth(col);
20657
20734
  columns.setColumnRect(col, {
20658
- right: right
20735
+ right: right,
20736
+ width: width
20659
20737
  });
20660
20738
  columns.setFixedStyle(col, {
20661
20739
  right: "".concat(right, "px")
@@ -20664,10 +20742,10 @@ var useColumns = function useColumns(props) {
20664
20742
  }
20665
20743
  var left = 0;
20666
20744
  fixedLeftColumns.value.forEach(function (col) {
20667
- var _columns$getColumnRec2 = columns.getColumnRect(col),
20668
- width = _columns$getColumnRec2.width;
20745
+ var width = columns.getColumnCalcWidth(col);
20669
20746
  columns.setColumnRect(col, {
20670
- left: left
20747
+ left: left,
20748
+ width: width
20671
20749
  });
20672
20750
  columns.setFixedStyle(col, {
20673
20751
  left: "".concat(left, "px")
@@ -20710,6 +20788,135 @@ const virtual_render_namespaceObject = virtual_render_x({ ["default"]: () => __W
20710
20788
  var virtual_render_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
20711
20789
  var virtual_render_less_y = x => () => x
20712
20790
  const virtual_render_less_namespaceObject = virtual_render_less_x({ });
20791
+ ;// CONCATENATED MODULE: external "../loading"
20792
+ var loading_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
20793
+ var loading_y = x => () => x
20794
+ const loading_namespaceObject = loading_x({ ["BkLoadingMode"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__.BkLoadingMode, ["BkLoadingSize"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__.BkLoadingSize, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__["default"] });
20795
+ ;// CONCATENATED MODULE: external "../loading/loading.less"
20796
+ var loading_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
20797
+ var loading_less_y = x => () => x
20798
+ const loading_less_namespaceObject = loading_less_x({ });
20799
+ ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-scroll-loading.tsx
20800
+
20801
+
20802
+ /*
20803
+ * Tencent is pleased to support the open source community by making
20804
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
20805
+ *
20806
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
20807
+ *
20808
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
20809
+ *
20810
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
20811
+ *
20812
+ * ---------------------------------------------------
20813
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
20814
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
20815
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
20816
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
20817
+ *
20818
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
20819
+ * the Software.
20820
+ *
20821
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
20822
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20823
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20824
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20825
+ * IN THE SOFTWARE.
20826
+ */
20827
+
20828
+
20829
+
20830
+
20831
+ /* harmony default export */ const use_scroll_loading = (function (props, ctx) {
20832
+ var refScrollLoading = (0,external_vue_namespaceObject.toRef)(props, 'scrollLoading');
20833
+ var getLoadingOption = function getLoadingOption() {
20834
+ if (typeof refScrollLoading.value === 'boolean') {
20835
+ return {
20836
+ loading: !!refScrollLoading.value,
20837
+ inline: true,
20838
+ title: '',
20839
+ size: loading_namespaceObject.BkLoadingSize.Normal,
20840
+ mode: loading_namespaceObject.BkLoadingMode.Default,
20841
+ indicator: null
20842
+ };
20843
+ }
20844
+ return refScrollLoading.value;
20845
+ };
20846
+ var isRender = (0,external_vue_namespaceObject.computed)(function () {
20847
+ return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object');
20848
+ });
20849
+ var renderScrollLoading = function renderScrollLoading() {
20850
+ var _ctx$slots$fixedBotto3, _ctx$slots$fixedBotto4, _ctx$slots2;
20851
+ if (isRender.value) {
20852
+ var _ctx$slots$fixedBotto, _ctx$slots$fixedBotto2, _ctx$slots;
20853
+ var _getLoadingOption = getLoadingOption(),
20854
+ loading = _getLoadingOption.loading,
20855
+ size = _getLoadingOption.size,
20856
+ mode = _getLoadingOption.mode,
20857
+ title = _getLoadingOption.title,
20858
+ inline = _getLoadingOption.inline,
20859
+ indicator = _getLoadingOption.indicator;
20860
+ return (_ctx$slots$fixedBotto = (_ctx$slots$fixedBotto2 = (_ctx$slots = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto2 === void 0 ? void 0 : _ctx$slots$fixedBotto2.call(_ctx$slots)) !== null && _ctx$slots$fixedBotto !== void 0 ? _ctx$slots$fixedBotto : (0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
20861
+ loading: loading,
20862
+ size: size,
20863
+ mode: mode,
20864
+ title: title,
20865
+ inline: inline,
20866
+ indicator: indicator
20867
+ }, null);
20868
+ }
20869
+ return (_ctx$slots$fixedBotto3 = (_ctx$slots$fixedBotto4 = (_ctx$slots2 = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto4 === void 0 ? void 0 : _ctx$slots$fixedBotto4.call(_ctx$slots2)) !== null && _ctx$slots$fixedBotto3 !== void 0 ? _ctx$slots$fixedBotto3 : null;
20870
+ };
20871
+ return {
20872
+ renderScrollLoading: renderScrollLoading
20873
+ };
20874
+ });
20875
+ ;// CONCATENATED MODULE: ../../packages/table/src/components/ghost-body.tsx
20876
+
20877
+ /*
20878
+ * Tencent is pleased to support the open source community by making
20879
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
20880
+ *
20881
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
20882
+ *
20883
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
20884
+ *
20885
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
20886
+ *
20887
+ * ---------------------------------------------------
20888
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
20889
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
20890
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
20891
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
20892
+ *
20893
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
20894
+ * the Software.
20895
+ *
20896
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
20897
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20898
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20899
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20900
+ * IN THE SOFTWARE.
20901
+ */
20902
+
20903
+ /* harmony default export */ const ghost_body = ((0,external_vue_namespaceObject.defineComponent)({
20904
+ name: 'GhostBody',
20905
+ setup: function setup(_, ctx) {
20906
+ var columnGhostStyle = {
20907
+ zIndex: -1,
20908
+ width: 0,
20909
+ height: 0,
20910
+ display: 'none'
20911
+ };
20912
+ return function () {
20913
+ var _ctx$slots$default, _ctx$slots;
20914
+ return (0,external_vue_namespaceObject.createVNode)("div", {
20915
+ "style": columnGhostStyle
20916
+ }, [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)]);
20917
+ };
20918
+ }
20919
+ }));
20713
20920
  ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-layout.tsx
20714
20921
 
20715
20922
 
@@ -20750,6 +20957,8 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20750
20957
 
20751
20958
 
20752
20959
 
20960
+
20961
+
20753
20962
  /* harmony default export */ const use_layout = (function (props, ctx) {
20754
20963
  var _props$rowHeight;
20755
20964
  var refRoot = (0,external_vue_namespaceObject.ref)(null);
@@ -20759,72 +20968,82 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20759
20968
  var translateX = (0,external_vue_namespaceObject.ref)(0);
20760
20969
  var translateY = (0,external_vue_namespaceObject.ref)(0);
20761
20970
  var preBottom = (0,external_vue_namespaceObject.ref)(0);
20762
- var dragOffsetX = (0,external_vue_namespaceObject.ref)(-1000);
20971
+ var dragOffsetX = (0,external_vue_namespaceObject.ref)(-10000);
20763
20972
  var offsetRight = (0,external_vue_namespaceObject.ref)(0);
20764
20973
  var layout = (0,external_vue_namespaceObject.reactive)({});
20765
20974
  var fixedColumns = (0,external_vue_namespaceObject.reactive)([]);
20766
20975
  var lineHeight = (0,external_vue_namespaceObject.ref)((_props$rowHeight = props.rowHeight) !== null && _props$rowHeight !== void 0 ? _props$rowHeight : LINE_HEIGHT);
20976
+ var fixedBottomHeight = (0,external_vue_namespaceObject.computed)(function () {
20977
+ var _props$fixedBottom, _props$fixedBottom$he, _props$fixedBottom2, _props$fixedBottom$he2, _props$fixedBottom3;
20978
+ return ((_props$fixedBottom = props.fixedBottom) === null || _props$fixedBottom === void 0 ? void 0 : _props$fixedBottom.position) === 'relative' ? (_props$fixedBottom$he = (_props$fixedBottom2 = props.fixedBottom) === null || _props$fixedBottom2 === void 0 ? void 0 : _props$fixedBottom2.height) !== null && _props$fixedBottom$he !== void 0 ? _props$fixedBottom$he : LINE_HEIGHT : (_props$fixedBottom$he2 = (_props$fixedBottom3 = props.fixedBottom) === null || _props$fixedBottom3 === void 0 ? void 0 : _props$fixedBottom3.height) !== null && _props$fixedBottom$he2 !== void 0 ? _props$fixedBottom$he2 : 0;
20979
+ });
20767
20980
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
20768
20981
  resolveClassName = _usePrefix.resolveClassName;
20982
+ var _useScrollLoading = use_scroll_loading(props, ctx),
20983
+ renderScrollLoading = _useScrollLoading.renderScrollLoading;
20769
20984
  var tableClass = (0,external_vue_namespaceObject.computed)(function () {
20770
20985
  return (0,shared_namespaceObject.classes)(defineProperty_defineProperty({}, resolveClassName('table'), true), resolvePropBorderToClassStr(props.border));
20771
20986
  });
20772
20987
  var tableStyle = (0,external_vue_namespaceObject.computed)(function () {
20773
20988
  return {
20774
- height: resolveNumberOrStringToPix(props.height, '100%')
20989
+ height: resolveNumberOrStringToPix(props.height),
20990
+ maxHeight: resolveNumberOrStringToPix(props.maxHeight),
20991
+ minHeight: resolveNumberOrStringToPix(props.minHeight)
20775
20992
  };
20776
20993
  });
20777
20994
  var headClass = (0,external_vue_namespaceObject.computed)(function () {
20778
20995
  return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-head'), true), 'has-settings', !!props.settings));
20779
20996
  });
20997
+ var setFixedColumnShawdow = function setFixedColumnShawdow() {
20998
+ var _refRoot$value, _refRoot$value2;
20999
+ var rightShawdow = offsetRight.value > 0 ? '0 0 10px rgb(0 0 0 / 12%)' : null;
21000
+ var leftShawdow = translateX.value > 0 ? '0 0 10px rgb(0 0 0 / 12%)' : null;
21001
+ (_refRoot$value = refRoot.value) === null || _refRoot$value === void 0 || (_refRoot$value = _refRoot$value.style) === null || _refRoot$value === void 0 || _refRoot$value.setProperty('--shadow-right', rightShawdow);
21002
+ (_refRoot$value2 = refRoot.value) === null || _refRoot$value2 === void 0 || (_refRoot$value2 = _refRoot$value2.style) === null || _refRoot$value2 === void 0 || _refRoot$value2.setProperty('--shadow-left', leftShawdow);
21003
+ };
21004
+ var setRootStyleVars = (0,shared_namespaceObject.throttle)(function () {
21005
+ var _refRoot$value3, _refRoot$value4, _refRoot$value5, _refRoot$value6, _refRoot$value7;
21006
+ (_refRoot$value3 = refRoot.value) === null || _refRoot$value3 === void 0 || (_refRoot$value3 = _refRoot$value3.style) === null || _refRoot$value3 === void 0 || _refRoot$value3.setProperty('--drag-offset-x', "".concat(dragOffsetX.value, "px"));
21007
+ (_refRoot$value4 = refRoot.value) === null || _refRoot$value4 === void 0 || (_refRoot$value4 = _refRoot$value4.style) === null || _refRoot$value4 === void 0 || _refRoot$value4.setProperty('--drag-offset-h-x', "".concat(dragOffsetX.value - 2, "px"));
21008
+ (_refRoot$value5 = refRoot.value) === null || _refRoot$value5 === void 0 || (_refRoot$value5 = _refRoot$value5.style) === null || _refRoot$value5 === void 0 || _refRoot$value5.setProperty('--translate-y', "".concat(translateY.value, "px"));
21009
+ (_refRoot$value6 = refRoot.value) === null || _refRoot$value6 === void 0 || (_refRoot$value6 = _refRoot$value6.style) === null || _refRoot$value6 === void 0 || _refRoot$value6.setProperty('--translate-x', "".concat(translateX.value, "px"));
21010
+ (_refRoot$value7 = refRoot.value) === null || _refRoot$value7 === void 0 || (_refRoot$value7 = _refRoot$value7.style) === null || _refRoot$value7 === void 0 || _refRoot$value7.setProperty('--translate-x-1', "-".concat(translateX.value, "px"));
21011
+ setFixedColumnShawdow();
21012
+ });
20780
21013
  var setTranslateX = function setTranslateX(val) {
20781
21014
  translateX.value = val;
21015
+ setRootStyleVars();
20782
21016
  };
20783
21017
  var setTranslateY = function setTranslateY(val) {
20784
21018
  translateY.value = val;
21019
+ setRootStyleVars();
21020
+ };
21021
+ var initRootStyleVars = function initRootStyleVars() {
21022
+ var _refRoot$value8, _refRoot$value9, _refRoot$value10, _refRoot$value11, _refRoot$value12;
21023
+ (_refRoot$value8 = refRoot.value) === null || _refRoot$value8 === void 0 || (_refRoot$value8 = _refRoot$value8.style) === null || _refRoot$value8 === void 0 || _refRoot$value8.setProperty('--drag-offset-x', '-1000px');
21024
+ (_refRoot$value9 = refRoot.value) === null || _refRoot$value9 === void 0 || (_refRoot$value9 = _refRoot$value9.style) === null || _refRoot$value9 === void 0 || _refRoot$value9.setProperty('--drag-offset-h-x', '-1000px');
21025
+ (_refRoot$value10 = refRoot.value) === null || _refRoot$value10 === void 0 || (_refRoot$value10 = _refRoot$value10.style) === null || _refRoot$value10 === void 0 || _refRoot$value10.setProperty('--translate-y', '0px');
21026
+ (_refRoot$value11 = refRoot.value) === null || _refRoot$value11 === void 0 || (_refRoot$value11 = _refRoot$value11.style) === null || _refRoot$value11 === void 0 || _refRoot$value11.setProperty('--translate-x', '0px');
21027
+ (_refRoot$value12 = refRoot.value) === null || _refRoot$value12 === void 0 || (_refRoot$value12 = _refRoot$value12.style) === null || _refRoot$value12 === void 0 || _refRoot$value12.setProperty('--translate-x-1', '0px');
20785
21028
  };
20786
21029
  var setDragOffsetX = function setDragOffsetX(val) {
20787
21030
  dragOffsetX.value = val;
21031
+ setRootStyleVars();
20788
21032
  };
20789
21033
  var config = resolveHeadConfig(props);
21034
+ var headHeight = (0,external_vue_namespaceObject.computed)(function () {
21035
+ return resolvePropVal(config, 'height', ['thead']);
21036
+ });
20790
21037
  var headStyle = (0,external_vue_namespaceObject.computed)(function () {
20791
21038
  var _props$thead$color, _props$thead;
20792
21039
  return {
20793
- '--row-height': "".concat(resolvePropVal(config, 'height', ['thead']), "px"),
20794
- '--scroll-head-left': "-".concat(translateX.value, "px"),
20795
- '--scroll-left': "".concat(translateX.value, "px"),
21040
+ '--row-height': "".concat(headHeight.value, "px"),
20796
21041
  '--background-color': DEF_COLOR[(_props$thead$color = (_props$thead = props.thead) === null || _props$thead === void 0 ? void 0 : _props$thead.color) !== null && _props$thead$color !== void 0 ? _props$thead$color : IHeadColor.DEF1]
20797
21042
  };
20798
21043
  });
20799
21044
  var bodyClass = defineProperty_defineProperty({}, resolveClassName('table-body'), true);
20800
21045
  var footerClass = (0,external_vue_namespaceObject.computed)(function () {
20801
- return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-footer'), true), 'is-hidden', !props.pagination || !props.data.length));
20802
- });
20803
- var columnGhostStyle = {
20804
- zIndex: -1,
20805
- width: 0,
20806
- height: 0,
20807
- display: 'none'
20808
- };
20809
- var dragOffsetXStyle = {
20810
- position: 'absolute',
20811
- top: 0,
20812
- bottom: 0,
20813
- left: 0,
20814
- width: '1px',
20815
- backgroundColor: '#3785FF',
20816
- transform: 'translateX(-50%)'
20817
- };
20818
- var resizeColumnStyle = (0,external_vue_namespaceObject.computed)(function () {
20819
- return use_layout_objectSpread(use_layout_objectSpread({}, dragOffsetXStyle), {}, {
20820
- transform: "translate3d(".concat(dragOffsetX.value + 3, "px, ").concat(translateY.value, "px, 0)")
20821
- });
20822
- });
20823
- var resizeHeadColStyle = (0,external_vue_namespaceObject.computed)(function () {
20824
- return use_layout_objectSpread(use_layout_objectSpread({}, dragOffsetXStyle), {}, {
20825
- width: '6px',
20826
- transform: "translateX(".concat(dragOffsetX.value, "px)")
20827
- });
21046
+ return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-footer'), true), 'is-hidden', footHeight.value === 0));
20828
21047
  });
20829
21048
  var renderContainer = function renderContainer(childrend) {
20830
21049
  var _ctx$slots$default, _ctx$slots;
@@ -20832,19 +21051,22 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20832
21051
  "ref": refRoot,
20833
21052
  "style": tableStyle.value,
20834
21053
  "class": tableClass.value
20835
- }, [childrend, (0,external_vue_namespaceObject.createVNode)("div", {
20836
- "style": columnGhostStyle
20837
- }, [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)])]);
21054
+ }, [childrend, (0,external_vue_namespaceObject.createVNode)(ghost_body, null, {
21055
+ "default": function _default() {
21056
+ return [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)];
21057
+ }
21058
+ })]);
20838
21059
  };
20839
- var renderHeader = function renderHeader(childrend, settings) {
21060
+ var renderHeader = function renderHeader(childrend, settings, fixedRows) {
20840
21061
  return (0,external_vue_namespaceObject.createVNode)("div", {
20841
21062
  "ref": refHead,
20842
21063
  "style": headStyle.value,
20843
21064
  "class": headClass.value
20844
21065
  }, [childrend === null || childrend === void 0 ? void 0 : childrend(), (0,external_vue_namespaceObject.createVNode)("div", {
20845
- "style": resizeHeadColStyle.value,
20846
21066
  "class": "col-resize-drag"
20847
- }, null), settings === null || settings === void 0 ? void 0 : settings()]);
21067
+ }, null), (0,external_vue_namespaceObject.createVNode)("div", {
21068
+ "class": fixedWrapperClass
21069
+ }, [fixedRows === null || fixedRows === void 0 ? void 0 : fixedRows()]), settings === null || settings === void 0 ? void 0 : settings()]);
20848
21070
  };
20849
21071
  var prependStyle = (0,external_vue_namespaceObject.computed)(function () {
20850
21072
  return use_layout_objectSpread({
@@ -20863,8 +21085,16 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20863
21085
  return null;
20864
21086
  };
20865
21087
  var bodyHeight = (0,external_vue_namespaceObject.ref)('auto');
21088
+ var bodyMaxHeight = (0,external_vue_namespaceObject.computed)(function () {
21089
+ if (/^\d+\.?\d*(px|%)$/.test("".concat(tableStyle.value.maxHeight))) {
21090
+ var headerHeight = props.showHead ? headHeight.value : 0;
21091
+ var delHeight = footHeight.value + headerHeight + fixedBottomHeight.value;
21092
+ return "calc(".concat(tableStyle.value.maxHeight, " - ").concat(delHeight, "px)");
21093
+ }
21094
+ return null;
21095
+ });
20866
21096
  var setBodyHeight = function setBodyHeight(height) {
20867
- bodyHeight.value = height;
21097
+ bodyHeight.value = height - headHeight.value - fixedBottomHeight.value - footHeight.value;
20868
21098
  };
20869
21099
  var footHeight = (0,external_vue_namespaceObject.ref)(0);
20870
21100
  var footerStyle = (0,external_vue_namespaceObject.computed)(function () {
@@ -20881,6 +21111,10 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20881
21111
  }
20882
21112
  ctx.emit(EMIT_EVENTS.SCROLL_BOTTOM, use_layout_objectSpread({}, args));
20883
21113
  });
21114
+ /**
21115
+ * 设置横向滚动条距离右侧距离
21116
+ * 用于判定fix column的显示样式
21117
+ */
20884
21118
  var setOffsetRight = function setOffsetRight() {
20885
21119
  var _refBody$value$refRoo, _refBody$value, _refBody$value$refRoo2, _refBody$value2, _ref;
20886
21120
  var scrollWidth = (_refBody$value$refRoo = (_refBody$value = refBody.value) === null || _refBody$value === void 0 || (_refBody$value = _refBody$value.refRoot) === null || _refBody$value === void 0 ? void 0 : _refBody$value.scrollWidth) !== null && _refBody$value$refRoo !== void 0 ? _refBody$value$refRoo : 0;
@@ -20912,24 +21146,34 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20912
21146
  };
20913
21147
  var resizeColumnClass = {
20914
21148
  column_drag_line: true,
20915
- 'offset-x': true
21149
+ 'offset-x': true,
21150
+ 'resize-column': true
20916
21151
  };
20917
- var fixedWrapperClass = (0,external_vue_namespaceObject.computed)(function () {
20918
- return [resolveClassName('table-fixed'), {
20919
- 'shadow-right': offsetRight.value > 0,
20920
- 'shadow-left': translateX.value > 0
20921
- }];
20922
- });
21152
+ var fixedWrapperClass = resolveClassName('table-fixed');
20923
21153
  var fixedBottomRow = resolveClassName('table-fixed-bottom');
20924
- var fixedWrapperStyle = (0,external_vue_namespaceObject.computed)(function () {
21154
+ var fixedBottomLoadingStyle = (0,external_vue_namespaceObject.computed)(function () {
21155
+ var _props$fixedBottom$po, _props$fixedBottom4, _props$fixedBottom$he3, _props$fixedBottom5;
20925
21156
  return {
20926
- transform: "translate3d(".concat(translateX.value, "px, ").concat(translateY.value, "px, 0)")
21157
+ minHeight: "".concat(lineHeight.value, "px"),
21158
+ position: (_props$fixedBottom$po = (_props$fixedBottom4 = props.fixedBottom) === null || _props$fixedBottom4 === void 0 ? void 0 : _props$fixedBottom4.position) !== null && _props$fixedBottom$po !== void 0 ? _props$fixedBottom$po : 'absolute',
21159
+ height: (_props$fixedBottom$he3 = (_props$fixedBottom5 = props.fixedBottom) === null || _props$fixedBottom5 === void 0 ? void 0 : _props$fixedBottom5.height) !== null && _props$fixedBottom$he3 !== void 0 ? _props$fixedBottom$he3 : null
20927
21160
  };
20928
21161
  });
20929
21162
  (0,external_vue_namespaceObject.onMounted)(function () {
20930
21163
  setOffsetRight();
21164
+ initRootStyleVars();
20931
21165
  });
20932
- var renderBody = function renderBody(list, childrend, fixedRows, loadingRow) {
21166
+ var getFixedBottomRender = function getFixedBottomRender() {
21167
+ var result = renderScrollLoading === null || renderScrollLoading === void 0 ? void 0 : renderScrollLoading();
21168
+ if (result) {
21169
+ return (0,external_vue_namespaceObject.createVNode)("div", {
21170
+ "style": fixedBottomLoadingStyle.value,
21171
+ "class": fixedBottomRow
21172
+ }, [result]);
21173
+ }
21174
+ return null;
21175
+ };
21176
+ var renderBody = function renderBody(list, childrend, fixedRows) {
20933
21177
  return (0,external_vue_namespaceObject.createVNode)(virtual_render_namespaceObject["default"], {
20934
21178
  "ref": refBody,
20935
21179
  "height": bodyHeight.value,
@@ -20942,6 +21186,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20942
21186
  "scrollbar": {
20943
21187
  enabled: props.scrollbar
20944
21188
  },
21189
+ "maxHeight": bodyMaxHeight.value,
20945
21190
  "throttleDelay": 120,
20946
21191
  "onContentScroll": handleScrollChanged
20947
21192
  }, {
@@ -20949,20 +21194,15 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20949
21194
  return renderPrepend();
20950
21195
  },
20951
21196
  "default": function _default(scope) {
20952
- return childrend === null || childrend === void 0 ? void 0 : childrend(scope.data);
21197
+ var _scope$data;
21198
+ return childrend === null || childrend === void 0 ? void 0 : childrend((_scope$data = scope === null || scope === void 0 ? void 0 : scope.data) !== null && _scope$data !== void 0 ? _scope$data : []);
20953
21199
  },
20954
21200
  afterSection: function afterSection() {
20955
- var _ctx$slots$appendBott, _ctx$slots2;
20956
21201
  return [(0,external_vue_namespaceObject.createVNode)("div", {
20957
- "style": resizeColumnStyle.value,
20958
21202
  "class": resizeColumnClass
20959
21203
  }, null), (0,external_vue_namespaceObject.createVNode)("div", {
20960
- "style": fixedWrapperStyle.value,
20961
- "class": fixedWrapperClass.value
20962
- }, [fixedRows === null || fixedRows === void 0 ? void 0 : fixedRows()]), (0,external_vue_namespaceObject.createVNode)("div", null, [(_ctx$slots$appendBott = (_ctx$slots2 = ctx.slots).appendBottom) === null || _ctx$slots$appendBott === void 0 ? void 0 : _ctx$slots$appendBott.call(_ctx$slots2)]), (0,external_vue_namespaceObject.createVNode)("div", {
20963
- "style": fixedWrapperStyle.value,
20964
- "class": fixedBottomRow
20965
- }, [loadingRow === null || loadingRow === void 0 ? void 0 : loadingRow()])];
21204
+ "class": fixedWrapperClass
21205
+ }, [fixedRows === null || fixedRows === void 0 ? void 0 : fixedRows()])];
20966
21206
  }
20967
21207
  });
20968
21208
  };
@@ -20977,11 +21217,15 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20977
21217
  fixedColumns.length = 0;
20978
21218
  fixedColumns.push.apply(fixedColumns, _toConsumableArray(values));
20979
21219
  };
21220
+ var renderFixedBottom = function renderFixedBottom() {
21221
+ return getFixedBottomRender();
21222
+ };
20980
21223
  return {
20981
21224
  renderContainer: renderContainer,
20982
21225
  renderHeader: renderHeader,
20983
21226
  renderBody: renderBody,
20984
21227
  renderFooter: renderFooter,
21228
+ renderFixedBottom: renderFixedBottom,
20985
21229
  setBodyHeight: setBodyHeight,
20986
21230
  setFootHeight: setFootHeight,
20987
21231
  setTranslateX: setTranslateX,
@@ -20989,6 +21233,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
20989
21233
  setFixedColumns: setFixedColumns,
20990
21234
  setOffsetRight: setOffsetRight,
20991
21235
  setLineHeight: setLineHeight,
21236
+ initRootStyleVars: initRootStyleVars,
20992
21237
  refRoot: refRoot,
20993
21238
  refHead: refHead,
20994
21239
  refBody: refBody,
@@ -21096,6 +21341,9 @@ var usePagination = function usePagination(props) {
21096
21341
  * 如果手动禁用分页,则禁用前端分页,否则启用前端分页
21097
21342
  */
21098
21343
  var isEnabled = (0,external_vue_namespaceObject.ref)(true);
21344
+ var totalPage = (0,external_vue_namespaceObject.computed)(function () {
21345
+ return Math.ceil(pagination.count / pagination.limit);
21346
+ });
21099
21347
  var setPagination = function setPagination(option) {
21100
21348
  Object.assign(pagination, {
21101
21349
  enabled: !!props.pagination
@@ -21103,7 +21351,7 @@ var usePagination = function usePagination(props) {
21103
21351
  /**
21104
21352
  * 如果分页组件启用了前端分页,则重置分页组件数据
21105
21353
  */
21106
- if (pagination.current * pagination.limit >= pagination.count) {
21354
+ if (pagination.current > totalPage.value) {
21107
21355
  pagination.current = 1;
21108
21356
  }
21109
21357
  };
@@ -21115,7 +21363,7 @@ var usePagination = function usePagination(props) {
21115
21363
  return [props.pagination];
21116
21364
  }, function () {
21117
21365
  if (typeof_typeof(props.pagination) === 'object') {
21118
- setPagination(props.pagination);
21366
+ setPagination((0,external_vue_namespaceObject.toRaw)(props.pagination));
21119
21367
  }
21120
21368
  /**
21121
21369
  * 分页组件是否启用
@@ -21123,7 +21371,8 @@ var usePagination = function usePagination(props) {
21123
21371
  */
21124
21372
  pagination.enabled = isEnabled.value && !!props.pagination;
21125
21373
  }, {
21126
- immediate: true
21374
+ immediate: true,
21375
+ deep: true
21127
21376
  });
21128
21377
  (0,external_vue_namespaceObject.watch)(function () {
21129
21378
  return [props.data];
@@ -21154,18 +21403,6 @@ var usePagination = function usePagination(props) {
21154
21403
  };
21155
21404
  };
21156
21405
  /* harmony default export */ const use_pagination = (usePagination);
21157
- ;// CONCATENATED MODULE: external "../checkbox"
21158
- var checkbox_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21159
- var checkbox_y = x => () => x
21160
- const checkbox_namespaceObject = checkbox_x({ ["BkCheckboxGroup"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__.BkCheckboxGroup, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__["default"] });
21161
- ;// CONCATENATED MODULE: external "../checkbox/checkbox.less"
21162
- var checkbox_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21163
- var checkbox_less_y = x => () => x
21164
- const checkbox_less_namespaceObject = checkbox_less_x({ });
21165
- ;// CONCATENATED MODULE: external "../icon"
21166
- var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21167
- var icon_y = x => () => x
21168
- const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.DownShape, ["Funnel"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Funnel, ["GragFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.GragFill, ["RightShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.RightShape });
21169
21406
  ;// CONCATENATED MODULE: external "../pagination"
21170
21407
  var pagination_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21171
21408
  var pagination_y = x => () => x
@@ -21302,7 +21539,8 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
21302
21539
  var isTipsEnabled = (0,external_vue_namespaceObject.ref)(false);
21303
21540
  var cellStyle = (0,external_vue_namespaceObject.computed)(function () {
21304
21541
  return {
21305
- textAlign: props.column.textAlign
21542
+ textAlign: props.column.textAlign,
21543
+ minWidth: resolveNumberOrStringToPix(props.column.minWidth, null)
21306
21544
  };
21307
21545
  });
21308
21546
  var resolveSetting = function resolveSetting() {
@@ -21321,12 +21559,12 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
21321
21559
  mode: mode,
21322
21560
  resizerWay: undefined,
21323
21561
  watchCellResize: undefined,
21324
- popoverOption: popoverOption
21562
+ popoverOption: popoverOption,
21563
+ allowHtml: false
21325
21564
  }
21326
21565
  };
21327
21566
  if (props.parentSetting !== null && typeof_typeof(props.parentSetting) === 'object') {
21328
- Object.assign(result.showOverflowTooltip, props.parentSetting);
21329
- Object.assign(result.showOverflowTooltip, {
21567
+ Object.assign(result.showOverflowTooltip, props.parentSetting, {
21330
21568
  disabled: !props.column.showOverflowTooltip
21331
21569
  });
21332
21570
  if (typeof_typeof(props.column.showOverflowTooltip) === 'object') {
@@ -21340,14 +21578,23 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
21340
21578
  };
21341
21579
  };
21342
21580
  var bkEllipsisIns = null;
21581
+ var getContentValue = function getContentValue() {
21582
+ var _target$innerText;
21583
+ var allowHtml = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
21584
+ var target = getEllipsisTarget();
21585
+ if (allowHtml) {
21586
+ var _target$cloneNode, _target$cloneNode2;
21587
+ return (_target$cloneNode = target === null || target === void 0 || (_target$cloneNode2 = target.cloneNode) === null || _target$cloneNode2 === void 0 ? void 0 : _target$cloneNode2.call(target, true)) !== null && _target$cloneNode !== void 0 ? _target$cloneNode : '';
21588
+ }
21589
+ return (_target$innerText = target === null || target === void 0 ? void 0 : target.innerText) !== null && _target$innerText !== void 0 ? _target$innerText : '';
21590
+ };
21343
21591
  var resolveTooltipOption = function resolveTooltipOption() {
21344
- var _getEllipsisTarget$cl, _getEllipsisTarget, _getEllipsisTarget$cl2;
21345
21592
  var _resolveSetting = resolveSetting(),
21346
21593
  _resolveSetting$showO = _resolveSetting.showOverflowTooltip,
21347
21594
  showOverflowTooltip = _resolveSetting$showO === void 0 ? false : _resolveSetting$showO;
21348
21595
  var disabled = true;
21349
21596
  var resizerWay = props.resizerWay;
21350
- var defaultContent = (_getEllipsisTarget$cl = (_getEllipsisTarget = getEllipsisTarget()) === null || _getEllipsisTarget === void 0 || (_getEllipsisTarget$cl2 = _getEllipsisTarget.cloneNode) === null || _getEllipsisTarget$cl2 === void 0 ? void 0 : _getEllipsisTarget$cl2.call(_getEllipsisTarget, true)) !== null && _getEllipsisTarget$cl !== void 0 ? _getEllipsisTarget$cl : '';
21597
+ var defaultContent = getContentValue(showOverflowTooltip.allowHtml);
21351
21598
  var content = function content() {
21352
21599
  return defaultContent;
21353
21600
  };
@@ -21392,8 +21639,8 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
21392
21639
  disabled = !((_props$column$showOve5 = (_props$column = props.column) === null || _props$column === void 0 || (_props$column = _props$column.showOverflowTooltip) === null || _props$column === void 0 ? void 0 : _props$column.showHead) !== null && _props$column$showOve5 !== void 0 ? _props$column$showOve5 : true);
21393
21640
  mode = 'auto';
21394
21641
  content = function content() {
21395
- var _getEllipsisTarget$cl3, _getEllipsisTarget2, _getEllipsisTarget2$c;
21396
- return (_getEllipsisTarget$cl3 = (_getEllipsisTarget2 = getEllipsisTarget()) === null || _getEllipsisTarget2 === void 0 || (_getEllipsisTarget2$c = _getEllipsisTarget2.cloneNode) === null || _getEllipsisTarget2$c === void 0 ? void 0 : _getEllipsisTarget2$c.call(_getEllipsisTarget2, true)) !== null && _getEllipsisTarget$cl3 !== void 0 ? _getEllipsisTarget$cl3 : '';
21642
+ var _getEllipsisTarget$cl, _getEllipsisTarget, _getEllipsisTarget$cl2;
21643
+ return (_getEllipsisTarget$cl = (_getEllipsisTarget = getEllipsisTarget()) === null || _getEllipsisTarget === void 0 || (_getEllipsisTarget$cl2 = _getEllipsisTarget.cloneNode) === null || _getEllipsisTarget$cl2 === void 0 ? void 0 : _getEllipsisTarget$cl2.call(_getEllipsisTarget, true)) !== null && _getEllipsisTarget$cl !== void 0 ? _getEllipsisTarget$cl : '';
21397
21644
  };
21398
21645
  if (props.headExplain) {
21399
21646
  mode = 'static';
@@ -21518,6 +21765,14 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
21518
21765
  return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)]);
21519
21766
  }
21520
21767
  }));
21768
+ ;// CONCATENATED MODULE: external "../checkbox"
21769
+ var checkbox_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21770
+ var checkbox_y = x => () => x
21771
+ const checkbox_namespaceObject = checkbox_x({ ["BkCheckboxGroup"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__.BkCheckboxGroup, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__["default"] });
21772
+ ;// CONCATENATED MODULE: external "../checkbox/checkbox.less"
21773
+ var checkbox_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21774
+ var checkbox_less_y = x => () => x
21775
+ const checkbox_less_namespaceObject = checkbox_less_x({ });
21521
21776
  ;// CONCATENATED MODULE: external "../button"
21522
21777
  var button_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21523
21778
  var button_y = x => () => x
@@ -21526,7 +21781,11 @@ const button_namespaceObject = button_x({ ["default"]: () => __WEBPACK_EXTERNAL_
21526
21781
  var button_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21527
21782
  var button_less_y = x => () => x
21528
21783
  const button_less_namespaceObject = button_less_x({ });
21529
- ;// CONCATENATED MODULE: external "../input"
21784
+ ;// CONCATENATED MODULE: external "../icon"
21785
+ var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21786
+ var icon_y = x => () => x
21787
+ const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.DownShape, ["Funnel"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Funnel, ["GragFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.GragFill, ["RightShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.RightShape });
21788
+ ;// CONCATENATED MODULE: external "../input"
21530
21789
  var input_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
21531
21790
  var input_y = x => () => x
21532
21791
  const input_namespaceObject = input_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_input_d525237e__["default"] });
@@ -21616,14 +21875,6 @@ var ROW_HEIGHT = 32;
21616
21875
  isOpen: false,
21617
21876
  checked: checked.value
21618
21877
  });
21619
- (0,external_vue_namespaceObject.watch)(function () {
21620
- return filter.value;
21621
- }, function () {
21622
- state.checked = checked.value;
21623
- }, {
21624
- immediate: true,
21625
- deep: true
21626
- });
21627
21878
  var headClass = (0,external_vue_namespaceObject.computed)(function () {
21628
21879
  return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-head-action'), true), 'column-filter', true), '--row-height', "".concat(props.height, "px")), "active", state.checked.length), "opened", state.isOpen));
21629
21880
  });
@@ -21643,7 +21894,8 @@ var ROW_HEIGHT = 32;
21643
21894
  var _filter$value$list = filter.value.list,
21644
21895
  list = _filter$value$list === void 0 ? [] : _filter$value$list;
21645
21896
  var filterList = list.filter(function (l) {
21646
- return getRegExp(searchValue.value).test(l.value);
21897
+ var reg = getRegExp(searchValue.value);
21898
+ return reg.test(l.label) || reg.test(l.value);
21647
21899
  });
21648
21900
  return filterList;
21649
21901
  });
@@ -22227,6 +22479,250 @@ function use_head_isSlot(s) {
22227
22479
  getTH: getTH
22228
22480
  };
22229
22481
  });
22482
+ ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-cell.tsx
22483
+
22484
+
22485
+ /*
22486
+ * Tencent is pleased to support the open source community by making
22487
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
22488
+ *
22489
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
22490
+ *
22491
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
22492
+ *
22493
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
22494
+ *
22495
+ * ---------------------------------------------------
22496
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
22497
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
22498
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
22499
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
22500
+ *
22501
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
22502
+ * the Software.
22503
+ *
22504
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
22505
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22506
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
22507
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22508
+ * IN THE SOFTWARE.
22509
+ */
22510
+
22511
+
22512
+
22513
+
22514
+
22515
+
22516
+
22517
+ /* harmony default export */ const use_cell = (function (_ref) {
22518
+ var props = _ref.props,
22519
+ rows = _ref.rows,
22520
+ ctx = _ref.ctx,
22521
+ columns = _ref.columns,
22522
+ row = _ref.row,
22523
+ index = _ref.index,
22524
+ column = _ref.column,
22525
+ _ref$isChild = _ref.isChild,
22526
+ isChild = _ref$isChild === void 0 ? false : _ref$isChild,
22527
+ multiShiftKey = _ref.multiShiftKey;
22528
+ var isShiftKeyDown = multiShiftKey.isShiftKeyDown,
22529
+ getStore = multiShiftKey.getStore,
22530
+ setStore = multiShiftKey.setStore,
22531
+ setStoreStart = multiShiftKey.setStoreStart,
22532
+ clearStoreStart = multiShiftKey.clearStoreStart;
22533
+ var renderCheckboxColumn = function renderCheckboxColumn() {
22534
+ var handleChecked = function handleChecked(value, event) {
22535
+ event.stopImmediatePropagation();
22536
+ event.preventDefault();
22537
+ event.stopPropagation();
22538
+ if (!isShiftKeyDown.value) {
22539
+ if (value) {
22540
+ setStoreStart(row, index);
22541
+ } else {
22542
+ clearStoreStart();
22543
+ }
22544
+ }
22545
+ rows.setRowSelection(row, value);
22546
+ columns.setColumnAttribute(column, COLUMN_ATTRIBUTE.SELECTION_INDETERMINATE, rows.getRowIndeterminate());
22547
+ columns.setColumnAttribute(column, COLUMN_ATTRIBUTE.SELECTION_VAL, rows.getRowCheckedAllValue());
22548
+ ctx.emit(EMIT_EVENTS.ROW_SELECT, {
22549
+ row: row,
22550
+ index: index,
22551
+ checked: value,
22552
+ data: props.data
22553
+ });
22554
+ ctx.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
22555
+ row: row,
22556
+ index: index,
22557
+ checked: value,
22558
+ data: props.data
22559
+ });
22560
+ };
22561
+ var beforeRowChange = function beforeRowChange() {
22562
+ if (isShiftKeyDown.value) {
22563
+ var result = setStore(row, index);
22564
+ if (result) {
22565
+ var _rows$pageRowList$sli;
22566
+ var _getStore = getStore(),
22567
+ start = _getStore.start,
22568
+ end = _getStore.end;
22569
+ var startIndex = start.index < end.index ? start.index : end.index;
22570
+ var endIndex = start.index < end.index ? end.index : start.index;
22571
+ ((_rows$pageRowList$sli = rows.pageRowList.slice(startIndex, endIndex + 1)) !== null && _rows$pageRowList$sli !== void 0 ? _rows$pageRowList$sli : []).forEach(function (item) {
22572
+ var isRowEnabled = isRowSelectEnable(props, {
22573
+ row: row,
22574
+ index: index,
22575
+ isCheckAll: false
22576
+ });
22577
+ isRowEnabled && rows.setRowSelection(item, true);
22578
+ });
22579
+ }
22580
+ ctx.emit(EMIT_EVENTS.ROW_SELECT, {
22581
+ row: row,
22582
+ index: index,
22583
+ checked: true,
22584
+ data: props.data,
22585
+ isShiftKeyDown: true
22586
+ });
22587
+ ctx.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
22588
+ row: row,
22589
+ index: index,
22590
+ checked: true,
22591
+ data: props.data,
22592
+ isShiftKeyDown: true
22593
+ });
22594
+ return Promise.resolve(!result);
22595
+ }
22596
+ return Promise.resolve(true);
22597
+ };
22598
+ var indeterminate = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE);
22599
+ var isChecked = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION);
22600
+ var isEnable = isRowSelectEnable(props, {
22601
+ row: row,
22602
+ index: index,
22603
+ isCheckAll: false
22604
+ });
22605
+ return (0,external_vue_namespaceObject.createVNode)(checkbox_namespaceObject["default"], {
22606
+ "beforeChange": beforeRowChange,
22607
+ "disabled": !isEnable,
22608
+ "indeterminate": indeterminate,
22609
+ "modelValue": isChecked,
22610
+ "onChange": handleChecked
22611
+ }, null);
22612
+ };
22613
+ /**
22614
+ * 渲染表格Cell内容
22615
+ * @param row 当前行
22616
+ * @param column 当前列
22617
+ * @param index 当前列
22618
+ * @param rows 当前列
22619
+ * @returns
22620
+ */
22621
+ var renderCell = function renderCell() {
22622
+ var _renderFn$column$type, _renderFn$column$type2;
22623
+ var defaultFn = function defaultFn() {
22624
+ var type = resolvePropVal(column, 'type', [column, row]);
22625
+ if (type === 'index') {
22626
+ return rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_INDEX);
22627
+ }
22628
+ var key = resolvePropVal(column, 'field', [column, row]);
22629
+ var cell = getRowText(row, key);
22630
+ if (typeof column.render === 'function') {
22631
+ return renderCellCallbackFn();
22632
+ }
22633
+ if (typeof cell === 'boolean') {
22634
+ return String(cell);
22635
+ }
22636
+ if (!cell && typeof cell !== 'number') {
22637
+ var emptyCellText = props.emptyCellText;
22638
+ if (emptyCellText) {
22639
+ if (typeof emptyCellText === 'function') {
22640
+ return emptyCellText(row, column, index, rows.tableRowList.value);
22641
+ }
22642
+ return emptyCellText;
22643
+ }
22644
+ }
22645
+ if (typeof_typeof(cell) === 'object') {
22646
+ return JSON.stringify((0,external_vue_namespaceObject.unref)(cell));
22647
+ }
22648
+ return cell;
22649
+ };
22650
+ var renderFn = {
22651
+ expand: function expand() {
22652
+ return isChild ? '' : renderExpandColumn();
22653
+ },
22654
+ selection: function selection() {
22655
+ return renderCheckboxColumn();
22656
+ },
22657
+ drag: renderDraggableCell
22658
+ };
22659
+ return (_renderFn$column$type = (_renderFn$column$type2 = renderFn[column.type]) === null || _renderFn$column$type2 === void 0 ? void 0 : _renderFn$column$type2.call(renderFn, row, column, index, rows)) !== null && _renderFn$column$type !== void 0 ? _renderFn$column$type : defaultFn();
22660
+ };
22661
+ var renderCellCallbackFn = function renderCellCallbackFn() {
22662
+ var cell = getRowText(row, resolvePropVal(column, 'field', [column, row]));
22663
+ var data = row;
22664
+ return column.render({
22665
+ cell: cell,
22666
+ data: data,
22667
+ row: row,
22668
+ column: column,
22669
+ index: index,
22670
+ rows: rows.tableRowList.value
22671
+ });
22672
+ };
22673
+ var getExpandCell = function getExpandCell() {
22674
+ var _ctx$slots$expandCont, _ctx$slots$expandCont2, _ctx$slots;
22675
+ var isExpand = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND);
22676
+ var icon = isExpand ? (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.DownShape, null, null) : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.RightShape, null, null);
22677
+ return (0,external_vue_namespaceObject.createVNode)("span", null, [[icon, (_ctx$slots$expandCont = (_ctx$slots$expandCont2 = (_ctx$slots = ctx.slots).expandContent) === null || _ctx$slots$expandCont2 === void 0 ? void 0 : _ctx$slots$expandCont2.call(_ctx$slots, row)) !== null && _ctx$slots$expandCont !== void 0 ? _ctx$slots$expandCont : '']]);
22678
+ };
22679
+ var handleRowExpandClick = function handleRowExpandClick(e) {
22680
+ rows.setRowExpand(row, !rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND));
22681
+ ctx.emit(EMIT_EVENTS.ROW_EXPAND_CLICK, {
22682
+ row: row,
22683
+ column: column,
22684
+ index: index,
22685
+ rows: rows.tableRowList.value,
22686
+ e: e
22687
+ });
22688
+ };
22689
+ var renderExpandColumn = function renderExpandColumn() {
22690
+ var renderExpandSlot = function renderExpandSlot() {
22691
+ var _ctx$slots$expandCell, _ctx$slots$expandCell2, _ctx$slots2;
22692
+ if (typeof column.render === 'function') {
22693
+ return renderCellCallbackFn();
22694
+ }
22695
+ return (_ctx$slots$expandCell = (_ctx$slots$expandCell2 = (_ctx$slots2 = ctx.slots).expandCell) === null || _ctx$slots$expandCell2 === void 0 ? void 0 : _ctx$slots$expandCell2.call(_ctx$slots2, {
22696
+ row: row,
22697
+ column: column,
22698
+ index: index,
22699
+ rows: rows
22700
+ })) !== null && _ctx$slots$expandCell !== void 0 ? _ctx$slots$expandCell : getExpandCell();
22701
+ };
22702
+ return (0,external_vue_namespaceObject.createVNode)("span", {
22703
+ "class": "expand-btn-action",
22704
+ "onClick": function onClick(e) {
22705
+ return handleRowExpandClick(e);
22706
+ }
22707
+ }, [renderExpandSlot()]);
22708
+ };
22709
+ var renderDraggableCell = function renderDraggableCell() {
22710
+ var _props$rowDraggable$r, _props$rowDraggable, _props$rowDraggable$f, _props$rowDraggable2, _props$rowDraggable$i, _props$rowDraggable3;
22711
+ var renderFn = (_props$rowDraggable$r = (_props$rowDraggable = props.rowDraggable) === null || _props$rowDraggable === void 0 ? void 0 : _props$rowDraggable.render) !== null && _props$rowDraggable$r !== void 0 ? _props$rowDraggable$r : props.rowDraggable;
22712
+ if (typeof renderFn === 'function') {
22713
+ return renderFn(row, column, index, rows.tableRowList.value);
22714
+ }
22715
+ var fontSize = (_props$rowDraggable$f = (_props$rowDraggable2 = props.rowDraggable) === null || _props$rowDraggable2 === void 0 ? void 0 : _props$rowDraggable2.fontSize) !== null && _props$rowDraggable$f !== void 0 ? _props$rowDraggable$f : '14px';
22716
+ var fontIcon = (_props$rowDraggable$i = (_props$rowDraggable3 = props.rowDraggable) === null || _props$rowDraggable3 === void 0 ? void 0 : _props$rowDraggable3.icon) !== null && _props$rowDraggable$i !== void 0 ? _props$rowDraggable$i : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.GragFill, {
22717
+ "style": "'--font-size: ".concat(fontSize, ";'"),
22718
+ "class": "drag-cell"
22719
+ }, null);
22720
+ return fontIcon;
22721
+ };
22722
+ return {
22723
+ renderCell: renderCell
22724
+ };
22725
+ });
22230
22726
  ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-shift-key.tsx
22231
22727
  /*
22232
22728
  * Tencent is pleased to support the open source community by making
@@ -22254,7 +22750,7 @@ function use_head_isSlot(s) {
22254
22750
  * IN THE SOFTWARE.
22255
22751
  */
22256
22752
 
22257
- /* harmony default export */ const use_shift_key = (function (props) {
22753
+ var multiShiftKey = function multiShiftKey(props) {
22258
22754
  var isShiftKeyDown = (0,external_vue_namespaceObject.ref)(false);
22259
22755
  var store = {
22260
22756
  start: null,
@@ -22305,21 +22801,23 @@ function use_head_isSlot(s) {
22305
22801
  var getStore = function getStore() {
22306
22802
  return store;
22307
22803
  };
22308
- (0,external_vue_namespaceObject.onUnmounted)(function () {
22804
+ var removeMultiCheckedEvents = function removeMultiCheckedEvents() {
22309
22805
  if (props.shiftMultiChecked) {
22310
22806
  window.removeEventListener('keydown', handleKeyDown);
22311
22807
  window.removeEventListener('keyup', handleKeyUp);
22312
22808
  }
22313
- });
22809
+ };
22314
22810
  return {
22315
22811
  isShiftKeyDown: isShiftKeyDown,
22316
22812
  setStore: setStore,
22317
22813
  getStore: getStore,
22318
22814
  clearStore: clearStore,
22319
22815
  setStoreStart: setStoreStart,
22320
- clearStoreStart: clearStoreStart
22816
+ clearStoreStart: clearStoreStart,
22817
+ removeMultiCheckedEvents: removeMultiCheckedEvents
22321
22818
  };
22322
- });
22819
+ };
22820
+ /* harmony default export */ const use_shift_key = (multiShiftKey);
22323
22821
  ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-render.tsx
22324
22822
 
22325
22823
 
@@ -22363,8 +22861,6 @@ function use_head_isSlot(s) {
22363
22861
 
22364
22862
 
22365
22863
 
22366
-
22367
-
22368
22864
  function use_render_isSlot(s) {
22369
22865
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
22370
22866
  }
@@ -22378,6 +22874,7 @@ function use_render_isSlot(s) {
22378
22874
  var t = (0,config_provider_namespaceObject.useLocale)('table');
22379
22875
  var uuid = esm_browser_v4();
22380
22876
  var dragEvents = {};
22877
+ var multiShiftKey = use_shift_key(props);
22381
22878
  /**
22382
22879
  * 渲染table colgroup
22383
22880
  * @returns
@@ -22388,9 +22885,9 @@ function use_render_isSlot(s) {
22388
22885
  var minWidth = columns.getColumnAttribute(column, COLUMN_ATTRIBUTE.COL_MIN_WIDTH);
22389
22886
  return (0,external_vue_namespaceObject.createVNode)("col", {
22390
22887
  "style": {
22888
+ width: resolveNumberOrStringToPix(width, 'auto'),
22391
22889
  minWidth: resolveNumberOrStringToPix(minWidth, 'auto')
22392
- },
22393
- "width": width
22890
+ }
22394
22891
  }, null);
22395
22892
  })]);
22396
22893
  };
@@ -22420,294 +22917,98 @@ function use_render_isSlot(s) {
22420
22917
  }),
22421
22918
  getTH = _useHead.getTH;
22422
22919
  return getTH();
22423
- })])];
22424
- }
22425
- })])]);
22426
- };
22427
- var renderColumns = function renderColumns() {
22428
- if (!props.showHead) {
22429
- return null;
22430
- }
22431
- return (0,external_vue_namespaceObject.createVNode)("table", {
22432
- "cellpadding": 0,
22433
- "cellspacing": 0
22434
- }, [renderColgroup(), renderHeader()]);
22435
- };
22436
- /** **************************************** Rows Render ******************************* **/
22437
- /**
22438
- * 渲染Table Body
22439
- * @returns
22440
- */
22441
- var renderRows = function renderRows(dataList) {
22442
- var preRow = {};
22443
- var rowSpanMap = new WeakMap();
22444
- var needRowSpan = columns.needRowSpan.value;
22445
- return (0,external_vue_namespaceObject.createVNode)("tbody", null, [dataList.map(function (row, rowIndex) {
22446
- var result = getRowRender(row, rowIndex, preRow, dataList, rowSpanMap, needRowSpan);
22447
- preRow = row;
22448
- return result;
22449
- })]);
22450
- };
22451
- var getRowHeight = function getRowHeight(row, rowIndex) {
22452
- var _settings$options = settings.options,
22453
- size = _settings$options.size,
22454
- height = _settings$options.height;
22455
- if (height !== null && height !== undefined) {
22456
- return resolvePropVal(settings.options, 'height', ['tbody', row, rowIndex, size]);
22457
- }
22458
- return resolvePropVal(props, 'rowHeight', ['tbody', row, rowIndex]);
22459
- };
22460
- var setDragEvents = function setDragEvents(events) {
22461
- dragEvents = events;
22462
- };
22463
- /**
22464
- * 渲染Table主体
22465
- * @param rows 表格数据
22466
- * @returns
22467
- */
22468
- var renderTBody = function renderTBody(list) {
22469
- var dataList = list !== null && list !== void 0 ? list : rows.pageRowList;
22470
- var localEmptyText = (0,external_vue_namespaceObject.computed)(function () {
22471
- if (props.emptyText === undefined) {
22472
- return t.value.emptyText;
22473
- }
22474
- return props.emptyText;
22475
- });
22476
- if (!dataList.length) {
22477
- var _ctx$slots$empty, _ctx$slots$empty2, _ctx$slots;
22478
- return (_ctx$slots$empty = (_ctx$slots$empty2 = (_ctx$slots = ctx.slots).empty) === null || _ctx$slots$empty2 === void 0 ? void 0 : _ctx$slots$empty2.call(_ctx$slots)) !== null && _ctx$slots$empty !== void 0 ? _ctx$slots$empty : (0,external_vue_namespaceObject.createVNode)(body_empty, {
22479
- "emptyText": localEmptyText.value,
22480
- "filterList": dataList,
22481
- "list": props.data
22482
- }, null);
22483
- }
22484
- return (0,external_vue_namespaceObject.createVNode)("table", {
22485
- "cellpadding": 0,
22486
- "cellspacing": 0,
22487
- "data-table-uuid": uuid
22488
- }, [renderColgroup(), renderRows(dataList)]);
22489
- };
22490
- /**
22491
- * table row click handle
22492
- * @param e
22493
- * @param row
22494
- * @param index
22495
- * @param rows
22496
- */
22497
- var handleRowClick = function handleRowClick(e, row, index, rows) {
22498
- ctx.emit(EMIT_EVENTS.ROW_CLICK, e, row, index, rows);
22499
- };
22500
- /**
22501
- * table row click handle
22502
- * @param e
22503
- * @param row
22504
- * @param index
22505
- * @param rows
22506
- */
22507
- var handleRowDblClick = function handleRowDblClick(e, row, index, rows) {
22508
- ctx.emit(EMIT_EVENTS.ROW_DBL_CLICK, e, row, index, rows);
22509
- };
22510
- var handleRowEnter = function handleRowEnter(e, row, index, rows) {
22511
- ctx.emit(EMIT_EVENTS.ROW_MOUSE_ENTER, e, row, index, rows);
22512
- };
22513
- var handleRowLeave = function handleRowLeave(e, row, index, rows) {
22514
- ctx.emit(EMIT_EVENTS.ROW_MOUSE_LEAVE, e, row, index, rows);
22515
- };
22516
- var renderCellCallbackFn = function renderCellCallbackFn(row, column, index, rows) {
22517
- var cell = getRowText(row, resolvePropVal(column, 'field', [column, row]));
22518
- var data = row;
22519
- return column.render({
22520
- cell: cell,
22521
- data: data,
22522
- row: row,
22523
- column: column,
22524
- index: index,
22525
- rows: rows
22526
- });
22527
- };
22528
- var getExpandCell = function getExpandCell(row) {
22529
- var _ctx$slots$expandCont, _ctx$slots$expandCont2, _ctx$slots2;
22530
- var isExpand = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND);
22531
- var icon = isExpand ? (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.DownShape, null, null) : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.RightShape, null, null);
22532
- return (0,external_vue_namespaceObject.createVNode)("span", null, [[icon, (_ctx$slots$expandCont = (_ctx$slots$expandCont2 = (_ctx$slots2 = ctx.slots).expandContent) === null || _ctx$slots$expandCont2 === void 0 ? void 0 : _ctx$slots$expandCont2.call(_ctx$slots2, row)) !== null && _ctx$slots$expandCont !== void 0 ? _ctx$slots$expandCont : '']]);
22533
- };
22534
- var handleRowExpandClick = function handleRowExpandClick(row, column, index, rowList, e) {
22535
- rows.setRowExpand(row, !rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND));
22536
- ctx.emit(EMIT_EVENTS.ROW_EXPAND_CLICK, {
22537
- row: row,
22538
- column: column,
22539
- index: index,
22540
- rows: rowList,
22541
- e: e
22542
- });
22543
- };
22544
- var renderExpandColumn = function renderExpandColumn(row, column, index, rows) {
22545
- var renderExpandSlot = function renderExpandSlot() {
22546
- var _ctx$slots$expandCell, _ctx$slots$expandCell2, _ctx$slots3;
22547
- if (typeof column.render === 'function') {
22548
- return renderCellCallbackFn(row, column, index, rows);
22549
- }
22550
- return (_ctx$slots$expandCell = (_ctx$slots$expandCell2 = (_ctx$slots3 = ctx.slots).expandCell) === null || _ctx$slots$expandCell2 === void 0 ? void 0 : _ctx$slots$expandCell2.call(_ctx$slots3, {
22551
- row: row,
22552
- column: column,
22553
- index: index,
22554
- rows: rows
22555
- })) !== null && _ctx$slots$expandCell !== void 0 ? _ctx$slots$expandCell : getExpandCell(row);
22556
- };
22557
- return (0,external_vue_namespaceObject.createVNode)("span", {
22558
- "class": "expand-btn-action",
22559
- "onClick": function onClick(e) {
22560
- return handleRowExpandClick(row, column, index, rows, e);
22561
- }
22562
- }, [renderExpandSlot()]);
22563
- };
22564
- var renderDraggableCell = function renderDraggableCell(row, column, index, rows) {
22565
- var _props$rowDraggable$r, _props$rowDraggable, _props$rowDraggable$f, _props$rowDraggable2, _props$rowDraggable$i, _props$rowDraggable3;
22566
- var renderFn = (_props$rowDraggable$r = (_props$rowDraggable = props.rowDraggable) === null || _props$rowDraggable === void 0 ? void 0 : _props$rowDraggable.render) !== null && _props$rowDraggable$r !== void 0 ? _props$rowDraggable$r : props.rowDraggable;
22567
- if (typeof renderFn === 'function') {
22568
- return renderFn(row, column, index, rows);
22569
- }
22570
- var fontSize = (_props$rowDraggable$f = (_props$rowDraggable2 = props.rowDraggable) === null || _props$rowDraggable2 === void 0 ? void 0 : _props$rowDraggable2.fontSize) !== null && _props$rowDraggable$f !== void 0 ? _props$rowDraggable$f : '14px';
22571
- var fontIcon = (_props$rowDraggable$i = (_props$rowDraggable3 = props.rowDraggable) === null || _props$rowDraggable3 === void 0 ? void 0 : _props$rowDraggable3.icon) !== null && _props$rowDraggable$i !== void 0 ? _props$rowDraggable$i : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.GragFill, {
22572
- "style": "'--font-size: ".concat(fontSize, ";'"),
22573
- "class": "drag-cell"
22574
- }, null);
22575
- return fontIcon;
22576
- };
22577
- var _useShiftKey = use_shift_key(props),
22578
- isShiftKeyDown = _useShiftKey.isShiftKeyDown,
22579
- getStore = _useShiftKey.getStore,
22580
- setStore = _useShiftKey.setStore,
22581
- setStoreStart = _useShiftKey.setStoreStart,
22582
- clearStoreStart = _useShiftKey.clearStoreStart;
22583
- var renderCheckboxColumn = function renderCheckboxColumn(row, index, column) {
22584
- var handleChecked = function handleChecked(value, event) {
22585
- event.stopImmediatePropagation();
22586
- event.preventDefault();
22587
- event.stopPropagation();
22588
- if (!isShiftKeyDown.value) {
22589
- if (value) {
22590
- setStoreStart(row, index);
22591
- } else {
22592
- clearStoreStart();
22593
- }
22594
- }
22595
- rows.setRowSelection(row, value);
22596
- columns.setColumnAttribute(column, COLUMN_ATTRIBUTE.SELECTION_INDETERMINATE, rows.getRowIndeterminate());
22597
- columns.setColumnAttribute(column, COLUMN_ATTRIBUTE.SELECTION_VAL, rows.getRowCheckedAllValue());
22598
- ctx.emit(EMIT_EVENTS.ROW_SELECT, {
22599
- row: row,
22600
- index: index,
22601
- checked: value,
22602
- data: props.data
22603
- });
22604
- ctx.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
22605
- row: row,
22606
- index: index,
22607
- checked: value,
22608
- data: props.data
22609
- });
22610
- };
22611
- var beforeRowChange = function beforeRowChange() {
22612
- if (isShiftKeyDown.value) {
22613
- var result = setStore(row, index);
22614
- if (result) {
22615
- var _rows$pageRowList$sli;
22616
- var _getStore = getStore(),
22617
- start = _getStore.start,
22618
- end = _getStore.end;
22619
- var startIndex = start.index < end.index ? start.index : end.index;
22620
- var endIndex = start.index < end.index ? end.index : start.index;
22621
- ((_rows$pageRowList$sli = rows.pageRowList.slice(startIndex, endIndex + 1)) !== null && _rows$pageRowList$sli !== void 0 ? _rows$pageRowList$sli : []).forEach(function (item) {
22622
- var isRowEnabled = isRowSelectEnable(props, {
22623
- row: row,
22624
- index: index,
22625
- isCheckAll: false
22626
- });
22627
- isRowEnabled && rows.setRowSelection(item, true);
22628
- });
22629
- }
22630
- ctx.emit(EMIT_EVENTS.ROW_SELECT, {
22631
- row: row,
22632
- index: index,
22633
- checked: true,
22634
- data: props.data,
22635
- isShiftKeyDown: true
22636
- });
22637
- ctx.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
22638
- row: row,
22639
- index: index,
22640
- checked: true,
22641
- data: props.data,
22642
- isShiftKeyDown: true
22643
- });
22644
- return Promise.resolve(!result);
22645
- }
22646
- return Promise.resolve(true);
22647
- };
22648
- var indeterminate = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE);
22649
- var isChecked = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION);
22650
- var isEnable = isRowSelectEnable(props, {
22651
- row: row,
22652
- index: index,
22653
- isCheckAll: false
22654
- });
22655
- return (0,external_vue_namespaceObject.createVNode)(checkbox_namespaceObject["default"], {
22656
- "beforeChange": beforeRowChange,
22657
- "disabled": !isEnable,
22658
- "indeterminate": indeterminate,
22659
- "modelValue": isChecked,
22660
- "onChange": handleChecked
22661
- }, null);
22920
+ })])];
22921
+ }
22922
+ })])]);
22923
+ };
22924
+ var renderColumns = function renderColumns() {
22925
+ if (!props.showHead) {
22926
+ return null;
22927
+ }
22928
+ return (0,external_vue_namespaceObject.createVNode)("table", {
22929
+ "cellpadding": 0,
22930
+ "cellspacing": 0
22931
+ }, [renderColgroup(), renderHeader()]);
22662
22932
  };
22933
+ /** **************************************** Rows Render ******************************* **/
22663
22934
  /**
22664
- * 渲染表格Cell内容
22665
- * @param row 当前行
22666
- * @param column 当前列
22667
- * @param index 当前列
22668
- * @param rows 当前列
22935
+ * 渲染Table Body
22669
22936
  * @returns
22670
22937
  */
22671
- var renderCell = function renderCell(row, column, index, rowList) {
22672
- var _renderFn$column$type, _renderFn$column$type2;
22673
- var isChild = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
22674
- var defaultFn = function defaultFn() {
22675
- var type = resolvePropVal(column, 'type', [column, row]);
22676
- if (type === 'index') {
22677
- return rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_INDEX);
22678
- }
22679
- var key = resolvePropVal(column, 'field', [column, row]);
22680
- var cell = getRowText(row, key);
22681
- if (typeof column.render === 'function') {
22682
- return renderCellCallbackFn(row, column, index, rowList);
22683
- }
22684
- if (typeof cell === 'boolean') {
22685
- return String(cell);
22686
- }
22687
- if (!cell && typeof cell !== 'number') {
22688
- var emptyCellText = props.emptyCellText;
22689
- if (emptyCellText) {
22690
- if (typeof emptyCellText === 'function') {
22691
- return emptyCellText(row, column, index, rowList);
22692
- }
22693
- return emptyCellText;
22694
- }
22695
- }
22696
- if (typeof_typeof(cell) === 'object') {
22697
- return JSON.stringify((0,external_vue_namespaceObject.unref)(cell));
22938
+ var renderRows = function renderRows(dataList) {
22939
+ var preRow = {};
22940
+ var rowSpanMap = new WeakMap();
22941
+ var needRowSpan = columns.needRowSpan.value;
22942
+ return (0,external_vue_namespaceObject.createVNode)("tbody", null, [dataList.map(function (row, rowIndex) {
22943
+ var result = getRowRender(row, rowIndex, preRow, dataList, rowSpanMap, needRowSpan);
22944
+ preRow = row;
22945
+ return result;
22946
+ })]);
22947
+ };
22948
+ var getRowHeight = function getRowHeight(row, rowIndex) {
22949
+ var _settings$options = settings.options,
22950
+ size = _settings$options.size,
22951
+ height = _settings$options.height;
22952
+ if (height !== null && height !== undefined) {
22953
+ return resolvePropVal(settings.options, 'height', ['tbody', row, rowIndex, size]);
22954
+ }
22955
+ return resolvePropVal(props, 'rowHeight', ['tbody', row, rowIndex]);
22956
+ };
22957
+ var setDragEvents = function setDragEvents(events) {
22958
+ dragEvents = events;
22959
+ };
22960
+ /**
22961
+ * 渲染Table主体
22962
+ * @param rows 表格数据
22963
+ * @returns
22964
+ */
22965
+ var renderTBody = function renderTBody(list) {
22966
+ var dataList = list !== null && list !== void 0 ? list : rows.pageRowList;
22967
+ var localEmptyText = (0,external_vue_namespaceObject.computed)(function () {
22968
+ if (props.emptyText === undefined) {
22969
+ return t.value.emptyText;
22698
22970
  }
22699
- return cell;
22700
- };
22701
- var renderFn = {
22702
- expand: function expand(row, column, index, rowList) {
22703
- return isChild ? '' : renderExpandColumn(row, column, index, rowList);
22704
- },
22705
- selection: function selection(row, column, index, _rows) {
22706
- return renderCheckboxColumn(row, index, column);
22707
- },
22708
- drag: renderDraggableCell
22709
- };
22710
- return (_renderFn$column$type = (_renderFn$column$type2 = renderFn[column.type]) === null || _renderFn$column$type2 === void 0 ? void 0 : _renderFn$column$type2.call(renderFn, row, column, index, rows)) !== null && _renderFn$column$type !== void 0 ? _renderFn$column$type : defaultFn();
22971
+ return props.emptyText;
22972
+ });
22973
+ if (!dataList.length) {
22974
+ var _ctx$slots$empty, _ctx$slots$empty2, _ctx$slots;
22975
+ return (_ctx$slots$empty = (_ctx$slots$empty2 = (_ctx$slots = ctx.slots).empty) === null || _ctx$slots$empty2 === void 0 ? void 0 : _ctx$slots$empty2.call(_ctx$slots)) !== null && _ctx$slots$empty !== void 0 ? _ctx$slots$empty : (0,external_vue_namespaceObject.createVNode)(body_empty, {
22976
+ "emptyText": localEmptyText.value,
22977
+ "filterList": dataList,
22978
+ "list": props.data
22979
+ }, null);
22980
+ }
22981
+ return (0,external_vue_namespaceObject.createVNode)("table", {
22982
+ "cellpadding": 0,
22983
+ "cellspacing": 0,
22984
+ "data-table-uuid": uuid
22985
+ }, [renderColgroup(), renderRows(dataList)]);
22986
+ };
22987
+ /**
22988
+ * table row click handle
22989
+ * @param e
22990
+ * @param row
22991
+ * @param index
22992
+ * @param rows
22993
+ */
22994
+ var handleRowClick = function handleRowClick(e, row, index, rows) {
22995
+ ctx.emit(EMIT_EVENTS.ROW_CLICK, e, row, index, rows);
22996
+ };
22997
+ /**
22998
+ * table row click handle
22999
+ * @param e
23000
+ * @param row
23001
+ * @param index
23002
+ * @param rows
23003
+ */
23004
+ var handleRowDblClick = function handleRowDblClick(e, row, index, rows) {
23005
+ ctx.emit(EMIT_EVENTS.ROW_DBL_CLICK, e, row, index, rows);
23006
+ };
23007
+ var handleRowEnter = function handleRowEnter(e, row, index, rows) {
23008
+ ctx.emit(EMIT_EVENTS.ROW_MOUSE_ENTER, e, row, index, rows);
23009
+ };
23010
+ var handleRowLeave = function handleRowLeave(e, row, index, rows) {
23011
+ ctx.emit(EMIT_EVENTS.ROW_MOUSE_LEAVE, e, row, index, rows);
22711
23012
  };
22712
23013
  var getRowSpanConfig = function getRowSpanConfig(row, rowIndex, preRow, col, store) {
22713
23014
  var _store$get$get, _store$get;
@@ -22793,6 +23094,20 @@ function use_render_isSlot(s) {
22793
23094
  'expand-row': rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND),
22794
23095
  'is-last': rowIndex + rowspan >= rowLength
22795
23096
  }]);
23097
+ var columnKey = "".concat(rowId, "_").concat(index);
23098
+ var cellKey = "".concat(rowId, "_").concat(index, "_cell");
23099
+ var _useCell = use_cell({
23100
+ props: props,
23101
+ rows: rows,
23102
+ ctx: ctx,
23103
+ columns: columns,
23104
+ row: row,
23105
+ index: index,
23106
+ column: column,
23107
+ isChild: isChild,
23108
+ multiShiftKey: multiShiftKey
23109
+ }),
23110
+ renderCell = _useCell.renderCell;
22796
23111
  var handleEmit = function handleEmit(event, type) {
22797
23112
  var args = {
22798
23113
  event: event,
@@ -22800,7 +23115,7 @@ function use_render_isSlot(s) {
22800
23115
  column: column,
22801
23116
  cell: {
22802
23117
  getValue: function getValue() {
22803
- return renderCell(row, column, rowIndex, rowList, isChild);
23118
+ return renderCell();
22804
23119
  }
22805
23120
  },
22806
23121
  rowIndex: rowIndex,
@@ -22808,14 +23123,13 @@ function use_render_isSlot(s) {
22808
23123
  };
22809
23124
  ctx.emit(type, args);
22810
23125
  };
22811
- var columnKey = "".concat(rowId, "_").concat(index);
22812
- var cellKey = "".concat(rowId, "_").concat(index, "_cell");
22813
23126
  return (0,external_vue_namespaceObject.createVNode)("td", {
22814
23127
  "key": columnKey,
22815
23128
  "style": cellStyle,
22816
23129
  "class": cellClass,
22817
23130
  "colspan": colspan,
22818
23131
  "rowspan": rowspan,
23132
+ "data-id": columnKey,
22819
23133
  "onClick": function onClick(event) {
22820
23134
  return handleEmit(event, EMIT_EVENTS.CELL_CLICK);
22821
23135
  },
@@ -22824,12 +23138,13 @@ function use_render_isSlot(s) {
22824
23138
  }
22825
23139
  }, [(0,external_vue_namespaceObject.createVNode)(table_cell, {
22826
23140
  "key": cellKey,
23141
+ "data-id": cellKey,
22827
23142
  "class": tdCtxClass,
22828
23143
  "column": column,
22829
23144
  "observerResize": props.observerResize,
22830
23145
  "parentSetting": props.showOverflowTooltip,
22831
23146
  "row": row
22832
- }, use_render_isSlot(_slot = renderCell(row, column, rowIndex, rowList, isChild)) ? _slot : {
23147
+ }, use_render_isSlot(_slot = renderCell()) ? _slot : {
22833
23148
  "default": function _default() {
22834
23149
  return [_slot];
22835
23150
  }
@@ -22843,7 +23158,7 @@ function use_render_isSlot(s) {
22843
23158
  var renderExpandRow = function renderExpandRow(row, rowClass, _rowIndex) {
22844
23159
  var isExpand = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND);
22845
23160
  if (isExpand) {
22846
- var _ctx$slots$expandRow, _ctx$slots$expandRow2, _ctx$slots4;
23161
+ var _ctx$slots$expandRow, _ctx$slots$expandRow2, _ctx$slots2;
22847
23162
  var resovledClass = [].concat(_toConsumableArray(rowClass), [{
22848
23163
  row_expend: true
22849
23164
  }]);
@@ -22863,7 +23178,7 @@ function use_render_isSlot(s) {
22863
23178
  }, [(0,external_vue_namespaceObject.createVNode)("td", {
22864
23179
  "colspan": columns.visibleColumns.length,
22865
23180
  "rowspan": 1
22866
- }, [(_ctx$slots$expandRow = (_ctx$slots$expandRow2 = (_ctx$slots4 = ctx.slots).expandRow) === null || _ctx$slots$expandRow2 === void 0 ? void 0 : _ctx$slots$expandRow2.call(_ctx$slots4, row)) !== null && _ctx$slots$expandRow !== void 0 ? _ctx$slots$expandRow : (0,external_vue_namespaceObject.createVNode)("div", {
23181
+ }, [(_ctx$slots$expandRow = (_ctx$slots$expandRow2 = (_ctx$slots2 = ctx.slots).expandRow) === null || _ctx$slots$expandRow2 === void 0 ? void 0 : _ctx$slots$expandRow2.call(_ctx$slots2, row)) !== null && _ctx$slots$expandRow !== void 0 ? _ctx$slots$expandRow : (0,external_vue_namespaceObject.createVNode)("div", {
22867
23182
  "class": "expand-cell-ctx"
22868
23183
  }, [(0,external_vue_namespaceObject.createTextVNode)("Expand Row")])])])];
22869
23184
  }
@@ -22877,7 +23192,7 @@ function use_render_isSlot(s) {
22877
23192
  ctx.emit(EMIT_EVENTS.PAGE_LIMIT_CHANGE, limit);
22878
23193
  };
22879
23194
  var handlePageChange = function handlePageChange(current) {
22880
- if (typeof_typeof(props.pagination) === 'object' && current !== props.pagination.current) {
23195
+ if (typeof_typeof(props.pagination) === 'object' && current !== pagination.options.current) {
22881
23196
  pagination.setPagination({
22882
23197
  current: current,
22883
23198
  value: current
@@ -22904,6 +23219,9 @@ function use_render_isSlot(s) {
22904
23219
  }), null);
22905
23220
  }
22906
23221
  };
23222
+ (0,external_vue_namespaceObject.onUnmounted)(function () {
23223
+ multiShiftKey.removeMultiCheckedEvents();
23224
+ });
22907
23225
  return {
22908
23226
  renderColumns: renderColumns,
22909
23227
  renderTBody: renderTBody,
@@ -23206,90 +23524,6 @@ var useRows = function useRows(props) {
23206
23524
  };
23207
23525
  };
23208
23526
  /* harmony default export */ const use_rows = (useRows);
23209
- ;// CONCATENATED MODULE: external "../loading"
23210
- var loading_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
23211
- var loading_y = x => () => x
23212
- const loading_namespaceObject = loading_x({ ["BkLoadingMode"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__.BkLoadingMode, ["BkLoadingSize"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__.BkLoadingSize, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__["default"] });
23213
- ;// CONCATENATED MODULE: external "../loading/loading.less"
23214
- var loading_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
23215
- var loading_less_y = x => () => x
23216
- const loading_less_namespaceObject = loading_less_x({ });
23217
- ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-scroll-loading.tsx
23218
-
23219
-
23220
- /*
23221
- * Tencent is pleased to support the open source community by making
23222
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
23223
- *
23224
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
23225
- *
23226
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
23227
- *
23228
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
23229
- *
23230
- * ---------------------------------------------------
23231
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
23232
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
23233
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
23234
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23235
- *
23236
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
23237
- * the Software.
23238
- *
23239
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
23240
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23241
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
23242
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23243
- * IN THE SOFTWARE.
23244
- */
23245
-
23246
-
23247
-
23248
-
23249
- /* harmony default export */ const use_scroll_loading = (function (props, ctx) {
23250
- var refScrollLoading = (0,external_vue_namespaceObject.toRef)(props, 'scrollLoading');
23251
- var getLoadingOption = function getLoadingOption() {
23252
- if (typeof refScrollLoading.value === 'boolean') {
23253
- return {
23254
- loading: !!refScrollLoading.value,
23255
- inline: true,
23256
- title: '',
23257
- size: loading_namespaceObject.BkLoadingSize.Normal,
23258
- mode: loading_namespaceObject.BkLoadingMode.Default,
23259
- indicator: null
23260
- };
23261
- }
23262
- return refScrollLoading.value;
23263
- };
23264
- var isRender = (0,external_vue_namespaceObject.computed)(function () {
23265
- return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object');
23266
- });
23267
- var renderScrollLoading = function renderScrollLoading() {
23268
- var _ctx$slots$fixedBotto3, _ctx$slots$fixedBotto4, _ctx$slots2;
23269
- if (isRender.value) {
23270
- var _ctx$slots$fixedBotto, _ctx$slots$fixedBotto2, _ctx$slots;
23271
- var _getLoadingOption = getLoadingOption(),
23272
- loading = _getLoadingOption.loading,
23273
- size = _getLoadingOption.size,
23274
- mode = _getLoadingOption.mode,
23275
- title = _getLoadingOption.title,
23276
- inline = _getLoadingOption.inline,
23277
- indicator = _getLoadingOption.indicator;
23278
- return (_ctx$slots$fixedBotto = (_ctx$slots$fixedBotto2 = (_ctx$slots = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto2 === void 0 ? void 0 : _ctx$slots$fixedBotto2.call(_ctx$slots)) !== null && _ctx$slots$fixedBotto !== void 0 ? _ctx$slots$fixedBotto : (0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
23279
- loading: loading,
23280
- size: size,
23281
- mode: mode,
23282
- title: title,
23283
- inline: inline,
23284
- indicator: indicator
23285
- }, null);
23286
- }
23287
- return (_ctx$slots$fixedBotto3 = (_ctx$slots$fixedBotto4 = (_ctx$slots2 = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto4 === void 0 ? void 0 : _ctx$slots$fixedBotto4.call(_ctx$slots2)) !== null && _ctx$slots$fixedBotto3 !== void 0 ? _ctx$slots$fixedBotto3 : null;
23288
- };
23289
- return {
23290
- renderScrollLoading: renderScrollLoading
23291
- };
23292
- });
23293
23527
  ;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-settings.tsx
23294
23528
 
23295
23529
 
@@ -23334,7 +23568,7 @@ const loading_less_namespaceObject = loading_less_x({ });
23334
23568
  function use_settings_isSlot(s) {
23335
23569
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
23336
23570
  }
23337
- var useSettings = function useSettings(props, ctx, columns) {
23571
+ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
23338
23572
  var t = (0,config_provider_namespaceObject.useLocale)('table');
23339
23573
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
23340
23574
  resolveClassName = _usePrefix.resolveClassName;
@@ -23410,6 +23644,7 @@ var useSettings = function useSettings(props, ctx, columns) {
23410
23644
  Object.assign(options, result);
23411
23645
  columns.setColumnAttributeBySettings(options, result.checked);
23412
23646
  columns.setVisibleColumns();
23647
+ afterSetting === null || afterSetting === void 0 || afterSetting(result.checked);
23413
23648
  (_refSetting$value = refSetting.value) === null || _refSetting$value === void 0 || _refSetting$value.hide();
23414
23649
  ctx.emit(EMIT_EVENTS.SETTING_CHANGE, result);
23415
23650
  };
@@ -23663,7 +23898,6 @@ var useSettings = function useSettings(props, ctx, columns) {
23663
23898
 
23664
23899
 
23665
23900
 
23666
-
23667
23901
  /* harmony default export */ const table = ((0,external_vue_namespaceObject.defineComponent)({
23668
23902
  name: 'Table',
23669
23903
  props: tableProps,
@@ -23672,7 +23906,30 @@ var useSettings = function useSettings(props, ctx, columns) {
23672
23906
  var columns = use_columns(props);
23673
23907
  var rows = use_rows(props);
23674
23908
  var pagination = use_pagination(props);
23675
- var settings = use_settings(props, ctx, columns);
23909
+ var _useLayout = use_layout(props, ctx),
23910
+ renderContainer = _useLayout.renderContainer,
23911
+ renderFixedBottom = _useLayout.renderFixedBottom,
23912
+ renderBody = _useLayout.renderBody,
23913
+ renderHeader = _useLayout.renderHeader,
23914
+ renderFooter = _useLayout.renderFooter,
23915
+ setBodyHeight = _useLayout.setBodyHeight,
23916
+ setFootHeight = _useLayout.setFootHeight,
23917
+ setDragOffsetX = _useLayout.setDragOffsetX,
23918
+ setOffsetRight = _useLayout.setOffsetRight,
23919
+ refBody = _useLayout.refBody,
23920
+ refRoot = _useLayout.refRoot;
23921
+ /**
23922
+ * 设置字段结束,展示字段改变,设置表格偏移量为0
23923
+ * 避免太长横向滚动导致数据不可见
23924
+ * @param fields
23925
+ */
23926
+ var afterSetting = function afterSetting(fields) {
23927
+ if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
23928
+ var _refBody$value;
23929
+ (_refBody$value = refBody.value) === null || _refBody$value === void 0 || _refBody$value.scrollTo(0, 0);
23930
+ }
23931
+ };
23932
+ var settings = use_settings(props, ctx, columns, afterSetting);
23676
23933
  var dragEvents = use_draggable(props, rows, ctx);
23677
23934
  var _useRender = use_render({
23678
23935
  props: props,
@@ -23687,52 +23944,33 @@ var useSettings = function useSettings(props, ctx, columns) {
23687
23944
  renderTFoot = _useRender.renderTFoot,
23688
23945
  setDragEvents = _useRender.setDragEvents;
23689
23946
  setDragEvents(dragEvents);
23690
- var _useColumnResize = use_column_resize(columns),
23691
- dragOffsetX = _useColumnResize.dragOffsetX;
23692
23947
  var _useColumnTemplate = use_column_template(),
23693
23948
  resolveColumns = _useColumnTemplate.resolveColumns;
23694
23949
  var instance = (0,external_vue_namespaceObject.getCurrentInstance)();
23695
23950
  var initTableColumns = function initTableColumns() {
23696
- columns.debounceUpdateColumns(resolveColumns(instance));
23951
+ var _instance$subTree$chi, _instance$subTree;
23952
+ var children = (_instance$subTree$chi = (_instance$subTree = instance.subTree) === null || _instance$subTree === void 0 ? void 0 : _instance$subTree.children) !== null && _instance$subTree$chi !== void 0 ? _instance$subTree$chi : [];
23953
+ columns.debounceUpdateColumns(resolveColumns(children));
23697
23954
  };
23698
23955
  (0,external_vue_namespaceObject.provide)(PROVIDE_KEY_INIT_COL, initTableColumns);
23699
- var _useLayout = use_layout(props, ctx),
23700
- renderContainer = _useLayout.renderContainer,
23701
- renderBody = _useLayout.renderBody,
23702
- renderHeader = _useLayout.renderHeader,
23703
- renderFooter = _useLayout.renderFooter,
23704
- setBodyHeight = _useLayout.setBodyHeight,
23705
- setFootHeight = _useLayout.setFootHeight,
23706
- setDragOffsetX = _useLayout.setDragOffsetX,
23707
- setOffsetRight = _useLayout.setOffsetRight,
23708
- refRoot = _useLayout.refRoot,
23709
- refHead = _useLayout.refHead;
23710
23956
  var _useFixedColumn = use_fixed_column(props, columns),
23711
23957
  renderFixedRows = _useFixedColumn.renderFixedRows,
23712
23958
  resolveFixedColumnStyle = _useFixedColumn.resolveFixedColumnStyle;
23713
- var _useScrollLoading = use_scroll_loading(props, ctx),
23714
- renderScrollLoading = _useScrollLoading.renderScrollLoading;
23715
- var isResizeBodyHeight = (0,external_vue_namespaceObject.ref)(false);
23959
+ /**
23960
+ * Column配置改变或者容器Resize之后,根据Columns配置
23961
+ * 计算每一列的实际宽度
23962
+ */
23716
23963
  var computedColumnRect = function computedColumnRect() {
23717
- var _refHead$value;
23718
- if ((0,lodash.isElement)((_refHead$value = refHead === null || refHead === void 0 ? void 0 : refHead.value) !== null && _refHead$value !== void 0 ? _refHead$value : null)) {
23719
- columns.visibleColumns.forEach(function (col) {
23720
- var _refHead$value2;
23721
- var id = columns.getColumnId(col);
23722
- var query = "[data-id=\"".concat(id, "\"]");
23723
- var target = refHead === null || refHead === void 0 || (_refHead$value2 = refHead.value) === null || _refHead$value2 === void 0 ? void 0 : _refHead$value2.querySelector(query);
23724
- if ((0,lodash.isElement)(target)) {
23725
- columns.setColumnRect(col, {
23726
- width: target.offsetWidth,
23727
- height: target.offsetHeight,
23728
- left: null,
23729
- right: null
23730
- });
23731
- }
23732
- });
23733
- resolveFixedColumnStyle();
23734
- }
23964
+ var _refRoot$value$offset, _refRoot$value;
23965
+ var width = (_refRoot$value$offset = (_refRoot$value = refRoot.value) === null || _refRoot$value === void 0 ? void 0 : _refRoot$value.offsetWidth) !== null && _refRoot$value$offset !== void 0 ? _refRoot$value$offset : 0;
23966
+ columns.resolveColsCalcWidth(width);
23967
+ resolveFixedColumnStyle();
23735
23968
  };
23969
+ var _useColumnResize = use_column_resize(columns, {
23970
+ afterResize: resolveFixedColumnStyle
23971
+ }),
23972
+ dragOffsetX = _useColumnResize.dragOffsetX;
23973
+ var isResizeBodyHeight = (0,external_vue_namespaceObject.ref)(false);
23736
23974
  /**
23737
23975
  * table 渲染行
23738
23976
  */
@@ -23774,12 +24012,17 @@ var useSettings = function useSettings(props, ctx, columns) {
23774
24012
  });
23775
24013
  var setTableFootHeight = function setTableFootHeight() {
23776
24014
  setFootHeight(footHeight.value);
24015
+ if (/^\d+\.?\d*(px)?$/.test("".concat(props.height))) {
24016
+ setBodyHeight(Number("".concat(props.height).replace('px', '')));
24017
+ }
23777
24018
  };
23778
24019
  var setTableData = function setTableData() {
23779
24020
  var filterOrderList = getFilterAndSortList();
23780
- pagination.setPagination({
23781
- count: filterOrderList.length
23782
- });
24021
+ if (!props.remotePagination) {
24022
+ pagination.setPagination({
24023
+ count: filterOrderList.length
24024
+ });
24025
+ }
23783
24026
  var renderList = getRenderRowList(filterOrderList);
23784
24027
  rows.setPageRowList(renderList);
23785
24028
  (0,external_vue_namespaceObject.nextTick)(function () {
@@ -23787,6 +24030,7 @@ var useSettings = function useSettings(props, ctx, columns) {
23787
24030
  });
23788
24031
  };
23789
24032
  use_observer_resize(refRoot, function () {
24033
+ var _refBody$value2;
23790
24034
  if ((props.height === '100%' || props.virtualEnabled) && (0,lodash.isElement)(refRoot.value)) {
23791
24035
  if (isResizeBodyHeight.value) {
23792
24036
  setTimeout(function () {
@@ -23795,12 +24039,13 @@ var useSettings = function useSettings(props, ctx, columns) {
23795
24039
  return;
23796
24040
  }
23797
24041
  var tableHeight = refRoot.value.offsetHeight;
23798
- var bodyHeight = tableHeight - columns.headHeight.value - footHeight.value;
23799
24042
  isResizeBodyHeight.value = true;
23800
- setBodyHeight(bodyHeight);
24043
+ setBodyHeight(tableHeight);
23801
24044
  setOffsetRight();
23802
24045
  }
23803
24046
  computedColumnRect();
24047
+ (_refBody$value2 = refBody.value) === null || _refBody$value2 === void 0 || _refBody$value2.scrollTo(0, 0);
24048
+ setOffsetRight();
23804
24049
  });
23805
24050
  (0,external_vue_namespaceObject.watch)(function () {
23806
24051
  return [dragOffsetX.value];
@@ -23837,6 +24082,10 @@ var useSettings = function useSettings(props, ctx, columns) {
23837
24082
  return [pagination.options.count, pagination.options.limit, pagination.options.current, props.data];
23838
24083
  }, function () {
23839
24084
  setTableData();
24085
+ (0,external_vue_namespaceObject.nextTick)(function () {
24086
+ var _refBody$value3;
24087
+ (_refBody$value3 = refBody.value) === null || _refBody$value3 === void 0 || _refBody$value3.scrollTo(0, 1);
24088
+ });
23840
24089
  }, {
23841
24090
  immediate: true
23842
24091
  });
@@ -23854,7 +24103,7 @@ var useSettings = function useSettings(props, ctx, columns) {
23854
24103
  }
23855
24104
  });
23856
24105
  return function () {
23857
- return renderContainer([renderHeader(renderColumns, settings.renderSettings), renderBody(rows.pageRowList, renderTBody, renderFixedRows, renderScrollLoading), renderFooter(renderTFoot())]);
24106
+ return renderContainer([renderHeader(renderColumns, settings.renderSettings, renderFixedRows), renderBody(rows.pageRowList, renderTBody, renderFixedRows), renderFixedBottom(), renderFooter(renderTFoot())]);
23858
24107
  };
23859
24108
  }
23860
24109
  }));