bkui-vue 0.0.1-beta.187 → 0.0.1-beta.189

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
@@ -11588,7 +11588,7 @@ const PopoverProps = __spreadValues({
11588
11588
  autoVisibility: PropTypes.bool.def(true),
11589
11589
  disableOutsideClick: PropTypes.bool.def(false),
11590
11590
  disableTransform: PropTypes.bool.def(false),
11591
- reference: PropTypes.object.def(null)
11591
+ reference: PropTypes.any.def(null)
11592
11592
  }, EventProps$1);
11593
11593
  var Reference = defineComponent({
11594
11594
  name: "PopReference",
@@ -13391,9 +13391,9 @@ var Component$p = defineComponent({
13391
13391
  }
13392
13392
  watch(() => [props2.disabled], (val) => {
13393
13393
  if (val[0]) {
13394
- initPopInstance();
13395
- } else {
13396
13394
  beforeInstanceUnmount();
13395
+ } else {
13396
+ initPopInstance();
13397
13397
  }
13398
13398
  });
13399
13399
  updateBoundary();
@@ -15024,7 +15024,8 @@ var Component$i = defineComponent({
15024
15024
  withValidate: PropTypes.bool.def(true),
15025
15025
  showSelectedIcon: PropTypes.bool.def(true),
15026
15026
  inputSearch: PropTypes.bool.def(true),
15027
- enableVirtualRender: PropTypes.bool.def(false)
15027
+ enableVirtualRender: PropTypes.bool.def(false),
15028
+ allowEmptyValues: PropTypes.array.def([])
15028
15029
  },
15029
15030
  emits: ["update:modelValue", "change", "toggle", "clear", "scroll-end", "focus", "blur"],
15030
15031
  setup(props2, {
@@ -15054,7 +15055,8 @@ var Component$i = defineComponent({
15054
15055
  displayKey,
15055
15056
  collapseTags,
15056
15057
  autoHeight,
15057
- popoverOptions
15058
+ popoverOptions,
15059
+ allowEmptyValues
15058
15060
  } = toRefs(props2);
15059
15061
  const formItem = useFormItem();
15060
15062
  const inputRef = ref();
@@ -15342,11 +15344,15 @@ var Component$i = defineComponent({
15342
15344
  value,
15343
15345
  label: handleGetLabelByValue(value)
15344
15346
  }))];
15345
- } else if (modelValue.value !== void 0 && modelValue.value !== "") {
15346
- selected.value = [{
15347
- value: modelValue.value,
15348
- label: handleGetLabelByValue(modelValue.value)
15349
- }];
15347
+ } else {
15348
+ if (!!modelValue.value || allowEmptyValues.value.includes(modelValue.value)) {
15349
+ selected.value = [{
15350
+ value: modelValue.value,
15351
+ label: handleGetLabelByValue(modelValue.value)
15352
+ }];
15353
+ } else {
15354
+ selected.value = [];
15355
+ }
15350
15356
  }
15351
15357
  };
15352
15358
  const handleKeydown = (e) => {
@@ -15500,7 +15506,6 @@ var Component$i = defineComponent({
15500
15506
  }, null);
15501
15507
  };
15502
15508
  const renderTriggerInput = () => {
15503
- var _a, _b;
15504
15509
  if (this.multipleMode === "tag") {
15505
15510
  return createVNode(SelectTagInput, {
15506
15511
  "ref": "selectTagInputRef",
@@ -15516,12 +15521,12 @@ var Component$i = defineComponent({
15516
15521
  "onEnter": this.handleInputEnter
15517
15522
  }, {
15518
15523
  prefix: () => {
15519
- var _a2, _b2;
15520
- return (_b2 = (_a2 = this.$slots).prefix) == null ? void 0 : _b2.call(_a2);
15524
+ var _a, _b;
15525
+ return (_b = (_a = this.$slots).prefix) == null ? void 0 : _b.call(_a);
15521
15526
  },
15522
- default: (_b = (_a = this.$slots).tag) == null ? void 0 : _b.call(_a, {
15527
+ default: this.$slots.tag && (() => this.$slots.tag({
15523
15528
  selected: this.selected
15524
- }),
15529
+ })),
15525
15530
  suffix: () => suffixIcon()
15526
15531
  });
15527
15532
  }
@@ -15539,8 +15544,8 @@ var Component$i = defineComponent({
15539
15544
  "onEnter": this.handleInputEnter
15540
15545
  }, {
15541
15546
  prefix: () => {
15542
- var _a2, _b2;
15543
- return (_b2 = (_a2 = this.$slots).prefix) == null ? void 0 : _b2.call(_a2);
15547
+ var _a, _b;
15548
+ return (_b = (_a = this.$slots).prefix) == null ? void 0 : _b.call(_a);
15544
15549
  },
15545
15550
  suffix: () => suffixIcon()
15546
15551
  });
@@ -16018,6 +16023,7 @@ var EVENTS$1 = /* @__PURE__ */ ((EVENTS2) => {
16018
16023
  EVENTS2["ON_FILTER_CLICK"] = "onFilterClick";
16019
16024
  EVENTS2["ON_SETTING_CHANGE"] = "onSettingChange";
16020
16025
  EVENTS2["ON_ROW_EXPAND_CLICK"] = "onRowExpandClick";
16026
+ EVENTS2["ON_ROW_CHECK"] = "onRowCheck";
16021
16027
  return EVENTS2;
16022
16028
  })(EVENTS$1 || {});
16023
16029
  var EMITEVENTS = /* @__PURE__ */ ((EMITEVENTS2) => {
@@ -16032,6 +16038,9 @@ var EMITEVENTS = /* @__PURE__ */ ((EMITEVENTS2) => {
16032
16038
  EMITEVENTS2["PAGE_VALUE_CHANGE"] = "pageValueChange";
16033
16039
  EMITEVENTS2["SETTING_CHANGE"] = "settingChange";
16034
16040
  EMITEVENTS2["SCROLL_BOTTOM"] = "scrollBottom";
16041
+ EMITEVENTS2["ROW_SELECT"] = "select";
16042
+ EMITEVENTS2["ROW_SELECT_ALL"] = "selectAll";
16043
+ EMITEVENTS2["ROW_SELECT_CHANGE"] = "selectionChange";
16035
16044
  return EMITEVENTS2;
16036
16045
  })(EMITEVENTS || {});
16037
16046
  const EMPTY$1 = (..._args) => true;
@@ -16039,19 +16048,24 @@ const EMIT_EVENT_TYPES = {
16039
16048
  ["columnPick"]: EMPTY$1,
16040
16049
  ["columnFilter"]: EMPTY$1,
16041
16050
  ["columnSort"]: EMPTY$1,
16051
+ ["colFilterSave"]: EMPTY$1,
16042
16052
  ["rowClick"]: EMPTY$1,
16043
16053
  ["rowDblclick"]: EMPTY$1,
16044
16054
  ["rowExpand"]: EMPTY$1,
16055
+ ["select"]: EMPTY$1,
16056
+ ["selectAll"]: EMPTY$1,
16057
+ ["selectionChange"]: EMPTY$1,
16045
16058
  ["pageLimitChange"]: EMPTY$1,
16046
16059
  ["pageValueChange"]: EMPTY$1,
16047
16060
  ["settingChange"]: EMPTY$1,
16048
- ["scrollBottom"]: EMPTY$1,
16049
- ["colFilterSave"]: EMPTY$1
16061
+ ["scrollBottom"]: EMPTY$1
16050
16062
  };
16051
16063
  const TABLE_ROW_ATTRIBUTE = {
16052
16064
  ROW_INDEX: "__$table_row_index",
16053
16065
  ROW_UID: "__$uuid",
16054
- ROW_EXPAND: "__row_expand"
16066
+ ROW_EXPAND: "__row_expand",
16067
+ ROW_SELECTION: "__row_selection",
16068
+ ROW_SELECTION_ALL: "__row_selection_all"
16055
16069
  };
16056
16070
  const SCROLLY_WIDTH = 4;
16057
16071
  const LINE_HEIGHT = 42;
@@ -16082,7 +16096,7 @@ const IColumnType = {
16082
16096
  content: PropTypes.string.def(""),
16083
16097
  disabled: PropTypes.bool.def(false),
16084
16098
  watchCellResize: PropTypes.bool.def(true)
16085
- })]).def(false),
16099
+ })]).def(void 0),
16086
16100
  type: PropTypes.commonType(["selection", "index", "expand", "none"], "columnType").def("none"),
16087
16101
  resizable: PropTypes.bool.def(true),
16088
16102
  fixed: PropTypes.oneOfType([
@@ -16154,10 +16168,18 @@ const tableProps = {
16154
16168
  PropTypes.bool
16155
16169
  ]).def(void 0),
16156
16170
  reserveExpand: PropTypes.bool.def(false),
16171
+ selectionKey: PropTypes.string.def(""),
16172
+ isSelectedFn: PropTypes.func.def(void 0),
16157
16173
  rowKey: PropTypes.oneOfType([
16158
16174
  PropTypes.string,
16159
16175
  PropTypes.func
16160
- ]).def(TABLE_ROW_ATTRIBUTE.ROW_INDEX)
16176
+ ]).def(TABLE_ROW_ATTRIBUTE.ROW_INDEX),
16177
+ showOverflowTooltip: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
16178
+ content: PropTypes.string.def(""),
16179
+ disabled: PropTypes.bool.def(false),
16180
+ watchCellResize: PropTypes.bool.def(true)
16181
+ })]).def(false),
16182
+ asyncData: PropTypes.bool.def(false)
16161
16183
  };
