bkui-vue 0.0.1-beta.69 → 0.0.1-beta.71

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
@@ -12468,10 +12468,11 @@ var useTagRender = (props, ctx) => {
12468
12468
  renderAs,
12469
12469
  contentAs
12470
12470
  } = props;
12471
- const handleScrollCallback = (event, _startIndex, _endIndex, _scrollTop, translateY, scrollLeft) => {
12471
+ const handleScrollCallback = (event, _startIndex, _endIndex, _scrollTop, translateY, scrollLeft, pos) => {
12472
12472
  ctx.emit("content-scroll", [event, {
12473
12473
  translateY,
12474
- translateX: scrollLeft
12474
+ translateX: scrollLeft,
12475
+ pos
12475
12476
  }]);
12476
12477
  };
12477
12478
  const vVirtualRender = resolveDirective("bkVirtualRender");
@@ -12535,7 +12536,8 @@ function computedVirtualIndex(lineHeight, callback, pagination2, el, event) {
12535
12536
  targetEndIndex = endValue.startIndex + targetStartIndex + 1;
12536
12537
  }
12537
12538
  if (elScrollTop !== scrollTop || targetStartIndex !== startIndex || targetEndIndex !== endIndex) {
12538
- typeof callback === "function" && callback(event, targetStartIndex, targetEndIndex, elScrollTop, translateY, elScrollLeft);
12539
+ const bottom2 = el.scrollHeight - el.offsetHeight - el.scrollTop;
12540
+ typeof callback === "function" && callback(event, targetStartIndex, targetEndIndex, elScrollTop, translateY, elScrollLeft, { bottom: bottom2 });
12539
12541
  }
12540
12542
  }
12541
12543
  function visibleRender(e, wrapper, binding) {
@@ -12543,21 +12545,16 @@ function visibleRender(e, wrapper, binding) {
12543
12545
  if (onlyScroll) {
12544
12546
  const elScrollTop = wrapper.scrollTop;
12545
12547
  const elScrollLeft = wrapper.scrollLeft;
12546
- handleScrollCallback(e, null, null, elScrollTop, elScrollTop, elScrollLeft);
12548
+ const bottom2 = wrapper.scrollHeight - wrapper.offsetHeight - wrapper.scrollTop;
12549
+ handleScrollCallback(e, null, null, elScrollTop, elScrollTop, elScrollLeft, { bottom: bottom2 });
12547
12550
  return;
12548
12551
  }
12549
12552
  const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination2;
12550
12553
  computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e);
12551
12554
  }
12552
12555
  const throttledRender = (delay = 60) => lodash.exports.throttle((e, wrapper, binding) => visibleRender(e, wrapper, binding), delay);
12553
- let cachedThrottle = null;
12554
12556
  const executeThrottledRender = (e, wrapper, binding, delay = 60) => {
12555
- if (!cachedThrottle) {
12556
- cachedThrottle = throttledRender(delay);
12557
- }
12558
- if (typeof cachedThrottle === "function") {
12559
- cachedThrottle.call(globalThis, e, wrapper, binding);
12560
- }
12557
+ Reflect.apply(throttledRender(delay), globalThis, [e, wrapper, binding]);
12561
12558
  };
12562
12559
  var virtualRender = {
12563
12560
  mounted(el, binding) {
@@ -12567,11 +12564,6 @@ var virtualRender = {
12567
12564
  executeThrottledRender(e, wrapper, binding, throttleDelay);
12568
12565
  });
12569
12566
  },
