3h1-ui 3.0.0-next.50 → 3.0.0-next.51

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/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { h, nextTick, createVNode, defineComponent, ref, computed, unref, watchEffect, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createSlots, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, onMounted, normalizeClass, createCommentVNode, normalizeStyle as normalizeStyle$1, Transition, toHandlers, useSlots, withDirectives, vShow, getCurrentInstance, inject, onUnmounted, provide, onBeforeUnmount, resolveDynamicComponent, reactive, toRef, toRefs, TransitionGroup, getCurrentScope, onScopeDispose, defineAsyncComponent, isRef, toRaw, shallowRef, isVNode, readonly, useAttrs as useAttrs$2, shallowReactive, withKeys, withModifiers, render as render$1, resolveDirective, pushScopeId, popScopeId, useCssVars, triggerRef, Comment, Text } from "vue";
2
- import { Radio, Select, Tree, TreeSelect, Cascader, Transfer, Input, Tooltip, Skeleton, Popover, Pagination as Pagination$1, Empty as Empty$3, Button as Button$1, Table as Table$2, FormItem, DatePicker as DatePicker$1, InputNumber, Modal as Modal$3, ConfigProvider, Popconfirm, Menu, Dropdown, Divider as Divider$2, Image, Progress, Tag, Alert, Upload, Space, AutoComplete, Switch, Checkbox, Slider, Rate, TimePicker as TimePicker$1, Col, Form, Row, MenuItem, MenuDivider, Spin, PageHeader, CheckboxGroup, TableSummaryRow, TableSummaryCell, TableSummary, Badge, FormItemRest, Drawer, Avatar, Descriptions, DescriptionsItem, theme, Breadcrumb, Timeline, TimelineItem } from "ant-design-vue";
1
+ import { h, nextTick, createVNode, defineComponent, ref, computed, unref, watchEffect, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createSlots, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, onMounted, normalizeClass, createCommentVNode, normalizeStyle as normalizeStyle$1, Transition, toHandlers, useSlots, withDirectives, vShow, getCurrentInstance, inject, onUnmounted, provide, onBeforeUnmount, resolveDynamicComponent, reactive, toRef, toRefs, TransitionGroup, getCurrentScope, onScopeDispose, defineAsyncComponent, isRef, toRaw, shallowRef, isVNode, readonly, useAttrs as useAttrs$2, shallowReactive, withKeys, render as render$1, resolveDirective, pushScopeId, popScopeId, useCssVars, triggerRef, Comment, Text, withModifiers } from "vue";
2
+ import { Radio, Select, Tree, TreeSelect, Cascader, Transfer, Input, Tooltip, Skeleton, Popover, Pagination as Pagination$1, Empty as Empty$3, Button as Button$1, Table as Table$2, FormItem, DatePicker as DatePicker$1, InputNumber, Modal as Modal$3, ConfigProvider, Popconfirm, Menu, Dropdown, Divider as Divider$2, Image, Progress, Tag, Alert, Upload, Space, AutoComplete, Switch, Checkbox, Slider, Rate, TimePicker as TimePicker$1, Col, Form, Row, Spin, PageHeader, CheckboxGroup, TableSummaryRow, TableSummaryCell, TableSummary, Badge, FormItemRest, Drawer, Avatar, Descriptions, DescriptionsItem, theme, Breadcrumb, Timeline, TimelineItem } from "ant-design-vue";
3
3
  import { isFunction as isFunction$4, isString as isString$4, isArray as isArray$4, getSlot as getSlot$1, addClass as addClass$1, removeClass as removeClass$1, getPopupContainer as getPopupContainer$1, triggerWindowResize, off, on, addResizeListener, removeResizeListener, buildUUID, extendSlots as extendSlots$1, withInstall as withInstall$8, isBoolean as isBoolean$1, isNumber as isNumber$2, isDef as isDef$1, warn as warn$1, downloadByUrl, isObject as isObject$4, isNull, dateUtil, isNullOrUnDef, error as error$1, deepMerge as deepMerge$1, getDynamicProps, buildProps, createBEM, forEach as forEach$1, isClient as isClient$1, filter, treeToList, eachTree, isEmpty, isServer, formatToDate, isMap as isMap$2, findNodeAll, getViewportOffset, isNullAndUnDef, dataURLtoBlob, deepMergeObjects } from "@shy-plugins/utils";