16162
16184
  var Column = defineComponent({
16163
16185
  name: "TableColumn",
@@ -16202,7 +16224,7 @@ const resolvePaginationOption = (propPagination, defVal) => {
16202
16224
  }
16203
16225
  return {};
16204
16226
  };
16205
- var userPagination = (props2, indexData) => {
16227
+ var usePagination = (props2, indexData) => {
16206
16228
  const startIndex = ref(0);
16207
16229
  const endIndex = ref(0);
16208
16230
  let pagination2 = reactive({
@@ -16925,13 +16947,7 @@ const getRowKey = (item, props2, index) => {
16925
16947
  if (props2.rowKey === TABLE_ROW_ATTRIBUTE.ROW_INDEX) {
16926
16948
  return `__ROW_INDEX_${index}`;
16927
16949
  }
16928
- const keys = props2.rowKey.split(".");
16929
- return keys.reduce((pre, cur) => {
16930
- if (Object.prototype.hasOwnProperty.call(pre, cur)) {
16931
- return pre[cur];
16932
- }
16933
- return pre;
16934
- }, item);
16950
+ return lodash.exports.get(item, props2.rowKey);
16935
16951
  }
16936
16952
  if (typeof props2.rowKey === "function") {
16937
16953
  return Reflect.apply(props2.rowKey, globalThis, [item]);
@@ -16970,16 +16986,29 @@ var TableCell = defineComponent({
16970
16986
  name: "TableCell",
16971
16987
  props: {
16972
16988
  column: PropTypes.any.def({}),
16973
- row: PropTypes.any.def({})
16989
+ row: PropTypes.any.def({}),
16990
+ parentSetting: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
16991
+ content: PropTypes.string.def(""),
16992
+ disabled: PropTypes.bool.def(false),
16993
+ watchCellResize: PropTypes.bool.def(true)
16994
+ })]).def(void 0)
16974
16995
  },
16975
16996
  setup(props2, {
16976
16997
  slots
16977
16998
  }) {
16978
16999
  const refRoot = ref();
16979
17000
  const isTipsEnabled = ref(false);
17001
+ const resolveSetting = () => {
17002
+ if (/boolean|object/.test(props2.column.showOverflowTooltip) && props2.column.showOverflowTooltip !== null) {
17003
+ return props2.column;
17004
+ }
17005
+ return {
17006
+ showOverflowTooltip: props2.parentSetting
17007
+ };
17008
+ };
16980
17009
  const {
16981
17010
  showOverflowTooltip = false
16982
- } = props2.column || {};
17011
+ } = resolveSetting();
16983
17012
  let observerIns = null;
16984
17013
  let bkEllipsisIns = null;
16985
17014
  const resolveTooltipOption = () => {
@@ -17752,6 +17781,9 @@ class TableRender {
17752
17781
  "--row-height": `${resolvePropVal(config, "height", ["thead"])}px`
17753
17782
  };
17754
17783
  const renderHeadCell = (column, index) => {
17784
+ if (column.type === "selection") {
17785
+ return this.renderCheckboxColumn({}, 0, true);
17786
+ }
17755
17787
  const cells = [];
17756
17788
  if (column.sort) {
17757
17789
  cells.push(this.getSortCell(column, index));
@@ -17840,7 +17872,8 @@ class TableRender {
17840
17872
  }, [createVNode(TableCell, {
17841
17873
  "class": tdCtxClass,
17842
17874
  "column": column,
17843
- "row": row
17875
+ "row": row,
17876
+ "parentSetting": this.props.showOverflowTooltip
17844
17877
  }, _isSlot$1(_slot2 = this.renderCell(row, column, rowIndex, rows)) ? _slot2 : {
17845
17878
  default: () => [_slot2]
17846
17879
  })]);
@@ -17891,38 +17924,64 @@ class TableRender {
17891
17924
  e
17892
17925
  }]);
17893
17926
  }
17894
- renderCell(row, column, index, rows) {
17895
- if (column.type === "expand") {
17896
- const renderExpandSlot = () => {
17897
- var _a, _b, _c;
17898
- if (typeof column.render === "function") {
17899
- return column.render(null, row, index, rows);
17900
- }
17901
- return (_c = (_b = (_a = this.context.slots).expandCell) == null ? void 0 : _b.call(_a, {
17902
- row,
17903
- column,
17904
- index,
17905
- rows
17906
- })) != null ? _c : this.getExpandCell(row);
17907
- };
17908
- return createVNode("span", {
17909
- "class": "expand-btn-action",
17910
- "onClick": (e) => this.handleRowExpandClick(row, column, index, rows, e)
17911
- }, [renderExpandSlot()]);
17912
- }
17927
+ renderCellCallbackFn(row, column, index, rows) {
17913
17928
  const cell = getRowText(row, resolvePropVal(column, "field", [column, row]), column);
17914
- if (typeof column.render === "function") {
17915
- const data2 = this.props.data[row[TABLE_ROW_ATTRIBUTE.ROW_INDEX]];
17916
- return column.render({
17917
- cell,
17918
- data: data2,
17929
+ const data2 = this.props.data[row[TABLE_ROW_ATTRIBUTE.ROW_INDEX]];
17930
+ return column.render({
17931
+ cell,
17932
+ data: data2,
17933
+ row,
17934
+ column,
17935
+ index,
17936
+ rows
17937
+ });
17938
+ }
17939
+ renderCheckboxColumn(row, index, isAll = false) {
17940
+ const handleChecked = (value) => {
17941
+ this.emitEvent(EVENTS$1.ON_ROW_CHECK, [{
17942
+ row,
17943
+ index,
17944
+ isAll,
17945
+ value
17946
+ }]);
17947
+ };
17948
+ return createVNode(BkCheckbox, {
17949
+ "onChange": handleChecked,
17950
+ "modelValue": row[TABLE_ROW_ATTRIBUTE.ROW_SELECTION]
17951
+ }, null);
17952
+ }
17953
+ renderExpandColumn(row, column, index, rows) {
17954
+ const renderExpandSlot = () => {
17955
+ var _a, _b, _c;
17956
+ if (typeof column.render === "function") {
17957
+ return this.renderCellCallbackFn(row, column, index, rows);
17958
+ }
17959
+ return (_c = (_b = (_a = this.context.slots).expandCell) == null ? void 0 : _b.call(_a, {
17919
17960
  row,
17920
17961
  column,
17921
17962
  index,
17922
17963
  rows
17923
- });
17924
- }
17925
- return cell;
17964
+ })) != null ? _c : this.getExpandCell(row);
17965
+ };
17966
+ return createVNode("span", {
17967
+ "class": "expand-btn-action",
17968
+ "onClick": (e) => this.handleRowExpandClick(row, column, index, rows, e)
17969
+ }, [renderExpandSlot()]);
17970
+ }
17971
+ renderCell(row, column, index, rows) {
17972
+ var _a, _b;
17973
+ const defaultFn = () => {
17974
+ const cell = getRowText(row, resolvePropVal(column, "field", [column, row]), column);
17975
+ if (typeof column.render === "function") {
17976
+ return this.renderCellCallbackFn(row, column, index, rows);
17977
+ }
17978
+ return cell;
17979
+ };
17980
+ const renderFn = {
17981
+ expand: (row2, column2, index2, rows2) => this.renderExpandColumn(row2, column2, index2, rows2),
17982
+ selection: (row2, _column, index2, _rows) => this.renderCheckboxColumn(row2, index2)
17983
+ };
17984
+ return (_b = (_a = renderFn[column.type]) == null ? void 0 : _a.call(renderFn, row, column, index, rows)) != null ? _b : defaultFn();
17926
17985
  }
17927
17986
  isColActive(colIndex) {
17928
17987
  return this.props.columnPick !== "disabled" && this.propActiveCols.some((col) => col.index === colIndex && col.active);
@@ -18307,6 +18366,57 @@ const useInit = (props2, targetColumns) => {
18307
18366
  reactiveSchema.rowActions.set(rowId, Object.assign({}, (_a2 = reactiveSchema.rowActions.get(rowId)) != null ? _a2 : {}, { isExpand }));
18308
18367
  updateIndexData();
18309
18368
  };
18369
+ const isSelectionAll = () => {
18370
+ if (reactiveSchema.rowActions.has(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_ALL)) {
18371
+ return reactiveSchema.rowActions.get(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_ALL);
18372
+ }
18373
+ if (!!props2.selectionKey) {
18374
+ return indexData.every((row) => resolveSelectionRow(row));
18375
+ }
18376
+ return false;
18377
+ };
18378
+ const toggleAllSelection = (checked = void 0) => {
18379
+ const isChecked = typeof checked === "boolean" ? checked : !isSelectionAll();
18380
+ reactiveSchema.rowActions.set(TABLE_ROW_ATTRIBUTE.ROW_SELECTION_ALL, isChecked);
18381
+ updateIndexData();
18382
+ asyncSelection(null, checked, true);
18383
+ };
18384
+ const clearSelection = () => {
18385
+ toggleAllSelection(false);
18386
+ };
18387
+ const toggleRowSelection = (row, selected) => {
18388
+ var _a2;
18389
+ const rowId = row[TABLE_ROW_ATTRIBUTE.ROW_UID];
18390
+ if (rowId) {
18391
+ const isSelected = typeof selected === "boolean" ? selected : !resolveSelection(row, rowId);
18392
+ const target = Object.assign({}, (_a2 = reactiveSchema.rowActions.get(rowId)) != null ? _a2 : {}, { isSelected });
18393
+ reactiveSchema.rowActions.set(rowId, target);
18394
+ updateIndexData();
18395
+ asyncSelection(row, selected, false);
18396
+ }
18397
+ };
18398
+ const resolveSelectionRow = (row, thenFn = () => false) => {
18399
+ if (typeof props2.isSelectedFn === "function") {
18400
+ return Reflect.apply(props2.isSelectedFn, globalThis, [{ row, data: props2.data }]);
18401
+ }
18402
+ if (typeof props2.selectionKey === "string" && props2.selectionKey.length) {
18403
+ return lodash.exports.get(row, props2.selectionKey);
18404
+ }
18405
+ return thenFn();
18406
+ };
18407
+ const resolveSelection = (row, rowId) => resolveSelectionRow(row, () => {
18408
+ var _a2;
18409
+ if (isSelectionAll()) {
18410
+ return true;
18411
+ }
18412
+ if (reactiveSchema.rowActions.has(rowId)) {
18413
+ return (_a2 = reactiveSchema.rowActions.get(rowId)) == null ? void 0 : _a2.isSelected;
18414
+ }
18415
+ if (Object.prototype.hasOwnProperty.call(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION) && typeof row[TABLE_ROW_ATTRIBUTE.ROW_SELECTION] === "boolean") {
18416
+ return row[TABLE_ROW_ATTRIBUTE.ROW_SELECTION];
18417
+ }
18418
+ return false;
18419
+ });
18310
18420
  const indexData = reactive([]);
18311
18421
  const initIndexData = (keepLocalAction = false) => {
18312
18422
  indexData.splice(0, indexData.length, ...props2.data.map((item, index) => {
@@ -18314,17 +18424,35 @@ const useInit = (props2, targetColumns) => {
18314
18424
  return __spreadProps(__spreadValues({}, item), {
18315
18425
  [TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index,
18316
18426
  [TABLE_ROW_ATTRIBUTE.ROW_UID]: rowId,
18317
- [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: keepLocalAction ? isRowExpand(rowId) : false
18427
+ [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: keepLocalAction ? isRowExpand(rowId) : false,
18428
+ [TABLE_ROW_ATTRIBUTE.ROW_SELECTION]: resolveSelection(item, rowId)
18318
18429
  });
18319
18430
  }));
18320
18431
  };
18321
18432
  const updateIndexData = () => {
18322
18433
  indexData.forEach((item) => {
18323
18434
  Object.assign(item, {
18324
- [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: isRowExpand(item[TABLE_ROW_ATTRIBUTE.ROW_UID])
18435
+ [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: isRowExpand(item[TABLE_ROW_ATTRIBUTE.ROW_UID]),
18436
+ [TABLE_ROW_ATTRIBUTE.ROW_SELECTION]: resolveSelection(item, item[TABLE_ROW_ATTRIBUTE.ROW_UID])
18325
18437
  });
18326
18438
  });
18327
18439
  };
18440
+ const asyncSelection = (row, value, all = false) => {
18441
+ if (props2.asyncData && props2.rowKey) {
18442
+ if (all) {
18443
+ props2.data.forEach((item) => {
18444
+ if (lodash.exports.has(item, props2.selectionKey)) {
18445
+ lodash.exports.set(item, props2.selectionKey, !!value);
18446
+ }
18447
+ });
18448
+ } else {
18449
+ if (lodash.exports.has(row, props2.selectionKey)) {
18450
+ const target = props2.data.find((item) => lodash.exports.get(item, props2.rowKey) === lodash.exports.get(row, props2.rowKey));
18451
+ lodash.exports.set(target, props2.selectionKey, !!value);
18452
+ }
18453
+ }
18454
+ }
18455
+ };
18328
18456
  const { renderFixedColumns, fixedWrapperClass } = useFixedColumn(props2, colgroups, false);
18329
18457
  return {
18330
18458
  colgroups,
@@ -18337,7 +18465,10 @@ const useInit = (props2, targetColumns) => {
18337
18465
  updateIndexData,
18338
18466
  renderFixedColumns,
18339
18467
  setRowExpand,
18340
- updateColGroups
18468
+ updateColGroups,
18469
+ clearSelection,
18470
+ toggleAllSelection,
18471
+ toggleRowSelection
18341
18472
  };
18342
18473
  };
18343
18474
  var Component$d = defineComponent({
@@ -18366,14 +18497,17 @@ var Component$d = defineComponent({
18366
18497
  renderFixedColumns,
18367
18498
  setRowExpand,
18368
18499
  initIndexData,
18369
- fixedWrapperClass
18500
+ fixedWrapperClass,
18501
+ clearSelection,
18502
+ toggleAllSelection,
18503
+ toggleRowSelection
18370
18504
  } = useInit(props2, targetColumns);
18371
18505
  const {
18372
18506
  pageData,
18373
18507
  localPagination,
18374
18508
  resolvePageData,
18375
18509
  watchEffectFn
18376
- } = userPagination(props2, indexData);
18510
+ } = usePagination(props2, indexData);
18377
18511
  const {
18378
18512
  tableClass,
18379
18513
  headClass,
@@ -18486,6 +18620,34 @@ var Component$d = defineComponent({
18486
18620
  e
18487
18621
  });
18488
18622
  setRowExpand(row, !row[TABLE_ROW_ATTRIBUTE.ROW_EXPAND]);
18623
+ }).on(EVENTS$1.ON_ROW_CHECK, ({
18624
+ row,
18625
+ isAll,
18626
+ index,
18627
+ value
18628
+ }) => {
18629
+ if (isAll) {
18630
+ toggleAllSelection(value);
18631
+ ctx.emit(EMITEVENTS.ROW_SELECT_ALL, {
18632
+ checked: value,
18633
+ data: props2.data
18634
+ });
18635
+ } else {
18636
+ toggleRowSelection(row, value);
18637
+ ctx.emit(EMITEVENTS.ROW_SELECT, {
18638
+ row,
18639
+ index,
18640
+ checked: value,
18641
+ data: props2.data
18642
+ });
18643
+ }
18644
+ ctx.emit(EMITEVENTS.ROW_SELECT_CHANGE, {
18645
+ row,
18646
+ isAll,
18647
+ index,
18648
+ checked: value,
18649
+ data: props2.data
18650
+ });
18489
18651
  });
18490
18652
  const handleScrollChanged = (args) => {
18491
18653
  var _a;
@@ -18529,7 +18691,10 @@ var Component$d = defineComponent({
18529
18691
  tableRender.destroy();
18530
18692
  });
18531
18693
  ctx.expose({
18532
- setRowExpand
18694
+ setRowExpand,
18695
+ clearSelection,
18696
+ toggleAllSelection,
18697
+ toggleRowSelection
18533
18698
  });
18534
18699
  const tableBodyClass = computed(() => __spreadProps(__spreadValues({}, contentClass), {
18535
18700
  "__is-empty": !pageData.length
@@ -20262,28 +20427,38 @@ const InfoBox = (config) => {
20262
20427
  update
20263
20428
  });
20264
20429
  const getContent = () => {
20265
- if (!modalFuncProps.value.subTitle) {
20266
- return "";
20430
+ const children = [];
20431
+ const subTitleBox = [];
20432
+ if (modalFuncProps.value.subTitle) {
20433
+ switch (typeof modalFuncProps.value.subTitle) {
20434
+ case "string":
20435
+ children.push(modalFuncProps.value.subTitle);
20436
+ break;
20437
+ case "function":
20438
+ children.push(modalFuncProps.value.subTitle());
20439
+ break;
20440
+ default:
20441
+ children.push(modalFuncProps.value.subTitle);
20442
+ break;
20443
+ }
20267
20444
  }
20268
- switch (typeof modalFuncProps.value.subTitle) {
20269
- case "function":
20270
- return modalFuncProps.value.subTitle();
20271
- default:
20272
- case "string":
20273
- return modalFuncProps.value.subTitle;
20445
+ if (children.length) {
20446
+ subTitleBox.push(h$1("div", {
20447
+ class: "bk-info-sub-title",
20448
+ style: `text-Align:${modalFuncProps.value.contentAlign || "center"}`
20449
+ }, children));
20274
20450
  }
20451
+ return subTitleBox;
20275
20452
  };
20276
20453
  return () => createVNode(Dialog, __spreadProps(__spreadValues({
20454
+ class: "bk-info-wrapper",
20277
20455
  headerAlign: "center",
20278
20456
  footerAlign: "center"
20279
20457
  }, modalFuncProps.value), {
20280
20458
  isShow: isShow.value,
20281
20459
  onClosed,
20282
20460
  onConfirm
20283
- }), [h$1("div", {
20284
- class: "bk-info-sub-title",
20285
- style: `text-Align:${modalFuncProps.value.contentAlign || "center"}`
20286
- }, getContent())]);
20461
+ }), getContent());
20287
20462
  }
20288
20463
  });
20289
20464
  const app = createApp(dialog2).mount(container2);