12570
- updated(el, binding) {
12571
- const wrapper = el.parentNode;
12572
- const { throttleDelay } = binding.value;
12573
- executeThrottledRender(null, wrapper, binding, throttleDelay);
12574
- },
12575
12567
  unbind(el) {
12576
12568
  if (el) {
12577
12569
  const wrapper = el.parentNode;
@@ -12617,14 +12609,16 @@ var Component$a = defineComponent({
12617
12609
  translateY: 0,
12618
12610
  translateX: 0,
12619
12611
  count: 0,
12612
+ pos: {},
12620
12613
  groupItemCount: props.groupItemCount
12621
12614
  });
12622
- const handleScrollCallback = (event, startIndex, endIndex, scrollTop, translateY, scrollLeft) => {
12615
+ const handleScrollCallback = (event, startIndex, endIndex, scrollTop, translateY, scrollLeft, pos) => {
12623
12616
  pagination2.startIndex = startIndex;
12624
12617
  pagination2.endIndex = endIndex;
12625
12618
  pagination2.scrollTop = scrollTop;
12626
12619
  pagination2.translateY = translateY;
12627
12620
  pagination2.translateX = scrollLeft;
12621
+ pagination2.pos = pos;
12628
12622
  ctx.emit("content-scroll", [event, pagination2]);
12629
12623
  };
12630
12624
  onMounted(() => {
@@ -14299,8 +14293,13 @@ class TableRender {
14299
14293
  }
14300
14294
  const useClass = (props, root, reactiveProp) => {
14301
14295
  const autoHeight = ref(200);
14296
+ const hasScrollY = ref(false);
14297
+ const hasFooter = computed(() => props.pagination && props.data.length);
14302
14298
  const tableClass = computed(() => classes({
14303
- [resolveClassName("table")]: true
14299
+ [resolveClassName("table")]: true,
14300
+ "has-footer": hasFooter.value,
14301
+ "has-scroll-y": hasScrollY.value || props.virtualEnabled,
14302
+ "is-scroll-bottom": reactiveProp.pos.bottom < 2
14304
14303
  }, resolvePropBorderToClassStr(props.border)));
14305
14304
  const headClass = classes({
14306
14305
  [resolveClassName("table-head")]: true
@@ -14335,23 +14334,24 @@ const useClass = (props, root, reactiveProp) => {
14335
14334
  }
14336
14335
  return defaultValue;
14337
14336
  };
14338
- const contentStyle = computed(() => {
14337
+ const contentStyle = reactive({});
14338
+ const resolveContentStyle = () => {
14339
14339
  const resolveHeight = resolvePropHeight(props.height, autoHeight.value);
14340
14340
  const resolveHeadHeight = props.showHead ? resolvePropHeight(props.headHeight, 40) + 2 : 0;
14341
14341
  const resolveMaxHeight = resolvePropHeight(props.maxHeight, autoHeight.value);
14342
14342
  const resolveMinHeight = resolvePropHeight(props.minHeight, autoHeight.value);
14343
14343
  const resolveFooterHeight = props.pagination && props.data.length ? 40 : 0;
14344
14344
  const contentHeight = resolveHeight - resolveHeadHeight - resolveFooterHeight;
14345
+ const height = props.height !== "auto" ? `${contentHeight}px` : false;
14345
14346
  const maxHeight = resolveMaxHeight - resolveHeadHeight - resolveFooterHeight;
14346
14347
  const minHeight = resolveMinHeight - resolveHeadHeight - resolveFooterHeight;
14347
- const height = props.height !== "auto" ? `${contentHeight}px` : "auto";
14348
- return {
14348
+ Object.assign(contentStyle, {
14349
14349
  display: "block",
14350
14350
  "max-height": `${maxHeight}px`,
14351
14351
  "min-height": `${minHeight}px`,
14352
14352
  height
14353
- };
14354
- });
14353
+ });
14354
+ };
14355
14355
  onMounted(() => {
14356
14356
  resetTableHeight(root == null ? void 0 : root.value);
14357
14357
  });
@@ -14359,9 +14359,27 @@ const useClass = (props, root, reactiveProp) => {
14359
14359
  if (rootEl) {
14360
14360
  const { height } = rootEl.parentElement.getBoundingClientRect();
14361
14361
  autoHeight.value = height;
14362
+ resolveContentStyle();
14362
14363
  }
14363
14364
  };
14364
- return { tableClass, headClass, contentClass, footerClass, wrapperStyle, contentStyle, headStyle, resetTableHeight };
14365
+ const updateBorderClass = (root2) => {
14366
+ if (root2) {
14367
+ const tableBody = root2.querySelector(".bk-table-body table");
14368
+ hasScrollY.value = tableBody.offsetHeight > root2.offsetHeight;
14369
+ }
14370
+ };
14371
+ return {
14372
+ tableClass,
14373
+ headClass,
14374
+ contentClass,
14375
+ footerClass,
14376
+ wrapperStyle,
14377
+ contentStyle,
14378
+ headStyle,
14379
+ resetTableHeight,
14380
+ updateBorderClass,
14381
+ hasFooter
14382
+ };
14365
14383
  };
14366
14384
  var Component$8 = defineComponent({
14367
14385
  name: "Table",
@@ -14387,6 +14405,9 @@ var Component$8 = defineComponent({
14387
14405
  const reactiveProp = reactive({
14388
14406
  scrollTranslateY: 0,
14389
14407
  scrollTranslateX: 0,
14408
+ pos: {
14409
+ bottom: 1
14410
+ },
14390
14411
  activeColumns,
14391
14412
  setting: {
14392
14413
  size: null,
@@ -14407,15 +14428,20 @@ var Component$8 = defineComponent({
14407
14428
  wrapperStyle,
14408
14429
  contentStyle,
14409
14430
  headStyle,
14410
- resetTableHeight
14431
+ updateBorderClass,
14432
+ hasFooter
14411
14433
  } = useClass(props, root, reactiveProp);
14412
14434
  const {
14413
14435
  renderFixedColumns,
14414
14436
  fixedWrapperClass
14415
14437
  } = useFixedColumn(props, colgroups);
14416
14438
  const tableRender = new TableRender(props, ctx, reactiveProp, colgroups);
14417
- watchEffect(() => {
14439
+ watch(() => [props.data], () => {
14418
14440
  watchEffectFn(columnFilterFn, columnSortFn);
14441
+ nextTick(() => updateBorderClass(root.value));
14442
+ }, {
14443
+ immediate: true,
14444
+ deep: true
14419
14445
  });
14420
14446
  tableRender.on(EVENTS$1.ON_SORT_BY_CLICK, (args) => {
14421
14447
  const {
@@ -14441,15 +14467,16 @@ var Component$8 = defineComponent({
14441
14467
  const pagination2 = args[1];
14442
14468
  const {
14443
14469
  translateX,
14444
- translateY
14470
+ translateY,
14471
+ pos = {}
14445
14472
  } = pagination2;
14446
14473
  reactiveProp.scrollTranslateY = translateY;
14447
14474
  reactiveProp.scrollTranslateX = translateX;
14475
+ reactiveProp.pos = pos;
14448
14476
  };
14449
14477
  onMounted(() => {
14450
14478
  observerIns = observerResize(root.value, () => {
14451
14479
  resolveColumnWidth(root.value, colgroups, 20);
14452
- resetTableHeight(root.value);
14453
14480
  }, 60, true);
14454
14481
  observerIns.start();
14455
14482
  });
@@ -14474,7 +14501,7 @@ var Component$8 = defineComponent({
14474
14501
  "ref": refVirtualRender,
14475
14502
  "lineHeight": tableRender.getRowHeight,
14476
14503
  "class": contentClass,
14477
- "style": contentStyle.value,
14504
+ "style": contentStyle,
14478
14505
  "list": pageData,
14479
14506
  "onContentScroll": handleScrollChanged,
14480
14507
  "throttleDelay": 0,
@@ -14491,7 +14518,7 @@ var Component$8 = defineComponent({
14491
14518
  }, null)]),
14492
14519
  createVNode("div", {
14493
14520
  "class": footerClass.value
14494
- }, [props.pagination && props.data.length && tableRender.renderTableFooter(localPagination.value)])
14521
+ }, [hasFooter.value && tableRender.renderTableFooter(localPagination.value)])
14495
14522
  ]);
14496
14523
  }
14497
14524
  });
@@ -21046,6 +21073,8 @@ var NODE_ATTRIBUTES = /* @__PURE__ */ ((NODE_ATTRIBUTES2) => {
21046
21073
  NODE_ATTRIBUTES2["IS_ASYNC_INIT"] = "__is_async_init";
21047
21074
  NODE_ATTRIBUTES2["IS_MATCH"] = "__is_match";
21048
21075
  NODE_ATTRIBUTES2["IS_NULL"] = "__IS_NULL";
21076
+ NODE_ATTRIBUTES2["IS_CACHED"] = "__is_cached";
21077
+ NODE_ATTRIBUTES2["IS_ASYNC"] = "__is_async";
21049
21078
  return NODE_ATTRIBUTES2;
21050
21079
  })(NODE_ATTRIBUTES || {});
21051
21080
  const treeProps = {
@@ -21094,7 +21123,7 @@ const treeProps = {
21094
21123
  draggable: PropTypes.bool.def(false),
21095
21124
  dragSort: PropTypes.bool.def(false),
21096
21125
  selectable: PropTypes.bool.def(true),
21097
- selected: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.any]).def(null)
21126
+ selected: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).def(null)
21098
21127
  };
21099
21128
  var useEmpty = (props, {
21100
21129
  slots
@@ -21270,7 +21299,7 @@ const resolveNodeItem = (node) => {
21270
21299
  if (node === void 0 || node === null) {
21271
21300
  return { __IS_NULL: true };
21272
21301
  }
21273
- if (typeof node === "string") {
21302
+ if (typeof node === "string" || typeof node === "number" || typeof node === "symbol") {
21274
21303
  return { [NODE_ATTRIBUTES.UUID]: node };
21275
21304
  }
21276
21305
  if (Object.prototype.hasOwnProperty.call(node, NODE_ATTRIBUTES.UUID)) {
@@ -21290,17 +21319,20 @@ var useNodeAsync = (props, flatData) => {
21290
21319
  setNodeAttr(item, NODE_ATTRIBUTES.IS_OPENED, true);
21291
21320
  const nodeValue = Array.isArray(resp) ? resp : [resp];
21292
21321
  updateTreeNode(getNodePath(item), props.data, props.children, props.children, nodeValue);
21322
+ return Promise.resolve(resp);
21293
21323
  }
21324
+ return Promise.reject(resp);
21294
21325
  };
21295
21326
  const asyncNodeClick = (item) => {
21296
- if (item.async) {
21327
+ if (getNodeAttr2(item, NODE_ATTRIBUTES.IS_ASYNC)) {
21297
21328
  const {
21298
21329
  callback = null,
21299
21330
  cache = true
21300
21331
  } = props.async || {};
21301
21332
  setNodeAttr(item, NODE_ATTRIBUTES.IS_ASYNC_INIT, true);
21302
21333
  if (typeof callback === "function") {
21303
- if (!item.cached) {
21334
+ if (!getNodeAttr2(item, NODE_ATTRIBUTES.IS_CACHED)) {
21335
+ setNodeAttr(item, NODE_ATTRIBUTES.IS_CACHED, cache);
21304
21336
  Object.assign(item, {
21305
21337
  loading: true
21306
21338
  });
@@ -21316,6 +21348,7 @@ var useNodeAsync = (props, flatData) => {
21316
21348
  }
21317
21349
  return Promise.reject("async need to set prop: asyncLoad with function wich will return promise object");
21318
21350
  }
21351
+ return Promise.resolve(true);
21319
21352
  };
21320
21353
  const deepAutoOpen = () => {
21321
21354
  const autoOpenNodes = flatData.data.filter((item) => item.async && item.isOpen && !getNodeAttr2(item, NODE_ATTRIBUTES.IS_ASYNC_INIT));
@@ -21466,25 +21499,39 @@ var useNodeAction = (props, ctx, flatData, renderData, schemaValues) => {
21466
21499
  hanldeTreeNodeClick(node, e);
21467
21500
  };
21468
21501
  const setSelect = (uuid2, selected = true, autoOpen = true) => {
21469
- const resolvedItem = resolveNodeItem(uuid2);
21502
+ const nodeList2 = Array.isArray(uuid2) ? uuid2 : [uuid2];
21503
+ if (!nodeList2.length) {
21504
+ return;
21505
+ }
21506
+ const resolvedItem = resolveNodeItem(nodeList2[0]);
21470
21507
  if (resolvedItem[NODE_ATTRIBUTES.IS_NULL]) {
21471
21508
  return;
21472
21509
  }
21473
21510
  if (props.selectable) {
21474
- if (selectedNodeId !== null) {
21511
+ if (selectedNodeId !== null && selectedNodeId !== void 0) {
21475
21512
  setNodeAttr({
21476
21513
  [NODE_ATTRIBUTES.UUID]: selectedNodeId
21477
21514
  }, NODE_ATTRIBUTES.IS_SELECTED, !selected);
21478
21515
  }
21479
21516
  setNodeAttr(resolvedItem, NODE_ATTRIBUTES.IS_SELECTED, selected);
21480
21517
  selectedNodeId = getNodeId(resolvedItem);
21481
- }
21482
- if (autoOpen) {
21483
- setOpen(uuid2, true, true);
21518
+ if (autoOpen && nodeList2.length === 1) {
21519
+ setOpen(resolvedItem, true, true);
21520
+ }
21521
+ if (getNodeAttr2(resolvedItem, NODE_ATTRIBUTES.IS_ASYNC)) {
21522
+ asyncNodeClick(resolvedItem).then(() => {
21523
+ nextTick(() => {
21524
+ nodeList2.shift();
21525
+ setSelect(nodeList2, selected, autoOpen);
21526
+ });
21527
+ });
21528
+ }
21529
+ } else {
21530
+ console.warn("props.selectable is false or undefined, please set selectable with true");
21484
21531
  }
21485
21532
  };
21486
21533
  const handleNodeContentClick = (item, e) => {
21487
- setSelect(item);
21534
+ setSelect(item, true, false);
21488
21535
  if (!isNodeOpened(item)) {
21489
21536
  hanldeTreeNodeClick(item, e);
21490
21537
  }
@@ -21863,10 +21910,26 @@ var useTreeInit = (props) => {
21863
21910
  const outputData = [];
21864
21911
  let order2 = 0;
21865
21912
  const schema = /* @__PURE__ */ new Map();
21913
+ function loopUpdateNodeAttr(uuid2, attrName, attrValue, callFn) {
21914
+ if (uuid2 === void 0 || uuid2 === null) {
21915
+ return;
21916
+ }
21917
+ if (schema.has(uuid2) && ![NODE_ATTRIBUTES.UUID, NODE_ATTRIBUTES.PARENT_ID].includes(attrName)) {
21918
+ const target = schema.get(uuid2);
21919
+ if (Object.prototype.hasOwnProperty.call(target, attrName)) {
21920
+ if (typeof callFn === "function" && Reflect.apply(callFn, self, [target, attrName, attrValue])) {
21921
+ Object.assign(target, {
21922
+ [attrName]: attrValue
21923
+ });
21924
+ loopUpdateNodeAttr(target[NODE_ATTRIBUTES.PARENT_ID], attrName, attrValue, callFn);
21925
+ }
21926
+ }
21927
+ }
21928
+ }
21866
21929
  function getUid(item) {
21867
21930
  let uid = null;
21868
21931
  if (typeof props2.nodeKey === "string") {
21869
- uid = item[props2.nodeKey];
21932
+ uid = item[props2.nodeKey] || uuid_1.v4();
21870
21933
  }
21871
21934
  return uid || item[NODE_ATTRIBUTES.UUID] || uuid_1.v4();
21872
21935
  }
@@ -21876,7 +21939,7 @@ var useTreeInit = (props) => {
21876
21939
  if (cached) {
21877
21940
  result = cached[cachedAttr];
21878
21941
  } else {
21879
- result = node[attr];
21942
+ result = attr === null ? void 0 : node[attr];
21880
21943
  }
21881
21944
  if (result === void 0) {
21882
21945
  result = defVal;
@@ -21893,7 +21956,16 @@ var useTreeInit = (props) => {
21893
21956
  return getCachedTreeNodeAttr(uuid2, node, "isMatch", NODE_ATTRIBUTES.IS_MATCH, true);
21894
21957
  }
21895
21958
  function isCachedTreeNodeSelected(uuid2, node) {
21896
- return getCachedTreeNodeAttr(uuid2, node, "isSelected", NODE_ATTRIBUTES.IS_SELECTED, false);
21959
+ return getCachedTreeNodeAttr(uuid2, node, null, NODE_ATTRIBUTES.IS_SELECTED, false);
21960
+ }
21961
+ function isCachedTreeNodeHasCached(uuid2, node) {
21962
+ return getCachedTreeNodeAttr(uuid2, node, "cached", NODE_ATTRIBUTES.IS_CACHED, false);
21963
+ }
21964
+ function isCachedTreeNodeAsync(uuid2, node) {
21965
+ return getCachedTreeNodeAttr(uuid2, node, "async", NODE_ATTRIBUTES.IS_ASYNC, false);
21966
+ }
21967
+ function validateIsOpenLoopFn(target) {
21968
+ return !target[NODE_ATTRIBUTES.IS_OPENED];
21897
21969
  }
21898
21970
  function flatten(array, depth = 0, parent = null, path = null) {
21899
21971
  const arrLength = array.length;
@@ -21919,6 +21991,8 @@ var useTreeInit = (props) => {
21919
21991
  [NODE_ATTRIBUTES.IS_MATCH]: isCachedTreeNodeMatch(uuid2, item),
21920
21992
  [NODE_ATTRIBUTES.IS_OPENED]: isCachedTreeNodeOpened(uuid2, item),
21921
21993
  [NODE_ATTRIBUTES.IS_CHECKED]: isCachedTreeNodeChecked(uuid2, item),
21994
+ [NODE_ATTRIBUTES.IS_CACHED]: isCachedTreeNodeHasCached(uuid2, item),
21995
+ [NODE_ATTRIBUTES.IS_ASYNC]: isCachedTreeNodeAsync(uuid2, item),
21922
21996
  [children]: null
21923
21997
  };
21924
21998
  Object.assign(item, {
@@ -21929,6 +22003,9 @@ var useTreeInit = (props) => {
21929
22003
  outputData.push(__spreadProps(__spreadValues({}, item), {
21930
22004
  [children]: null
21931
22005
  }));
22006
+ if (attrs[NODE_ATTRIBUTES.IS_OPENED] || attrs[NODE_ATTRIBUTES.IS_SELECTED]) {
22007
+ loopUpdateNodeAttr(parent, NODE_ATTRIBUTES.IS_OPENED, true, validateIsOpenLoopFn);
22008
+ }
21932
22009
  if (Object.prototype.hasOwnProperty.call(item, children)) {
21933
22010
  flatten(item[children] || [], depth + 1, uuid2, currentPath);
21934
22011
  }
@@ -21940,6 +22017,7 @@ var useTreeInit = (props) => {
21940
22017
  return [outputData, schema];
21941
22018
  };
21942
22019
  const formatData = getFlatdata(props);
22020
+ const loopEvents = [];
21943
22021
  const flatData = reactive({
21944
22022
  data: formatData[0],
21945
22023
  schema: formatData[1],
@@ -21958,9 +22036,17 @@ var useTreeInit = (props) => {
21958
22036
  if (((_a2 = props.async) == null ? void 0 : _a2.callback) && ((_b = props.async) == null ? void 0 : _b.deepAutoOpen) === "every") {
21959
22037
  deepAutoOpen();
21960
22038
  }
22039
+ nextTick(() => {
22040
+ loopEvents.forEach((event) => {
22041
+ Reflect.apply(event, globalThis, []);
22042
+ });
22043
+ });
21961
22044
  }, {
21962
22045
  deep: true
21963
22046
  });
22047
+ const afterDataUpdate = (callFn) => {
22048
+ loopEvents.push(callFn);
22049
+ };
21964
22050
  if ((_a = props.async) == null ? void 0 : _a.callback) {
21965
22051
  deepAutoOpen();
21966
22052
  }
@@ -21968,7 +22054,8 @@ var useTreeInit = (props) => {
21968
22054
  flatData,
21969
22055
  schemaValues,
21970
22056
  asyncNodeClick,
21971
- deepAutoOpen
22057
+ deepAutoOpen,
22058
+ afterDataUpdate
21972
22059
  };
21973
22060
  };
21974
22061
  var Component$2 = defineComponent({
@@ -21978,7 +22065,8 @@ var Component$2 = defineComponent({
21978
22065
  setup(props, ctx) {
21979
22066
  const {
21980
22067
  flatData,
21981
- schemaValues
22068
+ schemaValues,
22069
+ afterDataUpdate
21982
22070
  } = useTreeInit(props);
21983
22071
  const {
21984
22072
  setNodeAttr,
@@ -22031,7 +22119,7 @@ var Component$2 = defineComponent({
22031
22119
  };
22032
22120
  if (props.selectable) {
22033
22121
  watch(() => props.selected, (newData) => {
22034
- setSelect(newData, true, true);
22122
+ afterDataUpdate(() => setSelect(newData, true, true));
22035
22123
  }, {
22036
22124
  immediate: true
22037
22125
  });