bkui-vue 0.0.1-beta.186 → 0.0.1-beta.188

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/dist/index.esm.js CHANGED
@@ -33,7 +33,7 @@ var __publicField = (obj, key2, value) => {
33
33
  __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
34
34
  return value;
35
35
  };
36
- import { inject, createVNode, h as h$1, mergeProps, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Transition, provide, createTextVNode, isVNode, withDirectives, vShow, renderSlot, Fragment, toRefs, createApp, onUnmounted, Teleport, resolveDirective, customRef, onBeforeMount, toRef, vModelText, unref, watchEffect, onUpdated, render as render$1, shallowRef, toRaw, withModifiers, TransitionGroup } from "vue";
36
+ import { inject, createVNode, h as h$1, mergeProps, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Transition, provide, createTextVNode, isVNode, withDirectives, vShow, renderSlot, Fragment, toRefs, createApp, Teleport, resolveDirective, customRef, onBeforeMount, toRef, vModelText, unref, watchEffect, onUpdated, render as render$1, onUnmounted, shallowRef, toRaw, withModifiers, TransitionGroup } from "vue";
37
37
  var reset = "";
38
38
  var alert = "";
39
39
  var affix = "";
@@ -13046,7 +13046,7 @@ var useFloating = (props2, ctx, refReference, refContent, refArrow, refRoot) =>
13046
13046
  elArrow
13047
13047
  } = resolvePopElements();
13048
13048
  const targetEl = virtualEl || elReference;
13049
- if (!targetEl)
13049
+ if (!targetEl || !elContent)
13050
13050
  return;
13051
13051
  const options = resolvePopOptions(elArrow, props3);