4
4
  import { useAttrs as useAttrs$1, useRuleFormItem, useDesign as useDesign$1, useTimeoutFn as useTimeoutFn$2, useScrollTo as useScrollTo$1, useIntersectionObserver, useCopyToClipboard, useMessage, usePagination as usePagination$3, useI18n as useI18n$1, useSortable, createContext as createContext$1, useContext as useContext$2, useBreakpoint, useContentHeight, useWindowSizeFn as useWindowSizeFn$1, onMountedOrActivated, useEventListener as useEventListener$1 } from "@shy-plugins/use";
5
5
  import { zxcvbn } from "@zxcvbn-ts/core";
@@ -9806,7 +9806,7 @@ function extendSlots(slots, excludeKeys = []) {
9806
9806
  });
9807
9807
  return ret;
9808
9808
  }
9809
- function _isSlot$8(s) {
9809
+ function _isSlot$7(s) {
9810
9810
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
9811
9811
  }
9812
9812
  const Modal$2 = /* @__PURE__ */ defineComponent({
@@ -9839,7 +9839,7 @@ const Modal$2 = /* @__PURE__ */ defineComponent({
9839
9839
  ...props2,
9840
9840
  onCancel
9841
9841
  };
9842
- return createVNode(Modal$3, propsData, _isSlot$8(_slot = extendSlots(slots)) ? _slot : {
9842
+ return createVNode(Modal$3, propsData, _isSlot$7(_slot = extendSlots(slots)) ? _slot : {
9843
9843
  default: () => [_slot]
9844
9844
  });
9845
9845
  };
@@ -10335,7 +10335,7 @@ const BasicButton = /* @__PURE__ */ defineComponent({
10335
10335
  };
10336
10336
  }
10337
10337
  });
10338
- function _isSlot$7(s) {
10338
+ function _isSlot$6(s) {
10339
10339
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
10340
10340
  }
10341
10341
  const props$6 = {
@@ -10367,7 +10367,7 @@ const PopConfirmButton = /* @__PURE__ */ defineComponent({
10367
10367
  btnBind.color = "";
10368
10368
  const Button2 = () => {
10369
10369
  let _slot;
10370
- return createVNode(BasicButton, btnBind, _isSlot$7(_slot = extendSlots$1(slots)) ? _slot : {
10370
+ return createVNode(BasicButton, btnBind, _isSlot$6(_slot = extendSlots$1(slots)) ? _slot : {
10371
10371
  default: () => [_slot]
10372
10372
  });
10373
10373
  };
@@ -12603,7 +12603,7 @@ const useGlobalConfig = (key2) => {
12603
12603
  };
12604
12604
  return { config, setConfig };
12605
12605
  };
12606
- function _isSlot$6(s) {
12606
+ function _isSlot$5(s) {
12607
12607
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
12608
12608
  }
12609
12609
  const _sfc_main$18 = /* @__PURE__ */ defineComponent({
@@ -12921,7 +12921,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
12921
12921
  } : {
12922
12922
  default: () => renderComponentContent
12923
12923
  };
12924
- return createVNode(Comp, compAttr, _isSlot$6(compSlot) ? compSlot : {
12924
+ return createVNode(Comp, compAttr, _isSlot$5(compSlot) ? compSlot : {
12925
12925
  default: () => [compSlot]
12926
12926
  });
12927
12927
  }
@@ -12966,7 +12966,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
12966
12966
  return createVNode(Col, {
12967
12967
  "span": 24
12968
12968
  }, {
12969
- default: () => [createVNode(Divider$1, unref(getComponentsProps), _isSlot$6(_slot = renderLabelHelpMessage()) ? _slot : {
12969
+ default: () => [createVNode(Divider$1, unref(getComponentsProps), _isSlot$5(_slot = renderLabelHelpMessage()) ? _slot : {
12970
12970
  default: () => [_slot]
12971
12971
  })]
12972
12972
  });
@@ -13027,7 +13027,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
13027
13027
  const getContent = () => {
13028
13028
  return colSlot ? getSlot$1(slots, colSlot, values) : renderColContent ? renderColContent(values) : renderItem();
13029
13029
  };
13030
- return isIfShow && withDirectives(createVNode(Col, realColProps, _isSlot$6(_slot2 = getContent()) ? _slot2 : {
13030
+ return isIfShow && withDirectives(createVNode(Col, realColProps, _isSlot$5(_slot2 = getContent()) ? _slot2 : {
13031
13031
  default: () => [_slot2]
13032
13032
  }), [[vShow, isShow]]);
13033
13033
  };
@@ -14359,7 +14359,8 @@ const treeEmits = [
14359
14359
  "update:value",
14360
14360
  "change",
14361
14361
  "check",
14362
- "update:searchValue"
14362
+ "update:searchValue",
14363
+ "plus-click"
14363
14364
  ];
14364
14365
  const treeProps = buildProps({
14365
14366
  value: {
@@ -14491,7 +14492,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
14491
14492
  default: void 0
14492
14493
  }
14493
14494
  },
14494
- emits: ["strictly-change", "search"],
14495
+ emits: ["strictly-change", "search", "plus-click"],
14495
14496
  setup(__props, { emit: __emit }) {
14496
14497
  const searchValue = ref("");
14497
14498
  const [bem] = createBEM("tree-header");
@@ -14502,7 +14503,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
14502
14503
  const getInputSearchCls = computed(() => {
14503
14504
  return ["mr-1", "w-full"];
14504
14505
  });
14505
- const toolbarList = computed(() => {
14506
+ computed(() => {
14506
14507
  const { checkable } = props2;
14507
14508
  const defaultToolbarList = [
14508
14509
  { label: t2("component.tree.expandAll"), value: ToolbarEnum.EXPAND_ALL },
@@ -14515,28 +14516,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
14515
14516
  return defaultToolbarList;
14516
14517
  });
14517
14518
  function handleMenuClick(e) {
14518
- var _a2, _b, _c, _d;
14519
- const { key: key2 } = e;
14520
- switch (key2) {
14521
- case ToolbarEnum.SELECT_ALL:
14522
- (_a2 = props2.checkAll) == null ? void 0 : _a2.call(props2, true);
14523
- break;
14524
- case ToolbarEnum.UN_SELECT_ALL:
14525
- (_b = props2.checkAll) == null ? void 0 : _b.call(props2, false);
14526
- break;
14527
- case ToolbarEnum.EXPAND_ALL:
14528
- (_c = props2.expandAll) == null ? void 0 : _c.call(props2, true);
14529
- break;
14530
- case ToolbarEnum.UN_EXPAND_ALL:
14531
- (_d = props2.expandAll) == null ? void 0 : _d.call(props2, false);
14532
- break;
14533
- case ToolbarEnum.CHECK_STRICTLY:
14534
- emit("strictly-change", false);
14535
- break;
14536
- case ToolbarEnum.CHECK_UN_STRICTLY:
14537
- emit("strictly-change", true);
14538
- break;
14539
- }
14519
+ emit("plus-click");
14540
14520
  }
14541
14521
  function emitChange(value) {
14542
14522
  emit("search", value);
@@ -14571,41 +14551,13 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
14571
14551
  ]),
14572
14552
  _: 1
14573
14553
  }, 8, ["helpMessage"])) : createCommentVNode("", true),
14574
- _ctx.toolbar ? (openBlock(), createBlock(unref(Dropdown), {
14575
- key: 1,
14576
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
14577
- }, ["prevent"]))
14578
- }, {
14579
- overlay: withCtx(() => [
14580
- createVNode(unref(Menu), { onClick: handleMenuClick }, {
14581
- default: withCtx(() => [
14582
- (openBlock(true), createElementBlock(Fragment, null, renderList(toolbarList.value, (item) => {
14583
- return openBlock(), createElementBlock(Fragment, {
14584
- key: item.value
14585
- }, [
14586
- createVNode(unref(MenuItem), normalizeProps(guardReactiveProps({ key: item.value })), {
14587
- default: withCtx(() => [
14588
- createTextVNode(toDisplayString(item.label), 1)
14589
- ]),
14590
- _: 2
14591
- }, 1040),
14592
- item.divider ? (openBlock(), createBlock(unref(MenuDivider), { key: 0 })) : createCommentVNode("", true)
14593
- ], 64);
14594
- }), 128))
14595
- ]),
14596
- _: 1
14597
- })
14598
- ]),
14599
- default: withCtx(() => [
14600
- createVNode(unref(Icon2), {
14601
- icon: "ant-design:plus-square-outlined",
14602
- style: {
14603
- color: "#2da44e"
14604
- }
14605
- })
14606
- ]),
14607
- _: 1
14608
- })) : createCommentVNode("", true)
14554
+ createVNode(unref(Icon2), {
14555
+ icon: "ant-design:plus-square-outlined",
14556
+ style: {
14557
+ color: "#2da44e"
14558
+ },
14559
+ onClick: handleMenuClick
14560
+ })
14609
14561
  ]),
14610
14562
  _ctx.search || _ctx.toolbar ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
14611
14563
  _ctx.search ? (openBlock(), createElementBlock("div", {
@@ -14616,7 +14568,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
14616
14568
  placeholder: unref(t2)("common.searchText"),
14617
14569
  allowClear: "",
14618
14570
  value: searchValue.value,
14619
- "onUpdate:value": _cache[1] || (_cache[1] = ($event) => searchValue.value = $event)
14571
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event)
14620
14572
  }, null, 8, ["placeholder", "value"])
14621
14573
  ], 2)) : createCommentVNode("", true)
14622
14574
  ])) : createCommentVNode("", true)
@@ -14624,8 +14576,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
14624
14576
  };
14625
14577
  }
14626
14578
  });
14627
- const TreeHeader_vue_vue_type_style_index_0_scoped_14537c01_lang = "";
14628
- const TreeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-14537c01"]]);
14579
+ const TreeHeader_vue_vue_type_style_index_0_scoped_07d7188c_lang = "";
14580
+ const TreeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-07d7188c"]]);
14629
14581
  process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
14630
14582
  process.env.NODE_ENV !== "production" ? Object.freeze([]) : [];
14631
14583
  const isString$1 = (val) => typeof val === "string";
@@ -14830,7 +14782,7 @@ function useTree(treeDataRef, getFieldNames) {
14830
14782
  getSelectedNode
14831
14783
  };
14832
14784
  }
14833
- function _isSlot$5(s) {
14785
+ function _isSlot$4(s) {
14834
14786
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
14835
14787
  }
14836
14788
  const prefixCls$2 = "context-menu";
@@ -14987,7 +14939,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
14987
14939
  "mode": "vertical",
14988
14940
  "ref": wrapRef,
14989
14941
  "style": unref(getStyle)
14990
- }, _isSlot$5(_slot = renderMenuItem(items)) ? _slot : {
14942
+ }, _isSlot$4(_slot = renderMenuItem(items)) ? _slot : {
14991
14943
  default: () => [_slot]
14992
14944
  })]);
