bkui-vue 2.0.1-beta.57.table.2 → 2.0.1-beta.58

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.
@@ -1054,6 +1054,7 @@
1054
1054
  white-space: nowrap;
1055
1055
  text-overflow: ellipsis;
1056
1056
  overflow: hidden;
1057
+ max-width: calc(100% - 22px);
1057
1058
  }
1058
1059
  .bk-popover.bk-pop2-content.bk-table-head-filter .content-list .content-items .list-item .bk-checkbox {
1059
1060
  margin-left: 0;
@@ -1523,14 +1524,6 @@
1523
1524
  cursor: pointer;
1524
1525
  background: var(--table-row-active-bg-color);
1525
1526
  }
1526
- .bk-table .bk-table-head table tbody tr.stripe-row,
1527
- .bk-table .bk-table-body table tbody tr.stripe-row {
1528
- background: #fafbfd;
1529
- }
1530
- .bk-table .bk-table-head table tbody tr.stripe-row td,
1531
- .bk-table .bk-table-body table tbody tr.stripe-row td {
1532
- background-color: #fafbfd;
1533
- }
1534
1527
  .bk-table .bk-table-head table tbody tr td,
1535
1528
  .bk-table .bk-table-body table tbody tr td {
1536
1529
  background-color: #fff;
@@ -1736,6 +1729,9 @@
1736
1729
  .bk-table .bk-pagination .is-last {
1737
1730
  margin-left: auto;
1738
1731
  }
1732
+ .bk-table .stripe-row {
1733
+ background: #fafbfd;
1734
+ }
1739
1735
  .bk-across-page-popover {
1740
1736
  padding: 0!important;
1741
1737
  }
@@ -312,14 +312,6 @@
312
312
 
313
313
  tbody {
314
314
  tr {
315
-
316
- &.stripe-row {
317
- background: #fafbfd;
318
- td {
319
- background-color: #fafbfd;
320
- }
321
- }
322
-
323
315
  td {
324
316
  background-color: #fff;
325
317
  border-top: 1px solid @table-bg-color;
@@ -606,6 +598,10 @@
606
598
  margin-left: auto;
607
599
  }
608
600
  }
601
+
602
+ .stripe-row {
603
+ background: #fafbfd;
604
+ }
609
605
  }
610
606
 
611
607
  .@{bk-prefix}-across-page-popover {
@@ -1444,6 +1444,7 @@
1444
1444
  white-space: nowrap;
1445
1445
  text-overflow: ellipsis;
1446
1446
  overflow: hidden;
1447
+ max-width: calc(100% - 22px);
1447
1448
  }
1448
1449
  .bk-popover.bk-pop2-content.bk-table-head-filter .content-list .content-items .list-item .bk-checkbox {
1449
1450
  margin-left: 0;
@@ -1913,14 +1914,6 @@
1913
1914
  cursor: pointer;
1914
1915
  background: var(--table-row-active-bg-color);
1915
1916
  }
1916
- .bk-table .bk-table-head table tbody tr.stripe-row,
1917
- .bk-table .bk-table-body table tbody tr.stripe-row {
1918
- background: #fafbfd;
1919
- }
1920
- .bk-table .bk-table-head table tbody tr.stripe-row td,
1921
- .bk-table .bk-table-body table tbody tr.stripe-row td {
1922
- background-color: #fafbfd;
1923
- }
1924
1917
  .bk-table .bk-table-head table tbody tr td,
1925
1918
  .bk-table .bk-table-body table tbody tr td {
1926
1919
  background-color: #fff;
@@ -2126,6 +2119,9 @@
2126
2119
  .bk-table .bk-pagination .is-last {
2127
2120
  margin-left: auto;
2128
2121
  }
2122
+ .bk-table .stripe-row {
2123
+ background: #fafbfd;
2124
+ }
2129
2125
  .bk-across-page-popover {
2130
2126
  padding: 0!important;
2131
2127
  }
@@ -138,6 +138,7 @@ export declare const resolveColumnFilterProp: (col: Column) => {
138
138
  enabled: boolean;
139
139
  list: {
140
140
  label: string;
141
+ text?: string;
141
142
  value: string;
142
143
  }[];
143
144
  filterFn?: (...args: any[]) => boolean;
@@ -38,7 +38,7 @@ declare const BkTableColumn: {
38
38
  } & {
39
39
  default: number;
40
40
  };
41
- }>>, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
41
+ }>>, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
42
42
  label: import("vue-types").VueTypeDef<import("../table/props").LabelFunctionString>;
43
43
  field: import("vue-types").VueTypeDef<import("../table/props").LabelFunctionString>;
44
44
  render: import("vue-types").VueTypeDef<import("../table/props").RenderFunctionString>;
@@ -131,7 +131,7 @@ declare const BkTableColumn: {
131
131
  } & {
132
132
  default: number;
133
133
  };
134
- }>>, {}, {}, {}, {}, {
134
+ }>>, () => void, {}, {}, {}, {
135
135
  fixed: boolean | "left" | "right";
136
136
  resizable: boolean;
137
137
  minWidth: string | number;
@@ -182,7 +182,7 @@ declare const BkTableColumn: {
182
182
  } & {
183
183
  default: number;
184
184
  };
185
- }>>, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
185
+ }>>, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
186
186
  fixed: boolean | "left" | "right";
