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

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";
@@ -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,14 @@ 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
+ class: "cursor-pointer",
14560
+ onClick: handleMenuClick
14561
+ })
14609
14562
  ]),
14610
14563
  _ctx.search || _ctx.toolbar ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
14611
14564
  _ctx.search ? (openBlock(), createElementBlock("div", {
@@ -14616,7 +14569,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
14616
14569
  placeholder: unref(t2)("common.searchText"),
14617
14570
  allowClear: "",
14618
14571
  value: searchValue.value,
14619
- "onUpdate:value": _cache[1] || (_cache[1] = ($event) => searchValue.value = $event)
14572
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event)
14620
14573
  }, null, 8, ["placeholder", "value"])
14621
14574
  ], 2)) : createCommentVNode("", true)
14622
14575
  ])) : createCommentVNode("", true)
@@ -14624,8 +14577,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
14624
14577
  };
14625
14578
  }
14626
14579
  });
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"]]);
14580
+ const TreeHeader_vue_vue_type_style_index_0_scoped_d8be8a1f_lang = "";
14581
+ const TreeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-d8be8a1f"]]);
14629
14582
  process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
14630
14583
  process.env.NODE_ENV !== "production" ? Object.freeze([]) : [];
14631
14584
  const isString$1 = (val) => typeof val === "string";
@@ -15398,6 +15351,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
15398
15351
  });
15399
15352
  return data;
15400
15353
  });
15354
+ function handlePlusClick() {
15355
+ emit("plus-click");
15356
+ }
15401
15357
  expose(instance);
15402
15358
  return () => {
15403
15359
  let _slot;
@@ -15424,7 +15380,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
15424
15380
  "helpMessage": helpMessage,
15425
15381
  "onStrictlyChange": onStrictlyChange,
15426
15382
  "onSearch": handleSearch,
15427
- "searchText": searchState.searchText
15383
+ "searchText": searchState.searchText,
15384
+ "onPlusClick": handlePlusClick
15428
15385
  }, _isSlot$4(_slot = extendSlots$1(slots)) ? _slot : {
15429
15386
  default: () => [_slot]
15430
15387
  }), createVNode(Spin, {
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-d8be8a1f] {
2049
2049
  position: relative;
2050
2050
  display: flex;
2051
2051
  align-items: center;
package/lib/index.js CHANGED
@@ -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,14 @@ 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
+ class: "cursor-pointer",
14584
+ onClick: handleMenuClick
14585
+ })
14633
14586
  ]),
14634
14587
  _ctx.search || _ctx.toolbar ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$b, [
14635
14588
  _ctx.search ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -14640,7 +14593,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
14640
14593
  placeholder: vue.unref(t2)("common.searchText"),
14641
14594
  allowClear: "",
14642
14595
  value: searchValue.value,
14643
- "onUpdate:value": _cache[1] || (_cache[1] = ($event) => searchValue.value = $event)
14596
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event)
14644
14597
  }, null, 8, ["placeholder", "value"])
14645
14598
  ], 2)) : vue.createCommentVNode("", true)
14646
14599
  ])) : vue.createCommentVNode("", true)
@@ -14648,8 +14601,8 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
14648
14601
  };
14649
14602
  }
14650
14603
  });
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"]]);
14604
+ const TreeHeader_vue_vue_type_style_index_0_scoped_d8be8a1f_lang = "";
14605
+ const TreeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-d8be8a1f"]]);
14653
14606
  process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
14654
14607
  process.env.NODE_ENV !== "production" ? Object.freeze([]) : [];
14655
14608
  const isString$1 = (val) => typeof val === "string";
@@ -15422,6 +15375,9 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
15422
15375
  });
15423
15376
  return data;
15424
15377
  });
15378
+ function handlePlusClick() {
15379
+ emit("plus-click");
15380
+ }
15425
15381
  expose(instance);
15426
15382
  return () => {
15427
15383
  let _slot;
@@ -15448,7 +15404,8 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
15448
15404
  "helpMessage": helpMessage,
15449
15405
  "onStrictlyChange": onStrictlyChange,
15450
15406
  "onSearch": handleSearch,
15451
- "searchText": searchState.searchText
15407
+ "searchText": searchState.searchText,
15408
+ "onPlusClick": handlePlusClick
15452
15409
  }, _isSlot$4(_slot = utils.extendSlots(slots)) ? _slot : {
15453
15410
  default: () => [_slot]
15454
15411
  }), vue.createVNode(antDesignVue.Spin, {
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-d8be8a1f] {
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.52",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -30,8 +30,8 @@
30
30
  "vxe-table": "^4.3.6",
31
31
  "xe-utils": "^3.5.7",
32
32
  "@shy-plugins/tinymce": "^1.0.6",
33
- "@shy-plugins/use": "1.0.0-next.1",
34
- "@shy-plugins/utils": "1.0.0-next.1"
33
+ "@shy-plugins/utils": "1.0.0-next.1",
34
+ "@shy-plugins/use": "1.0.0-next.1"
35
35
  },
36
36
  "types": "es/ui/index.d.ts",
37
37
  "devDependencies": {