14993
14945
  };
@@ -15059,9 +15011,6 @@ function useContextMenu(authRemove = true) {
15059
15011
  }
15060
15012
  return [createContextMenu, destroyContextMenu];
15061
15013
  }
15062
- function _isSlot$4(s) {
15063
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
15064
- }
15065
15014
  const _sfc_main$13 = /* @__PURE__ */ defineComponent({
15066
15015
  name: "BasicTree",
15067
15016
  inheritAttrs: false,
@@ -15398,9 +15347,11 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
15398
15347
  });
15399
15348
  return data;
15400
15349
  });
15350
+ async function handlePlusClick() {
15351
+ emit("plus-click");
15352
+ }
15401
15353
  expose(instance);
15402
15354
  return () => {
15403
- let _slot;
15404
15355
  const {
15405
15356
  title,
15406
15357
  helpMessage,
@@ -15425,8 +15376,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
15425
15376
  "onStrictlyChange": onStrictlyChange,
15426
15377
  "onSearch": handleSearch,
15427
15378
  "searchText": searchState.searchText
15428
- }, _isSlot$4(_slot = extendSlots$1(slots)) ? _slot : {
15429
- default: () => [_slot]
15379
+ }, {
15380
+ default: () => [extendSlots$1(slots), createTextVNode("plusClick="), handlePlusClick]
15430
15381
  }), createVNode(Spin, {
15431
15382
  "wrapperClassName": unref(props2.treeWrapperClassName),
15432
15383
  "spinning": unref(props2.loading),
package/es/style.css CHANGED
@@ -2045,7 +2045,7 @@ span.iconify {
2045
2045
  }
2046
2046
  .table-children-err-popover .ant-popover-inner-content {
2047
2047
  padding: 6px 16px;
2048
- }.shy-search[data-v-14537c01] {
2048
+ }.shy-search[data-v-07d7188c] {
2049
2049
  position: relative;
2050
2050
  display: flex;
2051
2051
  align-items: center;
package/lib/index.js CHANGED
@@ -9830,7 +9830,7 @@ function extendSlots(slots, excludeKeys = []) {
9830
9830
  });
9831
9831
  return ret;
9832
9832
  }
9833
- function _isSlot$8(s) {
9833
+ function _isSlot$7(s) {
9834
9834
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
9835
9835
  }
9836
9836
  const Modal$2 = /* @__PURE__ */ vue.defineComponent({
@@ -9863,7 +9863,7 @@ const Modal$2 = /* @__PURE__ */ vue.defineComponent({
9863
9863
  ...props2,
9864
9864
  onCancel
9865
9865
  };
9866
- return vue.createVNode(antDesignVue.Modal, propsData, _isSlot$8(_slot = extendSlots(slots)) ? _slot : {
9866
+ return vue.createVNode(antDesignVue.Modal, propsData, _isSlot$7(_slot = extendSlots(slots)) ? _slot : {
9867
9867
  default: () => [_slot]
9868
9868
  });
9869
9869
  };
@@ -10359,7 +10359,7 @@ const BasicButton = /* @__PURE__ */ vue.defineComponent({
10359
10359
  };
10360
10360
  }
10361
10361
  });
10362
- function _isSlot$7(s) {
10362
+ function _isSlot$6(s) {
10363
10363
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
10364
10364
  }
10365
10365
  const props$6 = {
@@ -10391,7 +10391,7 @@ const PopConfirmButton = /* @__PURE__ */ vue.defineComponent({
10391
10391
  btnBind.color = "";
10392
10392
  const Button2 = () => {
10393
10393
  let _slot;
10394
- return vue.createVNode(BasicButton, btnBind, _isSlot$7(_slot = utils.extendSlots(slots)) ? _slot : {
10394
+ return vue.createVNode(BasicButton, btnBind, _isSlot$6(_slot = utils.extendSlots(slots)) ? _slot : {
10395
10395
  default: () => [_slot]
10396
10396
  });
10397
10397
  };
@@ -12627,7 +12627,7 @@ const useGlobalConfig = (key2) => {
12627
12627
  };
12628
12628
  return { config, setConfig };
12629
12629
  };
12630
- function _isSlot$6(s) {
12630
+ function _isSlot$5(s) {
12631
12631
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
12632
12632
  }
12633
12633
  const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
@@ -12945,7 +12945,7 @@ const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
12945
12945
  } : {
12946
12946
  default: () => renderComponentContent
12947
12947
  };
12948
- return vue.createVNode(Comp, compAttr, _isSlot$6(compSlot) ? compSlot : {
12948
+ return vue.createVNode(Comp, compAttr, _isSlot$5(compSlot) ? compSlot : {
12949
12949
  default: () => [compSlot]
12950
12950
  });
12951
12951
  }
@@ -12990,7 +12990,7 @@ const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
12990
12990
  return vue.createVNode(antDesignVue.Col, {
12991
12991
  "span": 24
12992
12992
  }, {
12993
- default: () => [vue.createVNode(Divider$1, vue.unref(getComponentsProps), _isSlot$6(_slot = renderLabelHelpMessage()) ? _slot : {
12993
+ default: () => [vue.createVNode(Divider$1, vue.unref(getComponentsProps), _isSlot$5(_slot = renderLabelHelpMessage()) ? _slot : {
12994
12994
  default: () => [_slot]
12995
12995
  })]
12996
12996
  });
@@ -13051,7 +13051,7 @@ const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
13051
13051
  const getContent = () => {
13052
13052
  return colSlot ? utils.getSlot(slots, colSlot, values) : renderColContent ? renderColContent(values) : renderItem();
13053
13053
  };
13054
- return isIfShow && vue.withDirectives(vue.createVNode(antDesignVue.Col, realColProps, _isSlot$6(_slot2 = getContent()) ? _slot2 : {
13054
+ return isIfShow && vue.withDirectives(vue.createVNode(antDesignVue.Col, realColProps, _isSlot$5(_slot2 = getContent()) ? _slot2 : {
13055
13055
  default: () => [_slot2]
13056
13056
  }), [[vue.vShow, isShow]]);
13057
13057
  };
@@ -14383,7 +14383,8 @@ const treeEmits = [
14383
14383
  "update:value",
14384
14384
  "change",
14385
14385
  "check",
14386
- "update:searchValue"
14386
+ "update:searchValue",
14387
+ "plus-click"
14387
14388
  ];
14388
14389
  const treeProps = utils.buildProps({
14389
14390
  value: {
@@ -14515,7 +14516,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
14515
14516
  default: void 0
14516
14517
  }
14517
14518
  },
14518
- emits: ["strictly-change", "search"],
14519
+ emits: ["strictly-change", "search", "plus-click"],
14519
14520
  setup(__props, { emit: __emit }) {
14520
14521
  const searchValue = vue.ref("");
14521
14522
  const [bem] = utils.createBEM("tree-header");
@@ -14526,7 +14527,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
14526
14527
  const getInputSearchCls = vue.computed(() => {
14527
14528
  return ["mr-1", "w-full"];
14528
14529
  });
14529
- const toolbarList = vue.computed(() => {
14530
+ vue.computed(() => {
14530
14531
  const { checkable } = props2;
14531
14532
  const defaultToolbarList = [
14532
14533
  { label: t2("component.tree.expandAll"), value: ToolbarEnum.EXPAND_ALL },
@@ -14539,28 +14540,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
14539
14540
  return defaultToolbarList;
14540
14541
  });
14541
14542
  function handleMenuClick(e) {
14542
- var _a2, _b, _c, _d;
14543
- const { key: key2 } = e;
14544
- switch (key2) {
14545
- case ToolbarEnum.SELECT_ALL:
14546
- (_a2 = props2.checkAll) == null ? void 0 : _a2.call(props2, true);
14547
- break;
14548
- case ToolbarEnum.UN_SELECT_ALL:
14549
- (_b = props2.checkAll) == null ? void 0 : _b.call(props2, false);
14550
- break;
14551
- case ToolbarEnum.EXPAND_ALL:
14552
- (_c = props2.expandAll) == null ? void 0 : _c.call(props2, true);
14553
- break;
14554
- case ToolbarEnum.UN_EXPAND_ALL:
14555
- (_d = props2.expandAll) == null ? void 0 : _d.call(props2, false);
14556
- break;
14557
- case ToolbarEnum.CHECK_STRICTLY:
14558
- emit("strictly-change", false);
14559
- break;
14560
- case ToolbarEnum.CHECK_UN_STRICTLY:
14561
- emit("strictly-change", true);
14562
- break;
14563
- }
14543
+ emit("plus-click");
14564
14544
  }
14565
14545
  function emitChange(value) {
14566
14546
  emit("search", value);
@@ -14595,41 +14575,13 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
14595
14575
  ]),
14596
14576
  _: 1
14597
14577
  }, 8, ["helpMessage"])) : vue.createCommentVNode("", true),
14598
- _ctx.toolbar ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Dropdown), {
14599
- key: 1,
14600
- onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
14601
- }, ["prevent"]))
14602
- }, {
14603
- overlay: vue.withCtx(() => [
14604
- vue.createVNode(vue.unref(antDesignVue.Menu), { onClick: handleMenuClick }, {
14605
- default: vue.withCtx(() => [
14606
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(toolbarList.value, (item) => {
14607
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
14608
- key: item.value
14609
- }, [
14610
- vue.createVNode(vue.unref(antDesignVue.MenuItem), vue.normalizeProps(vue.guardReactiveProps({ key: item.value })), {
14611
- default: vue.withCtx(() => [
14612
- vue.createTextVNode(vue.toDisplayString(item.label), 1)
14613
- ]),
14614
- _: 2
14615
- }, 1040),
14616
- item.divider ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.MenuDivider), { key: 0 })) : vue.createCommentVNode("", true)
14617
- ], 64);
14618
- }), 128))
14619
- ]),
14620
- _: 1
14621
- })
14622
- ]),
14623
- default: vue.withCtx(() => [
14624
- vue.createVNode(vue.unref(Icon2), {
14625
- icon: "ant-design:plus-square-outlined",
14626
- style: {
14627
- color: "#2da44e"
14628
- }
14629
- })
14630
- ]),
14631
- _: 1
14632
- })) : vue.createCommentVNode("", true)
14578
+ vue.createVNode(vue.unref(Icon2), {
14579
+ icon: "ant-design:plus-square-outlined",
14580
+ style: {
14581
+ color: "#2da44e"
14582
+ },
14583
+ onClick: handleMenuClick
14584
+ })
14633
14585
  ]),
14634
14586
  _ctx.search || _ctx.toolbar ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$b, [
14635
14587
  _ctx.search ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -14640,7 +14592,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
14640
14592
  placeholder: vue.unref(t2)("common.searchText"),
14641
14593
  allowClear: "",
14642
14594
  value: searchValue.value,
14643
- "onUpdate:value": _cache[1] || (_cache[1] = ($event) => searchValue.value = $event)
14595
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event)
14644
14596
  }, null, 8, ["placeholder", "value"])
