bkui-vue 2.0.1-beta.55 → 2.0.1-beta.56

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.
package/lib/index.js CHANGED
@@ -4,5 +4,5 @@ export { default } from './preset';
4
4
  export * from './config-provider';
5
5
  export * from './directives';
6
6
  export * as plugins from './plugins';
7
- export const version = "2.0.1-beta.55";
7
+ export const version = "2.0.1-beta.56";
8
8
  window.__bkui_vue_version__ = version;
@@ -31,6 +31,7 @@ export declare const TABLE_ROW_ATTRIBUTE: {
31
31
  ROW_SOURCE_DATA: string;
32
32
  ROW_SKIP_CFG: string;
33
33
  ROW_SPAN: string;
34
+ ROW_HEIGHT: string;
34
35
  };
35
36
  export declare const COLUMN_ATTRIBUTE: {
36
37
  COL_UID: string;
@@ -13,7 +13,7 @@ declare const _default: (props: TablePropTypes, ctx: any) => {
13
13
  setDragOffsetX: (val: number) => void;
14
14
  setFixedColumns: (values: Column[]) => void;
15
15
  setOffsetRight: () => void;
16
- setLineHeight: (val: number) => void;
16
+ setLineHeight: (val: number | ((...args: any[]) => number)) => void;
17
17
  setHeaderRowCount: (val: number) => void;
18
18
  initRootStyleVars: () => void;
19
19
  refRoot: Ref<HTMLElement>;
@@ -3,16 +3,14 @@ import { TablePropTypes } from '../props';
3
3
  import { UseColumns } from './use-columns';
4
4
  import { UsePagination } from './use-pagination';
5
5
  import { UseRows } from './use-rows';
6
- import { UseSettings } from './use-settings';
7
6
  type RenderType = {
8
7
  props: TablePropTypes;
9
8
  ctx: SetupContext;
10
9
  columns: UseColumns;
11
10
  rows: UseRows;
12
11
  pagination: UsePagination;
13
- settings: UseSettings;
14
12
  };
15
- declare const _default: ({ props, ctx, columns, rows, pagination, settings }: RenderType) => {
13
+ declare const _default: ({ props, ctx, columns, rows, pagination }: RenderType) => {
16
14
  renderColumns: () => JSX.Element;
17
15
  renderTBody: (list?: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
18
16
  [key: string]: any;
@@ -12,6 +12,7 @@ declare const useRows: (props: TablePropTypes) => {
12
12
  setRowSelectionAll: (val: boolean) => void;
13
13
  setRowSelection: (row: Record<string, unknown>, isSelected: boolean, index?: number) => void;
14
14
  setAllRowExpand: (value?: boolean) => void;
15
+ setRowHeight: (height: number, row?: any) => void;
15
16
  setTableIsNeedRowSpan: (val: boolean) => void;
16
17
  getRowAttribute: (item: IEmptyObject | object, attrName: string) => any;
17
18
  getRowSelection: () => any[];
@@ -19,6 +20,7 @@ declare const useRows: (props: TablePropTypes) => {
19
20
  getRowCheckedAllValue: () => any;
20
21
  changePageRowIndex: (sourceIndex: any, targetIndex: any) => void;
21
22
  toggleAllSelection: (value?: boolean) => void;
23
+ getRowHeight: (row?: any, index?: any, type?: any) => any;
22
24
  tableRowList: import("vue").Ref<any[]>;
23
25
  tableRowSchema: WeakMap<object, any> & Omit<WeakMap<object, any>, keyof WeakMap<any, any>>;
24
26
  pageRowList: any[];
@@ -17436,7 +17436,8 @@ var TABLE_ROW_ATTRIBUTE = {
17436
17436
  ROW_SELECTION_INDETERMINATE: 'row_selection_indeterminate',
17437
17437
  ROW_SOURCE_DATA: 'row_source_data',
17438
17438
  ROW_SKIP_CFG: 'row_skip_config',
17439
- ROW_SPAN: 'row_span'
17439
+ ROW_SPAN: 'row_span',
17440
+ ROW_HEIGHT: 'row_height'
17440
17441
  };
17441
17442
  var COLUMN_ATTRIBUTE = {
17442
17443
  COL_UID: 'col_$uuid',
@@ -21187,7 +21188,6 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21187
21188
 
21188
21189
 
21189
21190
  /* harmony default export */ const use_layout = (function (props, ctx) {
21190
- var _props$rowHeight;
21191
21191
  var refRoot = (0,external_vue_namespaceObject.ref)(null);
21192
21192
  var refHead = (0,external_vue_namespaceObject.ref)(null);
21193
21193
  var refBody = (0,external_vue_namespaceObject.ref)(null);
@@ -21199,7 +21199,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21199
21199
  var offsetRight = (0,external_vue_namespaceObject.ref)(0);
21200
21200
  var layout = (0,external_vue_namespaceObject.reactive)({});
21201
21201
  var fixedColumns = (0,external_vue_namespaceObject.reactive)([]);
21202
- var lineHeight = (0,external_vue_namespaceObject.ref)((_props$rowHeight = props.rowHeight) !== null && _props$rowHeight !== void 0 ? _props$rowHeight : LINE_HEIGHT);
21202
+ var lineHeight = (0,external_vue_namespaceObject.ref)(LINE_HEIGHT);
21203
21203
  var headerRowCount = (0,external_vue_namespaceObject.ref)(1);
21204
21204
  var fixedBottomHeight = (0,external_vue_namespaceObject.computed)(function () {
21205
21205
  var _ctx$slots;
@@ -21396,11 +21396,11 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21396
21396
  });
21397
21397
  var fixedBottomRow = resolveClassName('table-fixed-bottom');
21398
21398
  var fixedBottomLoadingStyle = (0,external_vue_namespaceObject.computed)(function () {
21399
- var _props$fixedBottom$po, _props$fixedBottom3, _props$fixedBottom$he2, _props$fixedBottom4;
21399
+ var _props$fixedBottom$mi, _props$fixedBottom3, _props$fixedBottom$po, _props$fixedBottom4, _props$fixedBottom$he2, _props$fixedBottom5;
21400
21400
  return {
21401
- minHeight: "".concat(lineHeight.value, "px"),
21402
- position: (_props$fixedBottom$po = (_props$fixedBottom3 = props.fixedBottom) === null || _props$fixedBottom3 === void 0 ? void 0 : _props$fixedBottom3.position) !== null && _props$fixedBottom$po !== void 0 ? _props$fixedBottom$po : 'absolute',
21403
- height: (_props$fixedBottom$he2 = (_props$fixedBottom4 = props.fixedBottom) === null || _props$fixedBottom4 === void 0 ? void 0 : _props$fixedBottom4.height) !== null && _props$fixedBottom$he2 !== void 0 ? _props$fixedBottom$he2 : null
21401
+ minHeight: "".concat((_props$fixedBottom$mi = (_props$fixedBottom3 = props.fixedBottom) === null || _props$fixedBottom3 === void 0 ? void 0 : _props$fixedBottom3.minHeight) !== null && _props$fixedBottom$mi !== void 0 ? _props$fixedBottom$mi : LINE_HEIGHT, "px"),
21402
+ 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',
21403
+ height: (_props$fixedBottom$he2 = (_props$fixedBottom5 = props.fixedBottom) === null || _props$fixedBottom5 === void 0 ? void 0 : _props$fixedBottom5.height) !== null && _props$fixedBottom$he2 !== void 0 ? _props$fixedBottom$he2 : null
21404
21404
  };
21405
21405
  });
21406
21406
  (0,external_vue_namespaceObject.onMounted)(function () {
@@ -23257,8 +23257,7 @@ function use_render_isSlot(s) {
23257
23257
  ctx = _ref.ctx,
23258
23258
  columns = _ref.columns,
23259
23259
  rows = _ref.rows,
23260
- pagination = _ref.pagination,
23261
- settings = _ref.settings;
23260
+ pagination = _ref.pagination;
23262
23261
  var t = (0,config_provider_namespaceObject.useLocale)('table');
23263
23262
  var uuid = esm_browser_v4();
23264
23263
  var dragEvents = {};
@@ -23378,23 +23377,7 @@ function use_render_isSlot(s) {
23378
23377
  return result;
23379
23378
  }), renderAppendLastRow()]);
23380
23379
  };
23381
- var getRowHeight = function getRowHeight(row, rowIndex, type) {
23382
- if (typeof props.rowHeight === 'function' || /^\d+/.test("".concat(props.rowHeight))) {
23383
- return resolvePropVal(props, 'rowHeight', [{
23384
- index: rowIndex,
23385
- type: type !== null && type !== void 0 ? type : 'tbody',
23386
- row: row
23387
- }]);
23388
- }
23389
- var _settings$options = settings.options,
23390
- size = _settings$options.size,
23391
- height = _settings$options.height,
23392
- enabled = _settings$options.enabled;
23393
- if (enabled && height !== null && height !== undefined) {
23394
- return resolvePropVal(settings.options, 'height', ['tbody', row, rowIndex, size]);
23395
- }
23396
- return LINE_HEIGHT;
23397
- };
23380
+ var getRowHeight = rows.getRowHeight;
23398
23381
  var setDragEvents = function setDragEvents(events) {
23399
23382
  dragEvents = events;
23400
23383
  };
@@ -23742,6 +23725,16 @@ var useRows = function useRows(props) {
23742
23725
  }
23743
23726
  return false;
23744
23727
  };
23728
+ var getSelfRowHeight = function getSelfRowHeight(row, rowIndex, type) {
23729
+ if (typeof props.rowHeight === 'function' || /^\d+/.test("".concat(props.rowHeight))) {
23730
+ return resolvePropVal(props, 'rowHeight', [{
23731
+ index: rowIndex,
23732
+ type: type !== null && type !== void 0 ? type : 'tbody',
23733
+ row: row
23734
+ }]);
23735
+ }
23736
+ return LINE_HEIGHT;
23737
+ };
23745
23738
  /**
23746
23739
  * 格式化传入数据配置
23747
23740
  * @param data
@@ -23766,6 +23759,7 @@ var useRows = function useRows(props) {
23766
23759
  var target = tableRowSchema.get(row);
23767
23760
  rowId = target[TABLE_ROW_ATTRIBUTE.ROW_UID];
23768
23761
  target[TABLE_ROW_ATTRIBUTE.ROW_INDEX] = index + 1;
23762
+ target[TABLE_ROW_ATTRIBUTE.ROW_HEIGHT] = getSelfRowHeight(item, index);
23769
23763
  });
23770
23764
  tableRowSchema.set(CHECK_ALL_OBJ, defineProperty_defineProperty(defineProperty_defineProperty({}, TABLE_ROW_ATTRIBUTE.ROW_SELECTION, hasSelectedRow), TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE, hasSelectedRow && hasUnSelectedRow));
23771
23765
  };
@@ -23859,6 +23853,21 @@ var useRows = function useRows(props) {
23859
23853
  var getRowCheckedAllValue = function getRowCheckedAllValue() {
23860
23854
  return getRowAttribute(CHECK_ALL_OBJ, TABLE_ROW_ATTRIBUTE.ROW_SELECTION);
23861
23855
  };
23856
+ var setRowHeight = function setRowHeight(height, row) {
23857
+ if (row) {
23858
+ setRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_HEIGHT, height);
23859
+ return;
23860
+ }
23861
+ tableRowList.value.forEach(function (row) {
23862
+ return setRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_HEIGHT, height);
23863
+ });
23864
+ };
23865
+ var getRowHeight = function getRowHeight(row, index, type) {
23866
+ if (row) {
23867
+ return getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_HEIGHT);
23868
+ }
23869
+ return getSelfRowHeight(row, index, type);
23870
+ };
23862
23871
  /**
23863
23872
  * 设置列属性
23864
23873
  * @param row
@@ -23976,6 +23985,7 @@ var useRows = function useRows(props) {
23976
23985
  setRowSelectionAll: setRowSelectionAll,
23977
23986
  setRowSelection: setRowSelection,
23978
23987
  setAllRowExpand: setAllRowExpand,
23988
+ setRowHeight: setRowHeight,
23979
23989
  setTableIsNeedRowSpan: setTableIsNeedRowSpan,
23980
23990
  getRowAttribute: getRowAttribute,
23981
23991
  getRowSelection: getRowSelection,
@@ -23983,6 +23993,7 @@ var useRows = function useRows(props) {
23983
23993
  getRowCheckedAllValue: getRowCheckedAllValue,
23984
23994
  changePageRowIndex: changePageRowIndex,
23985
23995
  toggleAllSelection: toggleAllSelection,
23996
+ getRowHeight: getRowHeight,
23986
23997
  tableRowList: tableRowList,
23987
23998
  tableRowSchema: tableRowSchema,
23988
23999
  pageRowList: pageRowList
@@ -24115,7 +24126,7 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24115
24126
  Object.assign(options, result);
24116
24127
  columns.setColumnAttributeBySettings(options, result.checked);
24117
24128
  columns.setVisibleColumns();
24118
- afterSetting === null || afterSetting === void 0 || afterSetting(result.checked);
24129
+ afterSetting === null || afterSetting === void 0 || afterSetting(result);
24119
24130
  (_refSetting$value = refSetting.value) === null || _refSetting$value === void 0 || _refSetting$value.hide();
24120
24131
  ctx.emit(EMIT_EVENTS.SETTING_CHANGE, result);
24121
24132
  };
@@ -24391,6 +24402,7 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24391
24402
  setDragOffsetX = _useLayout.setDragOffsetX,
24392
24403
  setOffsetRight = _useLayout.setOffsetRight,
24393
24404
  setHeaderRowCount = _useLayout.setHeaderRowCount,
24405
+ setLineHeight = _useLayout.setLineHeight,
24394
24406
  refBody = _useLayout.refBody,
24395
24407
  refRoot = _useLayout.refRoot;
24396
24408
  var scrollTo = function scrollTo() {
@@ -24400,15 +24412,28 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24400
24412
  }
24401
24413
  return (_refBody$value = refBody.value) === null || _refBody$value === void 0 ? void 0 : _refBody$value.scrollTo.apply(_refBody$value, args);
24402
24414
  };
24415
+ if (typeof props.rowHeight === 'function') {
24416
+ setLineHeight(function (args) {
24417
+ return rows.getRowHeight(args.rows[0], args.index);
24418
+ });
24419
+ } else {
24420
+ setLineHeight(props.rowHeight);
24421
+ }
24403
24422
  /**
24404
24423
  * 设置字段结束,展示字段改变,设置表格偏移量为0
24405
24424
  * 避免太长横向滚动导致数据不可见
24406
24425
  * @param fields
24407
24426
  */
24408
- var afterSetting = function afterSetting(fields) {
24409
- if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
24427
+ var afterSetting = function afterSetting(_ref) {
24428
+ var checked = _ref.checked,
24429
+ height = _ref.height;
24430
+ if ((checked === null || checked === void 0 ? void 0 : checked.length) > 0) {
24410
24431
  scrollTo(0, 0);
24411
24432
  }
24433
+ if (typeof props.rowHeight !== 'function') {
24434
+ rows.setRowHeight(height);
24435
+ setLineHeight(height);
24436
+ }
24412
24437
  };
24413
24438
  var settings = use_settings(props, ctx, columns, afterSetting);
24414
24439
  var dragEvents = use_draggable(props, rows, ctx);
@@ -24417,8 +24442,7 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24417
24442
  ctx: ctx,
24418
24443
  columns: columns,
24419
24444
  rows: rows,
24420
- pagination: pagination,
24421
- settings: settings
24445
+ pagination: pagination
24422
24446
  }),
24423
24447
  renderColumns = _useRender.renderColumns,
24424
24448
  renderTBody = _useRender.renderTBody,
@@ -24444,8 +24468,8 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24444
24468
  * 计算每一列的实际宽度
24445
24469
  */
24446
24470
  var computedColumnRect = function computedColumnRect() {
24447
- var _ref, _refRoot$value;
24448
- var width = (_ref = ((_refRoot$value = refRoot.value) === null || _refRoot$value === void 0 ? void 0 : _refRoot$value.offsetWidth) - (props.scrollbar ? 1 : SCROLLY_WIDTH)) !== null && _ref !== void 0 ? _ref : 0;
24471
+ var _ref2, _refRoot$value;
24472
+ var width = (_ref2 = ((_refRoot$value = refRoot.value) === null || _refRoot$value === void 0 ? void 0 : _refRoot$value.offsetWidth) - (props.scrollbar ? 1 : SCROLLY_WIDTH)) !== null && _ref2 !== void 0 ? _ref2 : 0;
24449
24473
  columns.resolveColsCalcWidth(width);
24450
24474
  resolveFixedColumnStyle();
24451
24475
  };
@@ -249,6 +249,7 @@ export declare enum IColSortBehavior {
249
249
  export type FixedBottomOption = {
250
250
  position: 'absolute' | 'relative';
251
251
  height: number;
252
+ minHeight?: number;
252
253
  loading?: boolean;
253
254
  };
254
255
  export type AppendLastRowOption = {
@@ -17411,7 +17411,8 @@ var TABLE_ROW_ATTRIBUTE = {
17411
17411
  ROW_SELECTION_INDETERMINATE: 'row_selection_indeterminate',
17412
17412
  ROW_SOURCE_DATA: 'row_source_data',
17413
17413
  ROW_SKIP_CFG: 'row_skip_config',
17414
- ROW_SPAN: 'row_span'
17414
+ ROW_SPAN: 'row_span',
17415
+ ROW_HEIGHT: 'row_height'
17415
17416
  };
17416
17417
  var COLUMN_ATTRIBUTE = {
17417
17418
  COL_UID: 'col_$uuid',
@@ -1294,8 +1294,8 @@ var EThemes;
1294
1294
  })(EThemes || (EThemes = {}));
1295
1295
  var ETypes;
1296
1296
  (function (ETypes) {
1297
- ETypes["FORMDATA"] = "formdata";
1298
1297
  ETypes["BINARY"] = "binary";
1298
+ ETypes["FORMDATA"] = "formdata";
1299
1299
  })(ETypes || (ETypes = {}));
1300
1300
  var EUploadStatus;
1301
1301
  (function (EUploadStatus) {
@@ -1304,7 +1304,6 @@ var EUploadStatus;
1304
1304
  EUploadStatus["SUCCESS"] = "success";
1305
1305
  EUploadStatus["UPLOADING"] = "uploading";
1306
1306
  })(EUploadStatus || (EUploadStatus = {}));
1307
- ;
1308
1307
  ;// CONCATENATED MODULE: ../../packages/upload/src/props.ts
1309
1308
  /*
1310
1309
  * Tencent is pleased to support the open source community by making
@@ -8,8 +8,8 @@ export declare const enum EThemes {
8
8
  }
9
9
  export type Theme = Lowercase<keyof typeof EThemes>;
10
10
  export declare const enum ETypes {
11
- FORMDATA = "formdata",
12
- BINARY = "binary"
11
+ BINARY = "binary",
12
+ FORMDATA = "formdata"
13
13
  }
14
14
  export type Type = Lowercase<keyof typeof ETypes>;
15
15
  export declare const enum EUploadStatus {
@@ -66,7 +66,7 @@ export interface UploadRequestOptions {
66
66
  formDataAttributes?: FormDataAttr | FormDataAttr[];
67
67
  filename: string;
68
68
  file: File;
69
- headers?: Headers | Record<string, string | number | null | undefined>;
69
+ headers?: Headers | Record<string, null | number | string | undefined>;
70
70
  header?: HeaderDataAttr | HeaderDataAttr[];
71
71
  withCredentials: boolean;
72
72
  sliceUrl: string;
@@ -17705,16 +17705,14 @@ var lodash = __webpack_require__(6635);
17705
17705
  * Copyright © 2012-2019 Tencent BlueKing. All Rights Reserved. 蓝鲸智云 版权所有
17706
17706
  */
17707
17707
 
17708
- function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
17708
+ function getMatchedIndex(maxCount, maxHeight, callback) {
17709
17709
  var startIndex = 0;
17710
17710
  var height = 0;
17711
17711
  var diffHeight = 0;
17712
17712
  var lastHeight = 0;
17713
17713
  for (; startIndex < maxCount; startIndex++) {
17714
17714
  lastHeight = callback({
17715
- index: startIndex,
17716
- items: [startIndex * groupItemCount, (startIndex + 1) * groupItemCount],
17717
- type: 'virtual'
17715
+ index: startIndex
17718
17716
  });
17719
17717
  if (height + lastHeight > maxHeight) {
17720
17718
  diffHeight = maxHeight - height;
@@ -17748,10 +17746,11 @@ function computedVirtualIndex(lineHeight, callback, pagination, wrapper, event)
17748
17746
  translateY = elScrollTop % lineHeight;
17749
17747
  }
17750
17748
  if (typeof lineHeight === 'function') {
17751
- var startValue = getMatchedIndex(count, elScrollTop, groupItemCount, lineHeight);
17749
+ var maxCount = Math.ceil(count / groupItemCount);
17750
+ var startValue = getMatchedIndex(maxCount, elScrollTop, lineHeight);
17752
17751
  targetStartIndex = startValue.startIndex > 0 ? startValue.startIndex : 0;
17753
17752
  translateY = startValue.diffHeight;
17754
- var endValue = getMatchedIndex(count, elOffsetHeight, groupItemCount, lineHeight);
17753
+ var endValue = getMatchedIndex(maxCount, elOffsetHeight, lineHeight);
17755
17754
  targetEndIndex = endValue.startIndex + targetStartIndex + 1;
17756
17755
  }
17757
17756
  var bottom = elScrollHeight - elOffsetHeight - elScrollTop;
@@ -18074,9 +18073,28 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18074
18073
  rendAsTag = _useTagRender.rendAsTag;
18075
18074
  return rendAsTag;
18076
18075
  }
18076
+ var getRowHeightArgs = function getRowHeightArgs(startIndex) {
18077
+ var start = startIndex * props.groupItemCount;
18078
+ var end = (startIndex + 1) * props.groupItemCount;
18079
+ return {
18080
+ index: startIndex,
18081
+ rows: props.list.slice(start, end),
18082
+ items: [start, end],
18083
+ type: 'virtual'
18084
+ };
18085
+ };
18086
+ var getLineHeight = function getLineHeight() {
18087
+ if (typeof props.lineHeight === 'function') {
18088
+ return function (_ref) {
18089
+ var index = _ref.index;
18090
+ return props.lineHeight(getRowHeightArgs(index));
18091
+ };
18092
+ }
18093
+ return props.lineHeight;
18094
+ };
18077
18095
  var binding = (0,external_vue_namespaceObject.computed)(function () {
18078
18096
  return {
18079
- lineHeight: props.lineHeight,
18097
+ lineHeight: getLineHeight(),
18080
18098
  handleScrollCallback: handleScrollCallback,
18081
18099
  pagination: pagination,
18082
18100
  throttleDelay: props.throttleDelay,
@@ -18110,16 +18128,12 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18110
18128
  var getLastPageIndex = function getLastPageIndex() {
18111
18129
  // @ts-ignore
18112
18130
  var elHeight = virtualRoot.value.offsetHeight;
18113
- var startIndex = listLength.value;
18131
+ var startIndex = Math.ceil(listLength.value / props.groupItemCount);
18114
18132
  var rowsHeight = 0;
18115
18133
  var lastHeight = 0;
18116
18134
  var diffHeight = 0;
18117
18135
  for (; startIndex > 0; startIndex--) {
18118
- lastHeight = props.lineHeight({
18119
- index: startIndex,
18120
- items: [startIndex, startIndex * props.groupItemCount],
18121
- type: 'virtual'
18122
- });
18136
+ lastHeight = props.lineHeight(getRowHeightArgs(startIndex));
18123
18137
  rowsHeight = rowsHeight + lastHeight;
18124
18138
  if (rowsHeight > elHeight) {
18125
18139
  diffHeight = rowsHeight - elHeight;
@@ -18201,12 +18215,9 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18201
18215
  if (typeof props.lineHeight === 'function') {
18202
18216
  innerHeight.value = 0;
18203
18217
  var fnValue = 0;
18204
- for (var i = 0; i < listLength.value; i++) {
18205
- var fnVal = props.lineHeight.apply(_this, [{
18206
- index: i,
18207
- type: 'virtual',
18208
- items: [i * props.groupItemCount, props.groupItemCount]
18209
- }]);
18218
+ var rowsLength = Math.ceil(listLength.value / props.groupItemCount);
18219
+ for (var i = 0; i < rowsLength; i++) {
18220
+ var fnVal = props.lineHeight.apply(_this, [getRowHeightArgs(i)]);
18210
18221
  fnValue += typeof fnVal === 'number' ? fnVal : 0;
18211
18222
  }
18212
18223
  innerHeight.value = fnValue;
@@ -1,7 +1,5 @@
1
- export declare function getMatchedIndex(maxCount: number, maxHeight: number, groupItemCount: number, callback: (agrs: {
1
+ export declare function getMatchedIndex(maxCount: number, maxHeight: number, callback: (agrs: {
2
2
  index: number;
3
- items: number[];
4
- type: string;
5
3
  }) => 0): {
6
4
  startIndex: number;
7
5
  height: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.1-beta.55",
3
+ "version": "2.0.1-beta.56",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",