13052
13052
  computePosition(targetEl, elContent, options).then(({
@@ -13297,9 +13297,6 @@ var usePopoverInit = (props2, ctx, refReference, refContent, refArrow, refRoot)
13297
13297
  const { getPrefixId, resetFullscreenElementTag } = usePopperId(props2, "#");
13298
13298
  const boundary = ref();
13299
13299
  const beforeInstanceUnmount = () => {
13300
- if (typeof cleanup === "function") {
13301
- cleanup();
13302
- }
13303
13300
  removeEventListener2();
13304
13301
  };
13305
13302
  const handleFullscreenChange = () => {
@@ -13401,7 +13398,7 @@ var Component$p = defineComponent({
13401
13398
  });
13402
13399
  updateBoundary();
13403
13400
  onMounted(onMountedFn);
13404
- onUnmounted(onUnmountedFn);
13401
+ onBeforeUnmount(onUnmountedFn);
13405
13402
  const transBoundary = computed(() => (isFullscreen.value || !disableTeleport) && typeof boundary.value === "string");
13406
13403
  const show2 = () => {
13407
13404
  showFn();
@@ -16021,6 +16018,7 @@ var EVENTS$1 = /* @__PURE__ */ ((EVENTS2) => {
16021
16018
  EVENTS2["ON_FILTER_CLICK"] = "onFilterClick";
16022
16019
  EVENTS2["ON_SETTING_CHANGE"] = "onSettingChange";
16023
16020
  EVENTS2["ON_ROW_EXPAND_CLICK"] = "onRowExpandClick";
16021
+ EVENTS2["ON_ROW_CHECK"] = "onRowCheck";
16024
16022
  return EVENTS2;
16025
16023
  })(EVENTS$1 || {});
16026
16024
  var EMITEVENTS = /* @__PURE__ */ ((EMITEVENTS2) => {
@@ -16035,6 +16033,9 @@ var EMITEVENTS = /* @__PURE__ */ ((EMITEVENTS2) => {
16035
16033
  EMITEVENTS2["PAGE_VALUE_CHANGE"] = "pageValueChange";
16036
16034
  EMITEVENTS2["SETTING_CHANGE"] = "settingChange";
16037
16035
  EMITEVENTS2["SCROLL_BOTTOM"] = "scrollBottom";
16036
+ EMITEVENTS2["ROW_SELECT"] = "select";
16037
+ EMITEVENTS2["ROW_SELECT_ALL"] = "selectAll";
16038
+ EMITEVENTS2["ROW_SELECT_CHANGE"] = "selectionChange";
16038
16039
  return EMITEVENTS2;
16039
16040
  })(EMITEVENTS || {});
16040
16041
  const EMPTY$1 = (..._args) => true;
@@ -16042,19 +16043,24 @@ const EMIT_EVENT_TYPES = {
16042
16043
  ["columnPick"]: EMPTY$1,
16043
16044
  ["columnFilter"]: EMPTY$1,
16044
16045
  ["columnSort"]: EMPTY$1,
16046
+ ["colFilterSave"]: EMPTY$1,
16045
16047
  ["rowClick"]: EMPTY$1,
16046
16048
  ["rowDblclick"]: EMPTY$1,
16047
16049
  ["rowExpand"]: EMPTY$1,
16050
+ ["select"]: EMPTY$1,
16051
+ ["selectAll"]: EMPTY$1,
16052
+ ["selectionChange"]: EMPTY$1,
16048
16053
  ["pageLimitChange"]: EMPTY$1,
16049
16054
  ["pageValueChange"]: EMPTY$1,
16050
16055
  ["settingChange"]: EMPTY$1,
16051
- ["scrollBottom"]: EMPTY$1,
16052
- ["colFilterSave"]: EMPTY$1
16056
+ ["scrollBottom"]: EMPTY$1
16053
16057
  };
16054
16058
  const TABLE_ROW_ATTRIBUTE = {
16055
16059
  ROW_INDEX: "__$table_row_index",
16056
16060
  ROW_UID: "__$uuid",
16057
- ROW_EXPAND: "__row_expand"
16061
+ ROW_EXPAND: "__row_expand",
16062
+ ROW_SELECTION: "__row_selection",
16063
+ ROW_SELECTION_ALL: "__row_selection_all"
16058
16064
  };
16059
16065
  const SCROLLY_WIDTH = 4;
16060
16066
  const LINE_HEIGHT = 42;
@@ -16085,7 +16091,7 @@ const IColumnType = {
16085
16091
  content: PropTypes.string.def(""),
16086
16092
  disabled: PropTypes.bool.def(false),
16087
16093
  watchCellResize: PropTypes.bool.def(true)
16088
- })]).def(false),
16094
+ })]).def(void 0),
16089
16095
  type: PropTypes.commonType(["selection", "index", "expand", "none"], "columnType").def("none"),
16090
16096
  resizable: PropTypes.bool.def(true),
16091
16097
  fixed: PropTypes.oneOfType([
@@ -16157,10 +16163,18 @@ const tableProps = {
16157
16163
  PropTypes.bool
16158
16164
  ]).def(void 0),
16159
16165
  reserveExpand: PropTypes.bool.def(false),
16166
+ selectionKey: PropTypes.string.def(""),
16167
+ isSelectedFn: PropTypes.func.def(void 0),
16160
16168
  rowKey: PropTypes.oneOfType([
16161
16169
  PropTypes.string,
16162
16170
  PropTypes.func
16163
- ]).def(TABLE_ROW_ATTRIBUTE.ROW_INDEX)
16171
+ ]).def(TABLE_ROW_ATTRIBUTE.ROW_INDEX),
16172
+ showOverflowTooltip: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
16173
+ content: PropTypes.string.def(""),
16174
+ disabled: PropTypes.bool.def(false),
16175
+ watchCellResize: PropTypes.bool.def(true)
16176
+ })]).def(false),
16177
+ asyncData: PropTypes.bool.def(false)
16164
16178
  };