14645
14597
  ], 2)) : vue.createCommentVNode("", true)
14646
14598
  ])) : vue.createCommentVNode("", true)
@@ -14648,8 +14600,8 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
14648
14600
  };
14649
14601
  }
14650
14602
  });
14651
- const TreeHeader_vue_vue_type_style_index_0_scoped_14537c01_lang = "";
14652
- const TreeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-14537c01"]]);
14603
+ const TreeHeader_vue_vue_type_style_index_0_scoped_07d7188c_lang = "";
14604
+ const TreeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-07d7188c"]]);
14653
14605
  process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
14654
14606
  process.env.NODE_ENV !== "production" ? Object.freeze([]) : [];
14655
14607
  const isString$1 = (val) => typeof val === "string";
@@ -14854,7 +14806,7 @@ function useTree(treeDataRef, getFieldNames) {
14854
14806
  getSelectedNode
14855
14807
  };
14856
14808
  }
14857
- function _isSlot$5(s) {
14809
+ function _isSlot$4(s) {
14858
14810
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
14859
14811
  }
14860
14812
  const prefixCls$2 = "context-menu";
@@ -15011,7 +14963,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
15011
14963
  "mode": "vertical",
15012
14964
  "ref": wrapRef,
15013
14965
  "style": vue.unref(getStyle)
15014
- }, _isSlot$5(_slot = renderMenuItem(items)) ? _slot : {
14966
+ }, _isSlot$4(_slot = renderMenuItem(items)) ? _slot : {
15015
14967
  default: () => [_slot]
15016
14968
  })]);