187
187
  resizable: boolean;
188
188
  minWidth: string | number;
@@ -17302,7 +17302,9 @@ function _objectDestructuringEmpty(obj) {
17302
17302
  ;// CONCATENATED MODULE: external "vue"
17303
17303
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
17304
17304
  var external_vue_y = x => () => x
17305
- const external_vue_namespaceObject = external_vue_x({ ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
17305
+ const external_vue_namespaceObject = external_vue_x({ ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
17306
+ // EXTERNAL MODULE: ../../node_modules/lodash/lodash.js
17307
+ var lodash = __webpack_require__(6635);
17306
17308
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
17307
17309
  function _typeof(o) {
17308
17310
  "@babel/helpers - typeof";
@@ -17913,8 +17915,6 @@ var tableProps = {
17913
17915
  }
17914
17916
  })
17915
17917
  };
17916
- // EXTERNAL MODULE: ../../node_modules/lodash/lodash.js
17917
- var lodash = __webpack_require__(6635);
17918
17918
  ;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
17919
17919
 
17920
17920
  /*
@@ -17974,23 +17974,10 @@ var TableColumnProp = {
17974
17974
  _objectDestructuringEmpty(_ref);
17975
17975
  var initTableColumns = (0,external_vue_namespaceObject.inject)(PROVIDE_KEY_INIT_COL, function () {});
17976
17976
  var lastPropsVal = {};
17977
- var isPropsEqual = function isPropsEqual(sorce, target) {
17978
- var rawProps = (0,external_vue_namespaceObject.toRaw)(target);
17979
- var keys = Object.keys(rawProps);
17980
- return keys.every(function (key) {
17981
- if (typeof rawProps[key] === 'function') {
17982
- return sorce[key] !== undefined;
17983
- }
17984
- if (key === 'children') {
17985
- return true;
17986
- }
17987
- return (0,lodash.isEqual)(sorce[key], target[key]);
17988
- });
17989
- };
17990
17977
  (0,external_vue_namespaceObject.watch)(function () {
17991
17978
  return [props];
17992
17979
  }, function () {
17993
- if (!isPropsEqual(lastPropsVal, props)) {
17980
+ if (!(0,lodash.isEqual)(lastPropsVal, (0,external_vue_namespaceObject.toRaw)(props))) {
17994
17981
  initTableColumns();
17995
17982
  Object.assign(lastPropsVal, (0,external_vue_namespaceObject.toRaw)(props));
17996
17983
  }
@@ -18001,21 +17988,7 @@ var TableColumnProp = {
18001
17988
  (0,external_vue_namespaceObject.onUnmounted)(function () {
18002
17989
  initTableColumns();
18003
17990
  });
18004
- },
18005
- render: function render() {
18006
- try {
18007
- var _this$$slots$default, _this$$slots;
18008
- var renderDefault = (_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots, {
18009
- row: {},
18010
- column: {},
18011
- $index: -1
18012
- });
18013
- var children = [renderDefault];
18014
- var vnode = (0,external_vue_namespaceObject.h)('div', children);
18015
- return vnode;
18016
- } catch (_unused) {
18017
- return (0,external_vue_namespaceObject.h)('div', []);
18018
- }
17991
+ return function () {};
18019
17992
  }
18020
17993
  }));
18021
17994
  ;// CONCATENATED MODULE: ../../packages/table-column/src/index.ts
@@ -93,7 +93,7 @@ declare const Upload: {
93
93
  type: import("vue").PropType<(event: Event) => boolean | void>;
94
94
  };
95
95
  beforeUpload: {
96
- type: import("vue").PropType<(file: import("./upload.type").UploadRawFile) => boolean | Promise<boolean>>;
96
+ type: import("vue").PropType<(file: import("./upload.type").UploadRawFile, uploadFiles: File[]) => boolean | Promise<boolean>>;
97
97
  };
98
98
  beforeRemove: {
99
99
  type: import("vue").PropType<(file: import("./upload.type").UploadFile, uploadFiles: import("./upload.type").UploadFile[]) => boolean | Promise<boolean>>;
@@ -215,7 +215,7 @@ declare const Upload: {
215
215
  type: import("vue").PropType<(event: Event) => boolean | void>;
216
216
  };
217
217
  beforeUpload: {
218
- type: import("vue").PropType<(file: import("./upload.type").UploadRawFile) => boolean | Promise<boolean>>;
218
+ type: import("vue").PropType<(file: import("./upload.type").UploadRawFile, uploadFiles: File[]) => boolean | Promise<boolean>>;
219
219
  };
220
220
  beforeRemove: {
221
221
  type: import("vue").PropType<(file: import("./upload.type").UploadFile, uploadFiles: import("./upload.type").UploadFile[]) => boolean | Promise<boolean>>;
@@ -367,7 +367,7 @@ declare const Upload: {
367
367
  type: import("vue").PropType<(event: Event) => boolean | void>;
368
368
  };
369
369
  beforeUpload: {
370
- type: import("vue").PropType<(file: import("./upload.type").UploadRawFile) => boolean | Promise<boolean>>;
370
+ type: import("vue").PropType<(file: import("./upload.type").UploadRawFile, uploadFiles: File[]) => boolean | Promise<boolean>>;
371
371
  };
372
372
  beforeRemove: {
373
373
  type: import("vue").PropType<(file: import("./upload.type").UploadFile, uploadFiles: import("./upload.type").UploadFile[]) => boolean | Promise<boolean>>;
@@ -516,7 +516,7 @@ declare const Upload: {
516
516
  type: import("vue").PropType<(event: Event) => boolean | void>;
517
517
  };
518
518
  beforeUpload: {
519
- type: import("vue").PropType<(file: import("./upload.type").UploadRawFile) => boolean | Promise<boolean>>;
519
+ type: import("vue").PropType<(file: import("./upload.type").UploadRawFile, uploadFiles: File[]) => boolean | Promise<boolean>>;
520
520
  };
521
521
  beforeRemove: {
522
522
  type: import("vue").PropType<(file: import("./upload.type").UploadFile, uploadFiles: import("./upload.type").UploadFile[]) => boolean | Promise<boolean>>;
@@ -2727,7 +2727,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2727
2727
  case 2:
2728
2728
  _context.prev = 2;
2729
2729
  _context.next = 5;
2730
- return (_props$beforeUpload = props.beforeUpload) === null || _props$beforeUpload === void 0 ? void 0 : _props$beforeUpload.call(props, file);
2730
+ return (_props$beforeUpload = props.beforeUpload) === null || _props$beforeUpload === void 0 ? void 0 : _props$beforeUpload.call(props, file, sendFiles);
2731
2731
  case 5:
2732
2732
  beforeResult = _context.sent;
2733
2733
  _context.next = 11;
@@ -94,7 +94,7 @@ declare const _default: {
94
94
  type: PropType<(event: Event) => boolean | void>;
95
95
  };
96
96
  beforeUpload: {
97
- type: PropType<(file: UploadRawFile) => Promise<boolean> | boolean>;
97
+ type: PropType<(file: UploadRawFile, uploadFiles: File[]) => Promise<boolean> | boolean>;
98
98
  };
99
99
  beforeRemove: {
100
100
  type: PropType<(file: UploadFile, uploadFiles: UploadFile[]) => Promise<boolean> | boolean>;
@@ -93,7 +93,7 @@ declare const _default: import("vue").DefineComponent<{
93
93
  type: import("vue").PropType<(event: Event) => boolean | void>;
94
94
  };
95
95
  beforeUpload: {
96
- type: import("vue").PropType<(file: UploadRawFile) => boolean | Promise<boolean>>;
96
+ type: import("vue").PropType<(file: UploadRawFile, uploadFiles: File[]) => boolean | Promise<boolean>>;
97
97
  };
98
98
  beforeRemove: {
99
99
  type: import("vue").PropType<(file: UploadFile, uploadFiles: UploadFile[]) => boolean | Promise<boolean>>;
@@ -208,7 +208,7 @@ declare const _default: import("vue").DefineComponent<{
208
208
  type: import("vue").PropType<(event: Event) => boolean | void>;
209
209
  };
210
210
  beforeUpload: {
211
- type: import("vue").PropType<(file: UploadRawFile) => boolean | Promise<boolean>>;
211
+ type: import("vue").PropType<(file: UploadRawFile, uploadFiles: File[]) => boolean | Promise<boolean>>;
212
212
  };
213
213
  beforeRemove: {
214
214
  type: import("vue").PropType<(file: UploadFile, uploadFiles: UploadFile[]) => boolean | Promise<boolean>>;
@@ -17624,28 +17624,22 @@ var virtualRenderProps = _objectSpread({
17624
17624
  });
17625
17625
  };
17626
17626
  var scrollTo = function scrollTo(x, y) {
17627
- var _instance;
17628
- (_instance = instance) === null || _instance === void 0 || _instance.scrollTo({
17627
+ instance.scrollTo({
17629
17628
  x: x,
17630
17629
  y: y
17631
17630
  });
17632
17631
  };
17633
17632
  var updateScrollHeight = function updateScrollHeight(height) {
17634
- var _instance2;
17635
- if ((_instance2 = instance) !== null && _instance2 !== void 0 && _instance2.element) {
17636
- var _instance3, _instance4;
17637
- ((_instance3 = instance) === null || _instance3 === void 0 ? void 0 : _instance3.element).scrollHeight = height;
17638
- (_instance4 = instance) === null || _instance4 === void 0 || _instance4.update();
17633
+ var _instance;
17634
+ if ((_instance = instance) !== null && _instance !== void 0 && _instance.element) {
17635
+ instance.element.scrollHeight = height;
17636
+ instance.update();
17639
17637
  }
17640
17638
  };
17641
17639
  return {
17642
17640
  init: init,
17643
17641
  instance: instance,
17644
17642
  scrollTo: scrollTo,
17645
- update: function update() {
17646
- var _instance5;
17647
- return (_instance5 = instance) === null || _instance5 === void 0 ? void 0 : _instance5.update();
17648
- },
17649
17643
  updateScrollHeight: updateScrollHeight
17650
17644
  };
17651
17645
  });
@@ -17808,29 +17802,10 @@ var VisibleRender = /*#__PURE__*/function () {
17808
17802
  this.wrapper = el;
17809
17803
  var throttleDelay = binding.value.throttleDelay;
17810
17804
  this.delay = throttleDelay;
17811
- this.delegateWrapper = undefined;
17812
17805
  }
17813
17806
  _createClass(VisibleRender, [{
17814
- key: "scrollHeight",
17815
- get: function get() {
17816
- var _this$delegateWrapper, _this$delegateWrapper2, _this$wrapper;
17817
- return (_this$delegateWrapper = (_this$delegateWrapper2 = this.delegateWrapper) === null || _this$delegateWrapper2 === void 0 ? void 0 : _this$delegateWrapper2.scrollHeight) !== null && _this$delegateWrapper !== void 0 ? _this$delegateWrapper : (_this$wrapper = this.wrapper) === null || _this$wrapper === void 0 ? void 0 : _this$wrapper.scrollHeight;
17818
- }
17819
- }, {
17820
- key: "offsetHeight",
17821
- get: function get() {
17822
- var _this$delegateWrapper3, _this$delegateWrapper4, _this$wrapper2;
17823
- return (_this$delegateWrapper3 = (_this$delegateWrapper4 = this.delegateWrapper) === null || _this$delegateWrapper4 === void 0 ? void 0 : _this$delegateWrapper4.offsetHeight) !== null && _this$delegateWrapper3 !== void 0 ? _this$delegateWrapper3 : (_this$wrapper2 = this.wrapper) === null || _this$wrapper2 === void 0 ? void 0 : _this$wrapper2.offsetHeight;
17824
- }
17825
- }, {
17826
- key: "setDelegateWrapper",
17827
- value: function setDelegateWrapper(el) {
17828
- this.delegateWrapper = el;
17829
- }
17830
- }, {
17831
17807
  key: "render",
17832
17808
  value: function render(e) {
17833
- var _this$delegateWrapper5;
17834
17809
  var _this$binding$value = this.binding.value,
17835
17810
  _this$binding$value$l = _this$binding$value.lineHeight,
17836
17811
  lineHeight = _this$binding$value$l === void 0 ? 30 : _this$binding$value$l,
@@ -17842,7 +17817,7 @@ var VisibleRender = /*#__PURE__*/function () {
17842
17817
  var _e$offset, _e$offset$x, _e$offset2;
17843
17818
  var elScrollTop = (_e$offset = e.offset) === null || _e$offset === void 0 ? void 0 : _e$offset.y;
17844
17819
  var elScrollLeft = (_e$offset$x = (_e$offset2 = e.offset) === null || _e$offset2 === void 0 ? void 0 : _e$offset2.x) !== null && _e$offset$x !== void 0 ? _e$offset$x : 0;
17845
- var bottom = this.scrollHeight - this.offsetHeight - elScrollTop;
17820
+ var bottom = this.wrapper.scrollHeight - this.wrapper.offsetHeight - elScrollTop;
17846
17821
  handleScrollCallback(e, null, null, elScrollTop, elScrollTop, elScrollLeft, {
17847
17822
  bottom: bottom >= 0 ? bottom : 0,
17848
17823
  scrollbar: e
@@ -17862,7 +17837,7 @@ var VisibleRender = /*#__PURE__*/function () {
17862
17837
  groupItemCount: groupItemCount,
17863
17838
  count: count,
17864
17839
  scrollLeft: scrollLeft
17865
- }, (_this$delegateWrapper5 = this.delegateWrapper) !== null && _this$delegateWrapper5 !== void 0 ? _this$delegateWrapper5 : this.wrapper, e);
17840
+ }, this.wrapper, e);
17866
17841
  }
17867
17842
  }, {
17868
17843
  key: "executeThrottledRender",
@@ -17872,14 +17847,14 @@ var VisibleRender = /*#__PURE__*/function () {
17872
17847
  }, {
17873
17848
  key: "install",
17874
17849
  value: function install() {
17875
- var _this$wrapper3;
17876
- (_this$wrapper3 = this.wrapper) === null || _this$wrapper3 === void 0 || _this$wrapper3.addEventListener('scroll', this.executeThrottledRender.bind(this));
17850
+ var _this$wrapper;
17851
+ (_this$wrapper = this.wrapper) === null || _this$wrapper === void 0 || _this$wrapper.addEventListener('scroll', this.executeThrottledRender.bind(this));
17877
17852
  }
17878
17853
  }, {
17879
17854
  key: "uninstall",
17880
17855
  value: function uninstall() {
17881
- var _this$wrapper4, _this$wrapper4$remove;
17882
- (_this$wrapper4 = this.wrapper) === null || _this$wrapper4 === void 0 || (_this$wrapper4$remove = _this$wrapper4.removeListener) === null || _this$wrapper4$remove === void 0 || _this$wrapper4$remove.call(_this$wrapper4, 'scroll', this.executeThrottledRender.bind(this));
17856
+ var _this$wrapper2, _this$wrapper2$remove;
17857
+ (_this$wrapper2 = this.wrapper) === null || _this$wrapper2 === void 0 || (_this$wrapper2$remove = _this$wrapper2.removeListener) === null || _this$wrapper2$remove === void 0 || _this$wrapper2$remove.call(_this$wrapper2, 'scroll', this.executeThrottledRender.bind(this));
17883
17858
  }
17884
17859
  }, {
17885
17860
  key: "setBinding",
@@ -18098,23 +18073,11 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18098
18073
  rendAsTag = _useTagRender.rendAsTag;
18099
18074
  return rendAsTag;
18100
18075
  }
18101
- var refRoot = (0,external_vue_namespaceObject.ref)(null);
18102
- /** 如果有分组状态,计算总行数 */
18103
- var listLength = (0,external_vue_namespaceObject.ref)(0);
18104
- /** 实际高度,根据行高和总行数计算出来的实际高度 */
18105
- var innerHeight = (0,external_vue_namespaceObject.ref)(0);
18106
- var contentHeight = (0,external_vue_namespaceObject.ref)(0);
18107
- var virtualRoot = (0,external_vue_namespaceObject.ref)(null);
18108
18076
  var getRowHeightArgs = function getRowHeightArgs(startIndex) {
18109
18077
  var start = startIndex * props.groupItemCount;
18110
18078
  var end = (startIndex + 1) * props.groupItemCount;
18111
- if (end > listLength.value) {
18112
- var count = end - start;
18113
- end = listLength.value;
18114
- start = end - count;
18115
- }
18116
18079
  return {
18117
- index: start,
18080
+ index: startIndex,
18118
18081
  rows: props.list.slice(start, end),
18119
18082
  items: [start, end],
18120
18083
  type: 'virtual'
@@ -18138,11 +18101,17 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18138
18101
  scrollbar: props.scrollbar
18139
18102
  };
18140
18103
  });
18104
+ var refRoot = (0,external_vue_namespaceObject.ref)(null);
18105
+ /** 如果有分组状态,计算总行数 */
18106
+ var listLength = (0,external_vue_namespaceObject.ref)(0);
18107
+ /** 实际高度,根据行高和总行数计算出来的实际高度 */
18108
+ var innerHeight = (0,external_vue_namespaceObject.ref)(0);
18109
+ var contentHeight = (0,external_vue_namespaceObject.ref)(0);
18110
+ var virtualRoot = (0,external_vue_namespaceObject.ref)(null);
18141
18111
  var _useScrollbar = use_scrollbar(props),
18142
18112
  init = _useScrollbar.init,
18143
18113
  scrollTo = _useScrollbar.scrollTo,
18144
- updateScrollHeight = _useScrollbar.updateScrollHeight,
18145
- update = _useScrollbar.update;
18114
+ updateScrollHeight = _useScrollbar.updateScrollHeight;
18146
18115
  var instance = null;
18147
18116
  var pagination = (0,external_vue_namespaceObject.reactive)({
18148
18117
  startIndex: 0,
@@ -18156,15 +18125,9 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18156
18125
  groupItemCount: props.groupItemCount
18157
18126
  });
18158
18127
  var calcList = (0,external_vue_namespaceObject.ref)([]);
18159
- var getOffsetHeight = function getOffsetHeight() {
18160
- if (typeof props.height === 'number') {
18161
- return props.height;
18162
- }
18163
- // @ts-ignore
18164
- return virtualRoot.value.offsetHeight;
18165
- };
18166
18128
  var getLastPageIndex = function getLastPageIndex() {
18167
- var elHeight = getOffsetHeight();
18129
+ // @ts-ignore
18130
+ var elHeight = virtualRoot.value.offsetHeight;
18168
18131
  var startIndex = Math.ceil(listLength.value / props.groupItemCount);
18169
18132
  var rowsHeight = 0;
18170
18133
  var lastHeight = 0;
@@ -18273,11 +18236,7 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18273
18236
  top: 0
18274
18237
  };
18275
18238
  var el = refRoot.value;
18276
- var container = typeof props.height === 'number' ? {
18277
- scrollHeight: innerHeight.value,
18278
- offsetHeight: props.height
18279
- } : el;
18280
- computedVirtualIndex(props.lineHeight, handleScrollCallback, pagination, container, {
18239
+ computedVirtualIndex(props.lineHeight, handleScrollCallback, pagination, el, {
18281
18240
  target: el
18282
18241
  });
18283
18242
  };
@@ -18333,50 +18292,31 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18333
18292
  };
18334
18293
  var _useFixTop = use_fix_top(props, scrollTo),
18335
18294
  fixToTop = _useFixTop.fixToTop;
18336
- var setDelegateEl = function setDelegateEl() {
18295
+ (0,external_vue_namespaceObject.watch)(function () {
18296
+ return [props.list];
18297
+ }, function () {
18337
18298
  var _instance3;
18338
- var el = refRoot.value;
18339
- var container = typeof props.height === 'number' ? {
18340
- scrollHeight: innerHeight.value,
18341
- offsetHeight: props.height
18342
- } : el;
18343
- (_instance3 = instance) === null || _instance3 === void 0 || _instance3.setDelegateWrapper(container);
18344
- };
18345
- var updateVirtualInstance = function updateVirtualInstance() {
18346
- var _instance4;
18347
- (_instance4 = instance) === null || _instance4 === void 0 || _instance4.setBinding(binding);
18299
+ (_instance3 = instance) === null || _instance3 === void 0 || _instance3.setBinding(binding);
18348
18300
  handleChangeListConfig();
18349
18301
  updateScrollHeight(contentHeight.value);
18350
- setDelegateEl();
18351
- update();
18352
18302
  afterListDataReset();
18353
18303
  (0,external_vue_namespaceObject.nextTick)(function () {
18354
- var _instance5;
18355
- (_instance5 = instance) === null || _instance5 === void 0 || _instance5.executeThrottledRender.call(instance, {
18304
+ var _instance4;
18305
+ (_instance4 = instance) === null || _instance4 === void 0 || _instance4.executeThrottledRender.call(instance, {
18356
18306
  offset: {
18357
18307
  x: pagination.scrollLeft,
18358
18308
  y: pagination.scrollTop
18359
18309
  }
18360
18310
  });
18361
18311
  });
18362
- };
18363
- (0,external_vue_namespaceObject.watch)(function () {
18364
- return props.height;
18365
- }, function () {
18366
- updateVirtualInstance();
18367
- });
18368
- (0,external_vue_namespaceObject.watch)(function () {
18369
- return [props.list, props.list.length];
18370
- }, function () {
18371
- updateVirtualInstance();
18372
18312
  }, {
18373
- immediate: true
18313
+ immediate: true,
18314
+ deep: true
18374
18315
  });
18375
18316
  ctx.expose({
18376
18317
  reset: reset,
18377
18318
  scrollTo: scrollTo,
18378
18319
  fixToTop: fixToTop,
18379
- updateScroll: update,
18380
18320
  refRoot: refRoot,
18381
18321
  refContent: refRoot
18382
18322
  });
@@ -5,7 +5,6 @@ declare const _default: (props: VirtualRenderProps) => {
5
5
  init: (target: Ref<Partial<Element> & Partial<VirtualElement>>) => void;
6
6
  instance: BkScrollbar;
7
7
  scrollTo: (x: any, y: any) => void;
8
- update: () => void;
9
8
  updateScrollHeight: (height: number) => void;
10
9
  };
11
10
  export default _default;
@@ -16,11 +16,7 @@ export declare class VisibleRender {
16
16
  private binding;
17
17
  private wrapper;
18
18
  private delay;
19
- private delegateWrapper;
20
19
  constructor(binding: any, el: any);
21
- get scrollHeight(): any;
22
- get offsetHeight(): any;
23
- setDelegateWrapper(el: any): void;
24
20
  render(e: any): void;
25
21
  executeThrottledRender(e: any): void;
26
22
  install(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.1-beta.57.table.2",
3
+ "version": "2.0.1-beta.58",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",