16165
16179
  var Column = defineComponent({
16166
16180
  name: "TableColumn",
@@ -16205,7 +16219,7 @@ const resolvePaginationOption = (propPagination, defVal) => {
16205
16219
  }
16206
16220
  return {};
16207
16221
  };
16208
- var userPagination = (props2, indexData) => {
16222
+ var usePagination = (props2, indexData) => {
16209
16223
  const startIndex = ref(0);
16210
16224
  const endIndex = ref(0);
16211
16225
  let pagination2 = reactive({
@@ -16928,13 +16942,7 @@ const getRowKey = (item, props2, index) => {
16928
16942
  if (props2.rowKey === TABLE_ROW_ATTRIBUTE.ROW_INDEX) {
16929
16943
  return `__ROW_INDEX_${index}`;
16930
16944
  }
16931
- const keys = props2.rowKey.split(".");
16932
- return keys.reduce((pre, cur) => {
16933
- if (Object.prototype.hasOwnProperty.call(pre, cur)) {
16934
- return pre[cur];
16935
- }
16936
- return pre;
16937
- }, item);
16945
+ return lodash.exports.get(item, props2.rowKey);
16938
16946
  }
16939
16947
  if (typeof props2.rowKey === "function") {
16940
16948
  return Reflect.apply(props2.rowKey, globalThis, [item]);
@@ -16973,16 +16981,29 @@ var TableCell = defineComponent({
16973
16981
  name: "TableCell",
16974
16982
  props: {
16975
16983
  column: PropTypes.any.def({}),
16976
- row: PropTypes.any.def({})
16984
+ row: PropTypes.any.def({}),
16985
+ parentSetting: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
16986
+ content: PropTypes.string.def(""),
16987
+ disabled: PropTypes.bool.def(false),
16988
+ watchCellResize: PropTypes.bool.def(true)
16989
+ })]).def(void 0)
16977
16990
  },
16978
16991
  setup(props2, {
16979
16992
  slots
16980
16993
  }) {
16981
16994
  const refRoot = ref();
16982
16995
  const isTipsEnabled = ref(false);
16996
+ const resolveSetting = () => {
16997
+ if (/boolean|object/.test(props2.column.showOverflowTooltip) && props2.column.showOverflowTooltip !== null) {
16998
+ return props2.column;
16999
+ }
17000
+ return {
17001
+ showOverflowTooltip: props2.parentSetting
17002
+ };
17003
+ };
16983
17004
  const {
16984
17005
  showOverflowTooltip = false
16985
- } = props2.column || {};
17006
+ } = resolveSetting();
16986
17007
  let observerIns = null;
16987
17008
  let bkEllipsisIns = null;
16988
17009
  const resolveTooltipOption = () => {
@@ -17755,6 +17776,9 @@ class TableRender {
17755
17776
  "--row-height": `${resolvePropVal(config, "height", ["thead"])}px`
17756
17777
  };
17757
17778
  const renderHeadCell = (column, index) => {
17779
+ if (column.type === "selection") {
17780
+ return this.renderCheckboxColumn({}, 0, true);
17781
+ }
17758
17782
  const cells = [];
17759
17783
  if (column.sort) {
17760
17784
  cells.push(this.getSortCell(column, index));
@@ -17843,7 +17867,8 @@ class TableRender {
17843
17867
  }, [createVNode(TableCell, {
17844
17868
  "class": tdCtxClass,
17845
17869
  "column": column,
17846
- "row": row
17870
+ "row": row,
17871
+ "parentSetting": this.props.showOverflowTooltip
17847
17872
  }, _isSlot$1(_slot2 = this.renderCell(row, column, rowIndex, rows)) ? _slot2 : {
17848
17873
  default: () => [_slot2]
17849
17874
  })]);
@@ -17894,38 +17919,64 @@ class TableRender {
17894
17919
  e
17895
17920
  }]);
17896
17921
  }
17897
- renderCell(row, column, index, rows) {
17898
- if (column.type === "expand") {
17899
- const renderExpandSlot = () => {
17900
- var _a, _b, _c;
17901
- if (typeof column.render === "function") {
17902
- return column.render(null, row, index, rows);
17903
- }
17904
- return (_c = (_b = (_a = this.context.slots).expandCell) == null ? void 0 : _b.call(_a, {
17905
- row,
17906
- column,
17907
- index,
17908
- rows
17909
- })) != null ? _c : this.getExpandCell(row);
17910
- };
17911
- return createVNode("span", {
17912
- "class": "expand-btn-action",
17913
- "onClick": (e) => this.handleRowExpandClick(row, column, index, rows, e)
17914
- }, [renderExpandSlot()]);
17915
- }
17922
+ renderCellCallbackFn(row, column, index, rows) {
17916
17923
  const cell = getRowText(row, resolvePropVal(column, "field", [column, row]), column);
17917
- if (typeof column.render === "function") {
17918
- const data2 = this.props.data[row[TABLE_ROW_ATTRIBUTE.ROW_INDEX]];
17919
- return column.render({
17920
- cell,
17921
- data: data2,
17924
+ const data2 = this.props.data[row[TABLE_ROW_ATTRIBUTE.ROW_INDEX]];
17925
+ return column.render({
17926
+ cell,
17927
+ data: data2,
17928
+ row,
17929
+ column,
17930
+ index,
17931
+ rows
17932
+ });
17933
+ }
17934
+ renderCheckboxColumn(row, index, isAll = false) {
17935
+ const handleChecked = (value) => {
17936
+ this.emitEvent(EVENTS$1.ON_ROW_CHECK, [{
17937
+ row,
17938
+ index,
17939
+ isAll,
17940
+ value
17941
+ }]);
17942
+ };
17943
+ return createVNode(BkCheckbox, {
17944
+ "onChange": handleChecked,
17945
+ "modelValue": row[TABLE_ROW_ATTRIBUTE.ROW_SELECTION]
17946
+ }, null);
17947
+ }
17948
+ renderExpandColumn(row, column, index, rows) {
17949
+ const renderExpandSlot = () => {
17950
+ var _a, _b, _c;
17951
+ if (typeof column.render === "function") {
17952
+ return this.renderCellCallbackFn(row, column, index, rows);
17953
+ }
17954
+ return (_c = (_b = (_a = this.context.slots).expandCell) == null ? void 0 : _b.call(_a, {
17922
17955
  row,
17923
17956
  column,
17924
17957
  index,
17925
17958
  rows
17926
- });
17927
- }
17928
- return cell;
17959
+ })) != null ? _c : this.getExpandCell(row);
17960
+ };
17961
+ return createVNode("span", {
17962
+ "class": "expand-btn-action",
17963
+ "onClick": (e) => this.handleRowExpandClick(row, column, index, rows, e)
17964
+ }, [renderExpandSlot()]);
17965
+ }
17966
+ renderCell(row, column, index, rows) {
17967
+ var _a, _b;
17968
+ const defaultFn = () => {
17969
+ const cell = getRowText(row, resolvePropVal(column, "field", [column, row]), column);
17970
+ if (typeof column.render === "function") {
17971
+ return this.renderCellCallbackFn(row, column, index, rows);
17972
+ }
17973
+ return cell;
17974
+ };
17975
+ const renderFn = {
17976
+ expand: (row2, column2, index2, rows2) => this.renderExpandColumn(row2, column2, index2, rows2),
17977
+ selection: (row2, _column, index2, _rows) => this.renderCheckboxColumn(row2, index2)
17978
+ };
17979
+ return (_b = (_a = renderFn[column.type]) == null ? void 0 : _a.call(renderFn, row, column, index, rows)) != null ? _b : defaultFn();
17929
17980
  }
17930
17981
  isColActive(colIndex) {
17931
17982
  return this.props.columnPick !== "disabled" && this.propActiveCols.some((col) => col.index === colIndex && col.active);
@@ -18199,7 +18250,12 @@ const useClass = (props2, targetColumns, root, reactiveProp, pageData) => {
18199
18250
  }
18200
18251
  return defaultValue;
18201
18252
  };
18202
- const contentStyle = reactive({});
18253
+ const contentStyle = reactive({
18254
+ display: "",
18255
+ "min-height": "",
18256
+ height: "",
18257
+ maxHeight: ""
18258
+ });
18203
18259
  const getHeadHeight = () => props2.showHead ? resolvePropHeight(props2.headHeight, LINE_HEIGHT) : 0;
18204
18260
  const resolveContentStyle = () => {
18205
18261
  const resolveHeight = resolvePropHeight(props2.height, autoHeight.value);
@@ -18305,6 +18361,57 @@ const useInit = (props2, targetColumns) => {
18305
18361
  reactiveSchema.rowActions.set(rowId, Object.assign({}, (_a2 = reactiveSchema.rowActions.get(rowId)) != null ? _a2 : {}, { isExpand }));
18306
18362
  updateIndexData();
18307
18363
  };
18364
+ const isSelectionAll = () => {
18365
+ if (reactiveSchema.rowActions.has(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_ALL)) {
18366
+ return reactiveSchema.rowActions.get(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_ALL);
18367
+ }
18368
+ if (!!props2.selectionKey) {
18369
+ return indexData.every((row) => resolveSelectionRow(row));
18370
+ }
18371
+ return false;
18372
+ };
18373
+ const toggleAllSelection = (checked = void 0) => {
18374
+ const isChecked = typeof checked === "boolean" ? checked : !isSelectionAll();
18375
+ reactiveSchema.rowActions.set(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_ALL, isChecked);
18376
+ updateIndexData();
18377
+ asyncSelection(null, checked, true);
18378
+ };
18379
+ const clearSelection = () => {
18380
+ toggleAllSelection(false);
18381
+ };
18382
+ const toggleRowSelection = (row, selected) => {
18383
+ var _a2;
18384
+ const rowId = row[TABLE_ROW_ATTRIBUTE.ROW_UID];
18385
+ if (rowId) {
18386
+ const isSelected = typeof selected === "boolean" ? selected : !resolveSelection(row, rowId);
18387
+ const target = Object.assign({}, (_a2 = reactiveSchema.rowActions.get(rowId)) != null ? _a2 : {}, { isSelected });
18388
+ reactiveSchema.rowActions.set(rowId, target);
18389
+ updateIndexData();
18390
+ asyncSelection(row, selected, false);
18391
+ }
18392
+ };
18393
+ const resolveSelectionRow = (row, thenFn = () => false) => {
18394
+ if (typeof props2.isSelectedFn === "function") {
18395
+ return Reflect.apply(props2.isSelectedFn, globalThis, [{ row, data: props2.data }]);
18396
+ }
18397
+ if (typeof props2.selectionKey === "string" && props2.selectionKey.length) {
18398
+ return lodash.exports.get(row, props2.selectionKey);
18399
+ }
18400
+ return thenFn();
18401
+ };
18402
+ const resolveSelection = (row, rowId) => resolveSelectionRow(row, () => {
18403
+ var _a2;
18404
+ if (isSelectionAll()) {
18405
+ return true;
18406
+ }
18407
+ if (reactiveSchema.rowActions.has(rowId)) {
18408
+ return (_a2 = reactiveSchema.rowActions.get(rowId)) == null ? void 0 : _a2.isSelected;
18409
+ }
18410
+ if (Object.prototype.hasOwnProperty.call(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION) && typeof row[TABLE_ROW_ATTRIBUTE.ROW_SELECTION] === "boolean") {
18411
+ return row[TABLE_ROW_ATTRIBUTE.ROW_SELECTION];
18412
+ }
18413
+ return false;
18414
+ });
18308
18415
  const indexData = reactive([]);
18309
18416
  const initIndexData = (keepLocalAction = false) => {
18310
18417
  indexData.splice(0, indexData.length, ...props2.data.map((item, index) => {
@@ -18312,17 +18419,35 @@ const useInit = (props2, targetColumns) => {
18312
18419
  return __spreadProps(__spreadValues({}, item), {
18313
18420
  [TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index,
18314
18421
  [TABLE_ROW_ATTRIBUTE.ROW_UID]: rowId,
18315
- [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: keepLocalAction ? isRowExpand(rowId) : false
18422
+ [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: keepLocalAction ? isRowExpand(rowId) : false,
18423
+ [TABLE_ROW_ATTRIBUTE.ROW_SELECTION]: resolveSelection(item, rowId)
18316
18424
  });
18317
18425
  }));
18318
18426
  };
18319
18427
  const updateIndexData = () => {
18320
18428
  indexData.forEach((item) => {
18321
18429
  Object.assign(item, {
18322
- [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: isRowExpand(item[TABLE_ROW_ATTRIBUTE.ROW_UID])
18430
+ [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: isRowExpand(item[TABLE_ROW_ATTRIBUTE.ROW_UID]),
18431
+ [TABLE_ROW_ATTRIBUTE.ROW_SELECTION]: resolveSelection(item, item[TABLE_ROW_ATTRIBUTE.ROW_UID])
18323
18432
  });
18324
18433
  });
18325
18434
  };
18435
+ const asyncSelection = (row, value, all = false) => {
18436
+ if (props2.asyncData && props2.rowKey) {
18437
+ if (all) {
18438
+ props2.data.forEach((item) => {
18439
+ if (lodash.exports.has(item, props2.selectionKey)) {
18440
+ lodash.exports.set(item, props2.selectionKey, !!value);
18441
+ }
18442
+ });
18443
+ } else {
18444
+ if (lodash.exports.has(row, props2.selectionKey)) {
18445
+ const target = props2.data.find((item) => lodash.exports.get(item, props2.rowKey) === lodash.exports.get(row, props2.rowKey));
18446
+ lodash.exports.set(target, props2.selectionKey, !!value);
18447
+ }
18448
+ }
18449
+ }
18450
+ };
18326
18451
  const { renderFixedColumns, fixedWrapperClass } = useFixedColumn(props2, colgroups, false);
18327
18452
  return {
18328
18453
  colgroups,
@@ -18335,7 +18460,10 @@ const useInit = (props2, targetColumns) => {
18335
18460
  updateIndexData,
18336
18461
  renderFixedColumns,
18337
18462
  setRowExpand,
18338
- updateColGroups
18463
+ updateColGroups,
18464
+ clearSelection,
18465
+ toggleAllSelection,
18466
+ toggleRowSelection
18339
18467
  };
18340
18468
  };
18341
18469
  var Component$d = defineComponent({
@@ -18364,14 +18492,17 @@ var Component$d = defineComponent({
18364
18492
  renderFixedColumns,
18365
18493
  setRowExpand,
18366
18494
  initIndexData,
18367
- fixedWrapperClass
18495
+ fixedWrapperClass,
18496
+ clearSelection,
18497
+ toggleAllSelection,
18498
+ toggleRowSelection
18368
18499
  } = useInit(props2, targetColumns);
18369
18500
  const {
18370
18501
  pageData,
18371
18502
  localPagination,
18372
18503
  resolvePageData,
18373
18504
  watchEffectFn
18374
- } = userPagination(props2, indexData);
18505
+ } = usePagination(props2, indexData);
18375
18506
  const {
18376
18507
  tableClass,
18377
18508
  headClass,
@@ -18395,7 +18526,7 @@ var Component$d = defineComponent({
18395
18526
  tableOffsetRight.value = $tableScrollWidth - $contentWidth;
18396
18527
  }
18397
18528
  };
18398
- watch(() => [props2.data, props2.pagination], () => {
18529
+ watch(() => [props2.data, props2.pagination, props2.height, props2.maxHeight, props2.minHeight], () => {
18399
18530
  initIndexData(props2.reserveExpand);
18400
18531
  watchEffectFn(columnFilterFn, columnSortFn, activeSortColumn);
18401
18532
  nextTick(() => {
@@ -18484,6 +18615,34 @@ var Component$d = defineComponent({
18484
18615
  e
18485
18616
  });
18486
18617
  setRowExpand(row, !row[TABLE_ROW_ATTRIBUTE.ROW_EXPAND]);
18618
+ }).on(EVENTS$1.ON_ROW_CHECK, ({
18619
+ row,
18620
+ isAll,
18621
+ index,
18622
+ value
18623
+ }) => {
18624
+ if (isAll) {
18625
+ toggleAllSelection(value);
18626
+ ctx.emit(EMITEVENTS.ROW_SELECT_ALL, {
18627
+ checked: value,
18628
+ data: props2.data
18629
+ });
18630
+ } else {
18631
+ toggleRowSelection(row, value);
18632
+ ctx.emit(EMITEVENTS.ROW_SELECT, {
18633
+ row,
18634
+ index,
18635
+ checked: value,
18636
+ data: props2.data
18637
+ });
18638
+ }
18639
+ ctx.emit(EMITEVENTS.ROW_SELECT_CHANGE, {
18640
+ row,
18641
+ isAll,
18642
+ index,
18643
+ checked: value,
18644
+ data: props2.data
18645
+ });
18487
18646
  });
18488
18647
  const handleScrollChanged = (args) => {
18489
18648
  var _a;
@@ -18527,7 +18686,10 @@ var Component$d = defineComponent({
18527
18686
  tableRender.destroy();
18528
18687
  });
18529
18688
  ctx.expose({
18530
- setRowExpand
18689
+ setRowExpand,
18690
+ clearSelection,
18691
+ toggleAllSelection,
18692
+ toggleRowSelection
18531
18693
  });
18532
18694
  const tableBodyClass = computed(() => __spreadProps(__spreadValues({}, contentClass), {
18533
18695
  "__is-empty": !pageData.length
@@ -20260,28 +20422,38 @@ const InfoBox = (config) => {
20260
20422
  update
20261
20423
  });
20262
20424
  const getContent = () => {
20263
- if (!modalFuncProps.value.subTitle) {
20264
- return "";
20425
+ const children = [];
20426
+ const subTitleBox = [];
20427
+ if (modalFuncProps.value.subTitle) {
20428
+ switch (typeof modalFuncProps.value.subTitle) {
20429
+ case "string":
20430
+ children.push(modalFuncProps.value.subTitle);
20431
+ break;
20432
+ case "function":
20433
+ children.push(modalFuncProps.value.subTitle());
20434
+ break;
20435
+ default:
20436
+ children.push(modalFuncProps.value.subTitle);
20437
+ break;
20438
+ }
20265
20439
  }
20266
- switch (typeof modalFuncProps.value.subTitle) {
20267
- case "function":
20268
- return modalFuncProps.value.subTitle();
20269
- default:
20270
- case "string":
20271
- return modalFuncProps.value.subTitle;
20440
+ if (children.length) {
20441
+ subTitleBox.push(h$1("div", {
20442
+ class: "bk-info-sub-title",
20443
+ style: `text-Align:${modalFuncProps.value.contentAlign || "center"}`
20444
+ }, children));
20272
20445
  }
20446
+ return subTitleBox;
20273
20447
  };
20274
20448
  return () => createVNode(Dialog, __spreadProps(__spreadValues({
20449
+ class: "bk-info-wrapper",
20275
20450
  headerAlign: "center",
20276
20451
  footerAlign: "center"
20277
20452
  }, modalFuncProps.value), {
20278
20453
  isShow: isShow.value,
20279
20454
  onClosed,
20280
20455
  onConfirm
20281
- }), [h$1("div", {
20282
- class: "bk-info-sub-title",
20283
- style: `text-Align:${modalFuncProps.value.contentAlign || "center"}`
20284
- }, getContent())]);
20456
+ }), getContent());
20285
20457
  }
20286
20458
  });
20287
20459
  const app = createApp(dialog2).mount(container2);