15017
14969
  };
@@ -15083,9 +15035,6 @@ function useContextMenu(authRemove = true) {
15083
15035
  }
15084
15036
  return [createContextMenu, destroyContextMenu];
15085
15037
  }
15086
- function _isSlot$4(s) {
15087
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
15088
- }
15089
15038
  const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
15090
15039
  name: "BasicTree",
15091
15040
  inheritAttrs: false,
@@ -15422,9 +15371,11 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
15422
15371
  });
15423
15372
  return data;
15424
15373
  });
15374
+ async function handlePlusClick() {
15375
+ emit("plus-click");
15376
+ }
15425
15377
  expose(instance);
15426
15378
  return () => {
15427
- let _slot;
15428
15379
  const {
15429
15380
  title,
15430
15381
  helpMessage,
@@ -15449,8 +15400,8 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
15449
15400
  "onStrictlyChange": onStrictlyChange,
15450
15401
  "onSearch": handleSearch,
15451
15402
  "searchText": searchState.searchText
15452
- }, _isSlot$4(_slot = utils.extendSlots(slots)) ? _slot : {
15453
- default: () => [_slot]
15403
+ }, {
15404
+ default: () => [utils.extendSlots(slots), vue.createTextVNode("plusClick="), handlePlusClick]
15454
15405
  }), vue.createVNode(antDesignVue.Spin, {
15455
15406
  "wrapperClassName": vue.unref(props2.treeWrapperClassName),
15456
15407
  "spinning": vue.unref(props2.loading),
package/lib/style.css CHANGED
@@ -2045,7 +2045,7 @@ span.iconify {
2045
2045
  }
2046
2046
  .table-children-err-popover .ant-popover-inner-content {
2047
2047
  padding: 6px 16px;
2048
- }.shy-search[data-v-14537c01] {
2048
+ }.shy-search[data-v-07d7188c] {
2049
2049
  position: relative;
2050
2050
  display: flex;
2051
2051
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "3.0.0-next.50",
3
+ "version": "3.0.0-next.51",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",