@dt-frames/ui 1.0.9 → 1.0.10

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.
Files changed (57) hide show
  1. package/es/components/forms/src/types/form.type.d.ts +3 -3
  2. package/es/components/index.d.ts +3 -2
  3. package/es/components/source/src/hooks/useSource.d.ts +4 -4
  4. package/es/components/source/src/types/table.type.d.ts +1 -1
  5. package/es/components/table/src/components/TableActions.d.ts +2 -2
  6. package/es/components/table/src/components/setting/Download.d.ts +2 -2
  7. package/es/components/table/src/components/setting/Size.d.ts +2 -2
  8. package/es/components/table/src/index.d.ts +2 -2
  9. package/es/components/tree/index.d.ts +2 -0
  10. package/es/components/tree/src/hooks/useTree.d.ts +14 -0
  11. package/es/components/tree/src/props.d.ts +101 -0
  12. package/es/components/tree/src/type/tree.d.ts +85 -0
  13. package/es/components/tree/src/utils/tree.d.ts +5 -0
  14. package/es/components/upload/index.d.ts +3 -0
  15. package/es/components/upload/src/helper.d.ts +4 -0
  16. package/es/components/upload/src/index.d.ts +2784 -0
  17. package/es/components/upload/src/props.d.ts +40 -0
  18. package/es/components/upload/src/upload.d.ts +1630 -0
  19. package/es/index.js +1697 -215
  20. package/es/style/components/table/index.less +2 -2
  21. package/es/style/components/tree/index.less +41 -0
  22. package/es/style/components/upload/index.less +43 -0
  23. package/es/theme/sider/components/basic-menu/basic-menu.d.ts +3 -3
  24. package/es/theme/tabs/components/TabContent.d.ts +2 -2
  25. package/package.json +2 -1
  26. package/src/components/curd/src/hooks/useCurd.tsx +1 -1
  27. package/src/components/forms/src/components/formItem.vue +15 -2
  28. package/src/components/forms/src/hooks/useFormEvents.ts +4 -3
  29. package/src/components/forms/src/hooks/useFormValues.ts +1 -1
  30. package/src/components/forms/src/types/form.type.ts +3 -3
  31. package/src/components/index.ts +9 -3
  32. package/src/components/modal/src/index.vue +1 -1
  33. package/src/components/source/src/hooks/useFetch.ts +5 -3
  34. package/src/components/source/src/hooks/useSource.ts +28 -8
  35. package/src/components/source/src/types/table.type.ts +1 -1
  36. package/src/components/table/index.less +2 -2
  37. package/src/components/table/src/hooks/useDataSource.ts +0 -13
  38. package/src/components/tree/index.less +41 -0
  39. package/src/components/tree/index.ts +5 -0
  40. package/src/components/tree/src/components/TreeHeader.vue +97 -0
  41. package/src/components/tree/src/hooks/useTree.ts +239 -0
  42. package/src/components/tree/src/index.vue +392 -0
  43. package/src/components/tree/src/props.ts +133 -0
  44. package/src/components/tree/src/type/tree.ts +105 -0
  45. package/src/components/tree/src/utils/tree.ts +73 -0
  46. package/src/components/upload/index.less +43 -0
  47. package/src/components/upload/index.ts +7 -0
  48. package/src/components/upload/src/helper.ts +32 -0
  49. package/src/components/upload/src/index.vue +38 -0
  50. package/src/components/upload/src/props.ts +48 -0
  51. package/src/components/upload/src/upload.vue +166 -0
  52. package/src/theme/header/helper/menu-tree.ts +2 -2
  53. package/src/theme/sider/helper/split-menu.ts +2 -2
  54. package/es/components/dialog/index.d.ts +0 -2
  55. package/es/components/dialog/src/hooks/useDialog.d.ts +0 -3
  56. package/src/components/dialog/index.ts +0 -5
  57. package/src/components/dialog/src/hooks/useDialog.ts +0 -85
package/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, computed, unref, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, ref, watch, Fragment, renderList, createTextVNode, toDisplayString, KeepAlive, createVNode, withCtx, reactive, toRaw, getCurrentInstance, watchEffect, nextTick, onUnmounted, toRefs, isVNode, inject, h, provide, onMounted, onBeforeUnmount, resolveDynamicComponent, renderSlot, createCommentVNode, mergeProps, readonly, isRef, withDirectives, resolveDirective, render, normalizeProps, guardReactiveProps, createSlots, useAttrs as useAttrs$1, vShow, toRef, withModifiers, Transition } from "vue";
2
- import { isString, isArray as isArray$1, isObject, isFunction, error, useTimeoutFn, useAttrs, useSlots, dispatchResize, BAR_MAP, off, renderThumbStyle, on, useAppStore, addResizeListener, removeResizeListener, windowResizeFn, isNumber, isBoolean, isNull, DtCache, CacheKey, deepMerge, dateFormat, http, getDynamicProps, getDictValueByCode, formatNumber, isVnode, getPopupContainer, isNullAndUnDef, useMessage, useTheme, useMenu, useHeader, useGo, Pages, localeList, changeLocale, Theme, MenuMode, MenuType, useThemeStore, ContentMode, useMultipleTab, copyText, MenuSplitTye, isUrl, openWindow, RouteReuseStore, menuList2Map, useApp } from "@dt-frames/core";
3
- import { InputSearch, Tooltip, Modal as Modal$1, RadioGroup, RadioButton, InputGroup, Input, Button, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Form, FormItem, Row, Dropdown, Menu, MenuItem, Popover, CheckboxGroup, Table, Spin, BackTop, Breadcrumb, Avatar, Drawer, Empty, SubMenu, LayoutHeader, LayoutSider, MenuDivider, Tabs, TabPane, LayoutFooter, LayoutContent, ConfigProvider, Layout } from "ant-design-vue";
4
- import { isEqual, cloneDeep, upperFirst, set, uniqBy, omit, trim } from "lodash-es";
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, computed, unref, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, ref, watch, Fragment, renderList, createTextVNode, toDisplayString, KeepAlive, createVNode, withCtx, reactive, toRaw, getCurrentInstance, watchEffect, nextTick, onUnmounted, toRefs, isVNode, inject, h, provide, onMounted, onBeforeUnmount, resolveDynamicComponent, renderSlot, createCommentVNode, mergeProps, readonly, isRef, withDirectives, resolveDirective, render, normalizeProps, guardReactiveProps, createSlots, useAttrs as useAttrs$1, useSlots as useSlots$1, withModifiers, vShow, toRef, Transition } from "vue";
2
+ import { isString, isArray as isArray$1, isObject, isFunction, error, useTimeoutFn, useAttrs, useSlots, dispatchResize, BAR_MAP, off, renderThumbStyle, on, useAppStore, addResizeListener, removeResizeListener, windowResizeFn, isNumber, isBoolean, isNull, DtCache, CacheKey, deepMerge, http, getDynamicProps, getDictValueByCode, formatNumber, isVnode, getPopupContainer, isNullAndUnDef, dateFormat, useMessage, isEmpty, useTheme, useMenu, useHeader, useGo, Pages, localeList, changeLocale, Theme, MenuMode, MenuType, useThemeStore, ContentMode, useMultipleTab, copyText, MenuSplitTye, isUrl, openWindow, RouteReuseStore, menuList2Map, useApp } from "@dt-frames/core";
3
+ import { InputSearch, Tooltip, Modal as Modal$1, RadioGroup, RadioButton, InputGroup, Input, Button, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Form, FormItem, Row, Dropdown, Menu, MenuItem, Popover, CheckboxGroup, Table, Spin, Upload, Image, MenuDivider, Tree, Empty, BackTop, Breadcrumb, Avatar, Drawer, SubMenu, LayoutHeader, LayoutSider, Tabs, TabPane, LayoutFooter, LayoutContent, ConfigProvider, Layout } from "ant-design-vue";
4
+ import { isEqual, cloneDeep, upperFirst, set, uniqBy, omit, difference, get, trim } from "lodash-es";
5
5
  import { tryOnUnmounted, isFunction as isFunction$1, useFullscreen, useDebounceFn, useThrottleFn } from "@vueuse/core";
6
6
  import Sortablejs from "sortablejs";
7
7
  import * as xlsx from "xlsx";
@@ -14,15 +14,15 @@ var _export_sfc = (sfc, props) => {
14
14
  }
15
15
  return target;
16
16
  };
17
- const _sfc_main$T = defineComponent({
17
+ const _sfc_main$X = defineComponent({
18
18
  name: "dt-base-router"
19
19
  });
20
20
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
21
21
  const _component_router_view = resolveComponent("router-view");
22
22
  return openBlock(), createBlock(_component_router_view);
23
23
  }
24
- var DtBaseRouter = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$7]]);
25
- const _sfc_main$S = defineComponent({
24
+ var DtBaseRouter = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$7]]);
25
+ const _sfc_main$W = defineComponent({
26
26
  props: {
27
27
  iconClass: {
28
28
  type: String,
@@ -90,7 +90,7 @@ const _sfc_main$S = defineComponent({
90
90
  };
91
91
  }
92
92
  });
93
- const _hoisted_1$r = ["xlink:href", "fill"];
93
+ const _hoisted_1$v = ["xlink:href", "fill"];
94
94
  function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
95
95
  return _ctx.isSvgIcon ? (openBlock(), createElementBlock("svg", {
96
96
  key: 0,
@@ -105,7 +105,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
105
105
  createElementVNode("use", {
106
106
  "xlink:href": _ctx.iconName,
107
107
  fill: _ctx.color
108
- }, null, 8, _hoisted_1$r)
108
+ }, null, 8, _hoisted_1$v)
109
109
  ], 6)) : (openBlock(), createElementBlock("i", {
110
110
  key: 1,
111
111
  class: normalizeClass(["dt-icon i", [_ctx.iconName, _ctx.clsName]]),
@@ -115,7 +115,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
115
115
  })
116
116
  }, null, 6));
117
117
  }
118
- var DtIcon = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$6]]);
118
+ var DtIcon = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$6]]);
119
119
  const Actions = [
120
120
  "ic:baseline-save",
121
121
  "ic:baseline-save-all",
@@ -1026,7 +1026,7 @@ const Edit = [
1026
1026
  "mdi:view-sequential",
1027
1027
  "mdi:view-split-vertical"
1028
1028
  ];
1029
- const File = [
1029
+ const File$1 = [
1030
1030
  "ic:baseline-approval",
1031
1031
  "ic:baseline-attach-email",
1032
1032
  "ic:baseline-cloud",
@@ -1847,7 +1847,7 @@ const Icons = [
1847
1847
  },
1848
1848
  {
1849
1849
  type: "\u6587\u4EF6",
1850
- children: File
1850
+ children: File$1
1851
1851
  },
1852
1852
  {
1853
1853
  type: "\u6570\u5B66",
@@ -1874,15 +1874,15 @@ const Icons = [
1874
1874
  children: Other
1875
1875
  }
1876
1876
  ];
1877
- const _hoisted_1$q = ["onClick"];
1878
- const _hoisted_2$i = ["onClick"];
1879
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
1877
+ const _hoisted_1$u = ["onClick"];
1878
+ const _hoisted_2$l = ["onClick"];
1879
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
1880
1880
  __name: "pick-icon",
1881
1881
  emits: ["chooseIcon"],
1882
1882
  setup(__props, { emit: emits }) {
1883
1883
  const clsPrefix = "dt-pick-icon";
1884
1884
  const activeIndex = ref(1);
1885
- const filter = ref(null);
1885
+ const filter2 = ref(null);
1886
1886
  const currentIcons = ref([]);
1887
1887
  const activeIcon = ref(null);
1888
1888
  const iconMenus = computed(() => {
@@ -1920,7 +1920,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1920
1920
  immediate: true
1921
1921
  });
1922
1922
  function onFilter(e) {
1923
- currentIcons.value = getIcons().filter((it) => it.indexOf(unref(filter)) !== -1);
1923
+ currentIcons.value = getIcons().filter((it) => it.indexOf(unref(filter2)) !== -1);
1924
1924
  }
1925
1925
  function selectIcon(icon) {
1926
1926
  activeIcon.value = icon;
@@ -1933,17 +1933,17 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1933
1933
  createElementVNode("div", {
1934
1934
  class: normalizeClass(`${clsPrefix}__menus`)
1935
1935
  }, [
1936
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(iconMenus), (menu, index2) => {
1936
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(iconMenus), (menu, index) => {
1937
1937
  return openBlock(), createElementBlock("div", {
1938
1938
  key: menu.type,
1939
- class: normalizeClass(["menu", { "active": activeIndex.value === index2 }]),
1940
- onClick: ($event) => activeIndex.value = index2
1939
+ class: normalizeClass(["menu", { "active": activeIndex.value === index }]),
1940
+ onClick: ($event) => activeIndex.value = index
1941
1941
  }, [
1942
1942
  createElementVNode("p", null, [
1943
1943
  createTextVNode(toDisplayString(menu.type), 1),
1944
1944
  createElementVNode("span", null, "(" + toDisplayString(menu.total) + ")", 1)
1945
1945
  ])
1946
- ], 10, _hoisted_1$q);
1946
+ ], 10, _hoisted_1$u);
1947
1947
  }), 128))
1948
1948
  ], 2),
1949
1949
  createElementVNode("div", {
@@ -1954,8 +1954,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1954
1954
  class: normalizeClass(`${clsPrefix}__content_item`)
1955
1955
  }, [
1956
1956
  createVNode(unref(InputSearch), {
1957
- value: filter.value,
1958
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => filter.value = $event),
1957
+ value: filter2.value,
1958
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => filter2.value = $event),
1959
1959
  "enter-button": "",
1960
1960
  placeholder: "\u8BF7\u8F93\u5165\u8FC7\u6EE4\u6761\u4EF6",
1961
1961
  onSearch: onFilter
@@ -1980,7 +1980,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1980
1980
  ]),
1981
1981
  _: 2
1982
1982
  }, 1024)
1983
- ], 10, _hoisted_2$i);
1983
+ ], 10, _hoisted_2$l);
1984
1984
  }), 128))
1985
1985
  ], 2)
1986
1986
  ], 1024))
@@ -2383,8 +2383,8 @@ var Bar = defineComponent({
2383
2383
  }));
2384
2384
  }
2385
2385
  });
2386
- const _hoisted_1$p = { class: "scrollbar" };
2387
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2386
+ const _hoisted_1$t = { class: "scrollbar" };
2387
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
2388
2388
  __name: "scroll-bar",
2389
2389
  props: {
2390
2390
  wrapClass: {
@@ -2461,7 +2461,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2461
2461
  }
2462
2462
  });
2463
2463
  return (_ctx, _cache) => {
2464
- return openBlock(), createElementBlock("div", _hoisted_1$p, [
2464
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
2465
2465
  createElementVNode("div", {
2466
2466
  ref_key: "wrap",
2467
2467
  ref: wrap,
@@ -2496,12 +2496,12 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2496
2496
  };
2497
2497
  }
2498
2498
  });
2499
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
2499
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
2500
2500
  __name: "scroll-container",
2501
2501
  setup(__props) {
2502
2502
  const scrollbarRef = ref(null);
2503
2503
  return (_ctx, _cache) => {
2504
- return openBlock(), createBlock(_sfc_main$Q, mergeProps({
2504
+ return openBlock(), createBlock(_sfc_main$U, mergeProps({
2505
2505
  ref_key: "scrollbarRef",
2506
2506
  ref: scrollbarRef,
2507
2507
  class: "scroll-container"
@@ -2514,7 +2514,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2514
2514
  };
2515
2515
  }
2516
2516
  });
2517
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
2517
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
2518
2518
  __name: "modal-wrap",
2519
2519
  props: {
2520
2520
  loading: { type: Boolean },
@@ -2602,7 +2602,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2602
2602
  }
2603
2603
  });
2604
2604
  return (_ctx, _cache) => {
2605
- return openBlock(), createBlock(unref(_sfc_main$P), {
2605
+ return openBlock(), createBlock(unref(_sfc_main$T), {
2606
2606
  ref_key: "wrapperRef",
2607
2607
  ref: wrapperRef
2608
2608
  }, {
@@ -2688,7 +2688,7 @@ function useFormValue(props, key = "value", changeEvent = "change", emitData) {
2688
2688
  });
2689
2689
  return [state, setState, defaultState];
2690
2690
  }
2691
- const _sfc_main$N = defineComponent({
2691
+ const _sfc_main$R = defineComponent({
2692
2692
  name: "radio-button",
2693
2693
  props: {
2694
2694
  value: {
@@ -2746,8 +2746,8 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
2746
2746
  _: 1
2747
2747
  }, 16, ["value"]);
2748
2748
  }
2749
- var RadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$5]]);
2750
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
2749
+ var RadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$5]]);
2750
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2751
2751
  __name: "formIcon",
2752
2752
  props: {
2753
2753
  value: String,
@@ -2797,9 +2797,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
2797
2797
  ]),
2798
2798
  _: 1
2799
2799
  }),
2800
- createVNode(unref(_sfc_main$G), { onRegister: unref(register) }, {
2800
+ createVNode(unref(_sfc_main$K), { onRegister: unref(register) }, {
2801
2801
  default: withCtx(() => [
2802
- createVNode(unref(_sfc_main$R), {
2802
+ createVNode(unref(_sfc_main$V), {
2803
2803
  onChooseIcon: _cache[2] || (_cache[2] = ($event) => chooseIcon($event))
2804
2804
  })
2805
2805
  ]),
@@ -2834,7 +2834,7 @@ const components = {
2834
2834
  Slider,
2835
2835
  Rate,
2836
2836
  Divider,
2837
- Icon: _sfc_main$M
2837
+ Icon: _sfc_main$Q
2838
2838
  };
2839
2839
  const componentMap = /* @__PURE__ */ new Map();
2840
2840
  for (let item in components) {
@@ -2875,7 +2875,7 @@ function handleInputNumberValue(component, val) {
2875
2875
  return val;
2876
2876
  }
2877
2877
  const datePickerType = ["DatePicker", "MonthPicker", "WeekPicker", "TimePicker", "RangePicker"];
2878
- const BasicProps = {
2878
+ const BasicProps$1 = {
2879
2879
  mode: {
2880
2880
  type: String,
2881
2881
  default: "search"
@@ -2942,7 +2942,7 @@ const FormItemProps = {
2942
2942
  function _isSlot(s) {
2943
2943
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
2944
2944
  }
2945
- var _sfc_main$L = defineComponent({
2945
+ var _sfc_main$P = defineComponent({
2946
2946
  name: "FormItem",
2947
2947
  inheritAttrs: false,
2948
2948
  props: FormItemProps,
@@ -3248,11 +3248,13 @@ var _sfc_main$L = defineComponent({
3248
3248
  return rules;
3249
3249
  }
3250
3250
  return () => {
3251
- let _slot2;
3251
+ let _slot3;
3252
3252
  const {
3253
3253
  colSlot,
3254
3254
  renderCol,
3255
- colProps
3255
+ colProps,
3256
+ component,
3257
+ render: render2
3256
3258
  } = props.schema;
3257
3259
  const {
3258
3260
  colProps: gColProps,
@@ -3260,11 +3262,23 @@ var _sfc_main$L = defineComponent({
3260
3262
  } = props.formProps;
3261
3263
  let _colProps = colProps ? colProps : gColProps ? gColProps : mode === "search" ? appConf.ui.form.searchColspan : appConf.ui.form.dialogColspan;
3262
3264
  const values = unref(getValues);
3265
+ if (!component) {
3266
+ let _slot2;
3267
+ if (!render2) {
3268
+ error("\u8BF7\u914D\u7F6Erender\u51FD\u6570");
3269
+ return;
3270
+ }
3271
+ return createVNode(Col, {
3272
+ "span": 24
3273
+ }, _isSlot(_slot2 = render2()) ? _slot2 : {
3274
+ default: () => [_slot2]
3275
+ });
3276
+ }
3263
3277
  const getContent = () => {
3264
3278
  return colSlot ? getSlot(slots, colSlot, values) : renderCol ? renderCol(values) : renderItem();
3265
3279
  };
3266
- return unref(getShow) && createVNode(Col, _colProps, _isSlot(_slot2 = getContent()) ? _slot2 : {
3267
- default: () => [_slot2]
3280
+ return unref(getShow) && createVNode(Col, _colProps, _isSlot(_slot3 = getContent()) ? _slot3 : {
3281
+ default: () => [_slot3]
3268
3282
  });
3269
3283
  };
3270
3284
  }
@@ -3315,7 +3329,7 @@ function initDirectives() {
3315
3329
  }
3316
3330
  };
3317
3331
  }
3318
- const _sfc_main$K = defineComponent({
3332
+ const _sfc_main$O = defineComponent({
3319
3333
  name: "form-buttons",
3320
3334
  props: {
3321
3335
  mode: {
@@ -3402,15 +3416,15 @@ const _sfc_main$K = defineComponent({
3402
3416
  };
3403
3417
  }
3404
3418
  });
3405
- const _hoisted_1$o = {
3419
+ const _hoisted_1$s = {
3406
3420
  key: 0,
3407
3421
  className: "preIcon"
3408
3422
  };
3409
- const _hoisted_2$h = {
3423
+ const _hoisted_2$k = {
3410
3424
  key: 0,
3411
3425
  className: "preIcon"
3412
3426
  };
3413
- const _hoisted_3$a = { class: "text" };
3427
+ const _hoisted_3$c = { class: "text" };
3414
3428
  function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3415
3429
  const _component_Button = resolveComponent("Button");
3416
3430
  const _component_DtIcon = resolveComponent("DtIcon");
@@ -3438,13 +3452,13 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3438
3452
  onClick: ($event) => _ctx.handleBtnClick(button)
3439
3453
  }, {
3440
3454
  icon: withCtx(() => [
3441
- button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$o, null, 512)), [
3455
+ button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$s, null, 512)), [
3442
3456
  [_directive_icon, button.preIcon]
3443
3457
  ]) : createCommentVNode("", true)
3444
3458
  ]),
3445
3459
  default: withCtx(() => [
3446
3460
  createTextVNode(" " + toDisplayString(button.name) + " ", 1),
3447
- button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$h, null, 512)), [
3461
+ button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$k, null, 512)), [
3448
3462
  [_directive_icon, button.postIcon]
3449
3463
  ]) : createCommentVNode("", true)
3450
3464
  ]),
@@ -3459,7 +3473,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3459
3473
  onClick: _ctx.toggleAdvanced
3460
3474
  }, {
3461
3475
  default: withCtx(() => [
3462
- createElementVNode("span", _hoisted_3$a, toDisplayString(_ctx.advancedRef ? "\u6536\u8D77" : "\u5C55\u5F00"), 1),
3476
+ createElementVNode("span", _hoisted_3$c, toDisplayString(_ctx.advancedRef ? "\u6536\u8D77" : "\u5C55\u5F00"), 1),
3463
3477
  createElementVNode("span", {
3464
3478
  class: normalizeClass(_ctx.getAdvanceClass)
3465
3479
  }, [
@@ -3478,7 +3492,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3478
3492
  _: 1
3479
3493
  }, 16)) : createCommentVNode("", true);
3480
3494
  }
3481
- var FormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$4]]);
3495
+ var FormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$4]]);
3482
3496
  const isArray = Array.isArray;
3483
3497
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3484
3498
  var dayjs_min = { exports: {} };
@@ -3709,7 +3723,7 @@ function useFormValues({
3709
3723
  return res;
3710
3724
  }
3711
3725
  function initDefault() {
3712
- const schema = unref(getSchema);
3726
+ const schema = unref(getSchema).filter((it) => it.component);
3713
3727
  const obj = {};
3714
3728
  schema.forEach((item) => {
3715
3729
  const { props = {}, name, component } = item;
@@ -3737,9 +3751,9 @@ function useFormValues({
3737
3751
  }
3738
3752
  } else {
3739
3753
  if (names.length > 1) {
3740
- names.forEach((key, index2) => {
3741
- obj[key] = defaultValue2[index2];
3742
- formModel[key] = defaultValue2[index2];
3754
+ names.forEach((key, index) => {
3755
+ obj[key] = defaultValue2[index];
3756
+ formModel[key] = defaultValue2[index];
3743
3757
  });
3744
3758
  } else {
3745
3759
  obj[names[0]] = defaultValue2;
@@ -3747,7 +3761,7 @@ function useFormValues({
3747
3761
  }
3748
3762
  }
3749
3763
  } else {
3750
- names.forEach((key, index2) => {
3764
+ names.forEach((key, index) => {
3751
3765
  let defaultV = null;
3752
3766
  if (component === "TreeSelect" && (mode === "multiple" || treeCheckable) || component === "Select" && mode === "multiple") {
3753
3767
  defaultV = [];
@@ -3833,10 +3847,10 @@ function useFormEvents({
3833
3847
  schemaRef.value = schemaList;
3834
3848
  }
3835
3849
  function _removeSchemaByName(name, schemaList) {
3836
- const index2 = schemaList.findIndex((schema) => schema.name === name);
3837
- if (index2 !== -1) {
3850
+ const index = schemaList.findIndex((schema) => schema.name === name);
3851
+ if (index !== -1) {
3838
3852
  delete formModel[name];
3839
- schemaList.splice(index2, 1);
3853
+ schemaList.splice(index, 1);
3840
3854
  }
3841
3855
  }
3842
3856
  function setFormValues(values) {
@@ -3857,7 +3871,7 @@ function useFormEvents({
3857
3871
  if (Array.isArray(value)) {
3858
3872
  const arr = [];
3859
3873
  for (const ele of value) {
3860
- arr.push(ele ? dateFormat(ele) : null);
3874
+ arr.push(ele ? dayjs(ele) : null);
3861
3875
  }
3862
3876
  formModel[key] = arr;
3863
3877
  } else {
@@ -3866,7 +3880,7 @@ function useFormEvents({
3866
3880
  if (typeof props === "function") {
3867
3881
  _props = props({ formModel });
3868
3882
  }
3869
- formModel[key] = value ? (_props == null ? void 0 : _props.valueFormat) ? value : dateFormat(value) : null;
3883
+ formModel[key] = value ? (_props == null ? void 0 : _props.valueFormat) ? value : dayjs(value) : null;
3870
3884
  }
3871
3885
  } else {
3872
3886
  formModel[key] = value;
@@ -3879,14 +3893,14 @@ function useFormEvents({
3879
3893
  }
3880
3894
  function appendFormItems(schema, prefixName, first = false) {
3881
3895
  const schemaList = cloneDeep(unref(getSchema));
3882
- const index2 = schemaList.findIndex((schema2) => schema2.name === prefixName);
3883
- if (!prefixName || index2 === -1 || first) {
3896
+ const index = schemaList.findIndex((schema2) => schema2.name === prefixName);
3897
+ if (!prefixName || index === -1 || first) {
3884
3898
  first ? schemaList.unshift(schema) : schemaList.push(schema);
3885
3899
  schemaRef.value = schemaList;
3886
3900
  return;
3887
3901
  }
3888
- if (index2 !== -1) {
3889
- schemaList.splice(index2 + 1, 0, schema);
3902
+ if (index !== -1) {
3903
+ schemaList.splice(index + 1, 0, schema);
3890
3904
  }
3891
3905
  schemaRef.value = schemaList;
3892
3906
  }
@@ -3928,8 +3942,8 @@ function useFormActions(opt) {
3928
3942
  function handleAdvanced(isAdvanced) {
3929
3943
  var _a;
3930
3944
  const { schemas, minShowColumn = ((_a = appConf.ui.form) == null ? void 0 : _a.minShowColumn) || 2 } = unref(getProps);
3931
- let schema = schemas.reduce((t, it, index2) => {
3932
- if (index2 > minShowColumn - 1)
3945
+ let schema = schemas.reduce((t, it, index) => {
3946
+ if (index > minShowColumn - 1)
3933
3947
  it.isAdvanced = isAdvanced;
3934
3948
  t.push(it);
3935
3949
  return t;
@@ -3951,15 +3965,15 @@ function useFormActions(opt) {
3951
3965
  }
3952
3966
  return [handleMethod];
3953
3967
  }
3954
- const _sfc_main$J = defineComponent({
3968
+ const _sfc_main$N = defineComponent({
3955
3969
  name: "dt-form",
3956
3970
  components: {
3957
3971
  Form,
3958
3972
  Row,
3959
- FormItem: _sfc_main$L,
3973
+ FormItem: _sfc_main$P,
3960
3974
  FormButtons
3961
3975
  },
3962
- props: BasicProps,
3976
+ props: BasicProps$1,
3963
3977
  emits: ["register", "reset"],
3964
3978
  setup(props, { emit, attrs }) {
3965
3979
  const { appConf } = useAppStore();
@@ -4185,7 +4199,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
4185
4199
  _: 3
4186
4200
  }, 16, ["class", "model", "layout"]);
4187
4201
  }
4188
- var DtForm = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$3]]);
4202
+ var DtForm = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$3]]);
4189
4203
  function useForm(props) {
4190
4204
  const formRef = ref(null);
4191
4205
  const loadedRef = ref(false);
@@ -4258,7 +4272,7 @@ function useForm(props) {
4258
4272
  };
4259
4273
  return [registerForm, methods];
4260
4274
  }
4261
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
4275
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4262
4276
  __name: "modalFooter",
4263
4277
  props: {
4264
4278
  showSave: {
@@ -4297,7 +4311,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
4297
4311
  };
4298
4312
  }
4299
4313
  });
4300
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
4314
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4301
4315
  __name: "close-icon",
4302
4316
  props: {
4303
4317
  canFullscreen: { type: Boolean, default: true },
@@ -4362,7 +4376,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
4362
4376
  };
4363
4377
  }
4364
4378
  });
4365
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
4379
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
4366
4380
  __name: "index",
4367
4381
  props: basicProps$1,
4368
4382
  emits: ["visible-change", "height-change", "cancel", "save", "register", "update:visible"],
@@ -4384,7 +4398,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
4384
4398
  }
4385
4399
  };
4386
4400
  const { getWrapClassName, toggleFullScreen, fullScreenRef } = useFullScreen({
4387
- wrapClassName: computed(() => unref(propsRef).wrapClassName),
4401
+ wrapClassName: computed(() => {
4402
+ var _a;
4403
+ return (_a = unref(propsRef)) == null ? void 0 : _a.wrapClassName;
4404
+ }),
4388
4405
  extHeightRef,
4389
4406
  modalWrapperRef
4390
4407
  });
@@ -4462,7 +4479,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
4462
4479
  return (_ctx, _cache) => {
4463
4480
  return openBlock(), createBlock(unref(Modal), mergeProps(unref(getBindValue), { onCancel: handleCancel }), createSlots({
4464
4481
  default: withCtx(() => [
4465
- createVNode(_sfc_main$O, mergeProps({
4482
+ createVNode(_sfc_main$S, mergeProps({
4466
4483
  useWrapper: unref(getBindValue).useWrapper,
4467
4484
  footerOffset: _ctx.wrapperFooterOffset,
4468
4485
  fullScreen: unref(fullScreenRef),
@@ -4489,7 +4506,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
4489
4506
  !_ctx.$slots.closeIcon ? {
4490
4507
  name: "closeIcon",
4491
4508
  fn: withCtx(() => [
4492
- createVNode(_sfc_main$H, {
4509
+ createVNode(_sfc_main$L, {
4493
4510
  canFullscreen: unref(getBindValue).canFullscreen,
4494
4511
  fullScreen: unref(fullScreenRef),
4495
4512
  onCancel: handleCancel,
@@ -4506,7 +4523,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
4506
4523
  !_ctx.$slots.footer ? {
4507
4524
  name: "footer",
4508
4525
  fn: withCtx(() => [
4509
- createVNode(_sfc_main$I, {
4526
+ createVNode(_sfc_main$M, {
4510
4527
  showSave: unref(getBindValue).showSave,
4511
4528
  onHandleSave: handleSave,
4512
4529
  onHandleCancel: handleCancel
@@ -4749,14 +4766,14 @@ const TableProps = {
4749
4766
  }
4750
4767
  };
4751
4768
  function useRows(propsRef) {
4752
- function getRowClassName(record, index2) {
4769
+ function getRowClassName(record, index) {
4753
4770
  const { striped, rowClassName } = unref(propsRef);
4754
4771
  const classNames = [];
4755
4772
  if (striped) {
4756
- classNames.push(index2 % 2 === 1 ? "table-striped" : "");
4773
+ classNames.push(index % 2 === 1 ? "table-striped" : "");
4757
4774
  }
4758
4775
  if (rowClassName && isFunction(rowClassName)) {
4759
- classNames.push(rowClassName(record, index2));
4776
+ classNames.push(rowClassName(record, index));
4760
4777
  }
4761
4778
  return classNames.join(" ");
4762
4779
  }
@@ -4971,7 +4988,7 @@ function useRowSelection(propsRef, emit) {
4971
4988
  setSelectedRowKeys
4972
4989
  };
4973
4990
  }
4974
- var _sfc_main$F = defineComponent({
4991
+ var _sfc_main$J = defineComponent({
4975
4992
  name: "TableFormat",
4976
4993
  props: {
4977
4994
  column: {
@@ -4990,7 +5007,7 @@ var _sfc_main$F = defineComponent({
4990
5007
  const {
4991
5008
  column,
4992
5009
  record,
4993
- index: index2
5010
+ index
4994
5011
  } = props;
4995
5012
  const {
4996
5013
  render: render2,
@@ -5028,7 +5045,7 @@ var _sfc_main$F = defineComponent({
5028
5045
  renderText.value = text;
5029
5046
  }
5030
5047
  if (isFunction(render2)) {
5031
- let afterRenderData = render2(record, index2, text);
5048
+ let afterRenderData = render2(record, index, text);
5032
5049
  renderText.value = isVnode(afterRenderData) ? createVNode(Fragment, null, [afterRenderData]) : afterRenderData;
5033
5050
  }
5034
5051
  }
@@ -5043,9 +5060,9 @@ function createTableInstance(instance) {
5043
5060
  function getTableInstance() {
5044
5061
  return inject(tableKey);
5045
5062
  }
5046
- const _hoisted_1$n = { class: "dt-table-action-btn" };
5047
- const _hoisted_2$g = ["color", "onClick"];
5048
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
5063
+ const _hoisted_1$r = { class: "dt-table-action-btn" };
5064
+ const _hoisted_2$j = ["color", "onClick"];
5065
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5049
5066
  __name: "TableActions",
5050
5067
  props: {
5051
5068
  fixed: {
@@ -5101,7 +5118,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
5101
5118
  return (_ctx, _cache) => {
5102
5119
  const _directive_icon = resolveDirective("icon");
5103
5120
  return props.expand ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.btns, (item) => {
5104
- return openBlock(), createElementBlock("span", _hoisted_1$n, [
5121
+ return openBlock(), createElementBlock("span", _hoisted_1$r, [
5105
5122
  item.ifShow ? (openBlock(), createBlock(unref(Tooltip), {
5106
5123
  key: 0,
5107
5124
  placement: "bottom"
@@ -5113,7 +5130,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
5113
5130
  withDirectives(createElementVNode("span", {
5114
5131
  color: item.color,
5115
5132
  onClick: ($event) => handleAction(item)
5116
- }, null, 8, _hoisted_2$g), [
5133
+ }, null, 8, _hoisted_2$j), [
5117
5134
  [_directive_icon, item.icon]
5118
5135
  ])
5119
5136
  ]),
@@ -5235,15 +5252,15 @@ function handleIndexColumn(propsRef, getPaginationRef, columns) {
5235
5252
  width: 50,
5236
5253
  title: "\u5E8F\u53F7",
5237
5254
  align: "center",
5238
- customRender: ({ index: index2 }) => {
5255
+ customRender: ({ index }) => {
5239
5256
  const getPagination = unref(getPaginationRef);
5240
5257
  const { appConf } = useAppStore();
5241
5258
  const { defaultPageSize } = appConf.ui.table;
5242
5259
  if (isBoolean(getPagination)) {
5243
- return `${index2 + 1}`;
5260
+ return `${index + 1}`;
5244
5261
  }
5245
5262
  const { current = 1, pageSize = defaultPageSize } = getPagination;
5246
- return ((current < 1 ? 1 : current) - 1) * pageSize + index2 + 1;
5263
+ return ((current < 1 ? 1 : current) - 1) * pageSize + index + 1;
5247
5264
  },
5248
5265
  ...isFixedLeft ? {
5249
5266
  fixed: "left"
@@ -5270,12 +5287,12 @@ function handleActionColumn(propsRef, columns) {
5270
5287
  };
5271
5288
  columns.push({
5272
5289
  ...columnObj,
5273
- customRender: ({ record, index: index2 }) => {
5274
- return h(_sfc_main$E, {
5290
+ customRender: ({ record, index }) => {
5291
+ return h(_sfc_main$I, {
5275
5292
  ...columnObj,
5276
5293
  record,
5277
5294
  align: null,
5278
- index: index2
5295
+ index
5279
5296
  });
5280
5297
  }
5281
5298
  });
@@ -5289,9 +5306,9 @@ function useColumns(propsRef, getPaginationRef) {
5289
5306
  if (!columns)
5290
5307
  return [];
5291
5308
  const { ellipsis, resizable, minWidth = 50, maxWidth = 700 } = unref(propsRef);
5292
- columns.forEach((it, index2) => {
5309
+ columns.forEach((it, index) => {
5293
5310
  const { slots } = it;
5294
- it.width = it.width || (index2 === columns.length - 1 ? 119.9 : 120);
5311
+ it.width = it.width || (index === columns.length - 1 ? 119.9 : 120);
5295
5312
  if (Reflect.has(it, "resizable") ? !!it.resizable : resizable) {
5296
5313
  it.resizable = true;
5297
5314
  it.minWidth = it.minWidth || minWidth;
@@ -5381,18 +5398,18 @@ function useColumns(propsRef, getPaginationRef) {
5381
5398
  getCacheColumns
5382
5399
  };
5383
5400
  }
5384
- const _hoisted_1$m = /* @__PURE__ */ createElementVNode("span", null, "\u5217\u63A7\u5236", -1);
5385
- const _hoisted_2$f = /* @__PURE__ */ createTextVNode(" \u5217\u5C55\u793A ");
5386
- const _hoisted_3$9 = /* @__PURE__ */ createTextVNode(" \u5E8F\u5217\u53F7 ");
5387
- const _hoisted_4$6 = /* @__PURE__ */ createTextVNode(" \u590D\u9009\u6846 ");
5388
- const _hoisted_5$3 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
5401
+ const _hoisted_1$q = /* @__PURE__ */ createElementVNode("span", null, "\u5217\u63A7\u5236", -1);
5402
+ const _hoisted_2$i = /* @__PURE__ */ createTextVNode(" \u5217\u5C55\u793A ");
5403
+ const _hoisted_3$b = /* @__PURE__ */ createTextVNode(" \u5E8F\u5217\u53F7 ");
5404
+ const _hoisted_4$8 = /* @__PURE__ */ createTextVNode(" \u590D\u9009\u6846 ");
5405
+ const _hoisted_5$5 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
5389
5406
  const _hoisted_6$2 = {
5390
5407
  size: 16,
5391
5408
  className: "drag-icon"
5392
5409
  };
5393
5410
  const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("\u56FA\u5B9A\u5230\u5DE6\u4FA7");
5394
5411
  const _hoisted_8$1 = /* @__PURE__ */ createTextVNode("\u56FA\u5B9A\u5230\u53F3\u4FA7");
5395
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
5412
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5396
5413
  __name: "Column",
5397
5414
  emits: [
5398
5415
  "columns-change"
@@ -5528,9 +5545,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5528
5545
  return;
5529
5546
  const columns = getColumns();
5530
5547
  const isFixed = item.fixed === fixed ? false : fixed;
5531
- const index2 = columns.findIndex((col) => col.dataIndex === item.dataIndex);
5532
- if (index2 !== -1) {
5533
- columns[index2].fixed = isFixed;
5548
+ const index = columns.findIndex((col) => col.dataIndex === item.dataIndex);
5549
+ if (index !== -1) {
5550
+ columns[index].fixed = isFixed;
5534
5551
  }
5535
5552
  item.fixed = isFixed;
5536
5553
  if (isFixed && !item.width) {
@@ -5571,7 +5588,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5571
5588
  const _directive_icon = resolveDirective("icon");
5572
5589
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
5573
5590
  title: withCtx(() => [
5574
- _hoisted_1$m
5591
+ _hoisted_1$q
5575
5592
  ]),
5576
5593
  default: withCtx(() => [
5577
5594
  createVNode(unref(Popover), {
@@ -5592,7 +5609,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5592
5609
  onChange: onCheckAllChange
5593
5610
  }, {
5594
5611
  default: withCtx(() => [
5595
- _hoisted_2$f
5612
+ _hoisted_2$i
5596
5613
  ]),
5597
5614
  _: 1
5598
5615
  }, 8, ["indeterminate", "checked"]),
@@ -5602,7 +5619,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5602
5619
  onChange: handleIndexCheckChange
5603
5620
  }, {
5604
5621
  default: withCtx(() => [
5605
- _hoisted_3$9
5622
+ _hoisted_3$b
5606
5623
  ]),
5607
5624
  _: 1
5608
5625
  }, 8, ["checked"]),
@@ -5613,7 +5630,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5613
5630
  disabled: !unref(defaultRowSelection)
5614
5631
  }, {
5615
5632
  default: withCtx(() => [
5616
- _hoisted_4$6
5633
+ _hoisted_4$8
5617
5634
  ]),
5618
5635
  _: 1
5619
5636
  }, 8, ["checked", "disabled"]),
@@ -5623,7 +5640,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5623
5640
  onClick: reset
5624
5641
  }, {
5625
5642
  default: withCtx(() => [
5626
- _hoisted_5$3
5643
+ _hoisted_5$5
5627
5644
  ]),
5628
5645
  _: 1
5629
5646
  })
@@ -5724,10 +5741,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5724
5741
  };
5725
5742
  }
5726
5743
  });
5727
- const _hoisted_1$l = { key: 0 };
5728
- const _hoisted_2$e = { key: 0 };
5729
- const _hoisted_3$8 = { key: 1 };
5730
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
5744
+ const _hoisted_1$p = { key: 0 };
5745
+ const _hoisted_2$h = { key: 0 };
5746
+ const _hoisted_3$a = { key: 1 };
5747
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5731
5748
  __name: "Fullscreen",
5732
5749
  setup(__props) {
5733
5750
  const table = getTableInstance();
@@ -5750,15 +5767,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5750
5767
  const _directive_icon = resolveDirective("icon");
5751
5768
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
5752
5769
  title: withCtx(() => [
5753
- !unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$l, "\u5168\u5C4F")) : createCommentVNode("", true)
5770
+ !unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$p, "\u5168\u5C4F")) : createCommentVNode("", true)
5754
5771
  ]),
5755
5772
  default: withCtx(() => [
5756
5773
  createElementVNode("span", {
5757
5774
  onClick: _cache[0] || (_cache[0] = (...args) => unref(toggle) && unref(toggle)(...args))
5758
5775
  }, [
5759
- !unref(isFullscreen) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$e, null, 512)), [
5776
+ !unref(isFullscreen) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$h, null, 512)), [
5760
5777
  [_directive_icon, "ic:baseline-fullscreen"]
5761
- ]) : withDirectives((openBlock(), createElementBlock("span", _hoisted_3$8, null, 512)), [
5778
+ ]) : withDirectives((openBlock(), createElementBlock("span", _hoisted_3$a, null, 512)), [
5762
5779
  [_directive_icon, "ic:baseline-fullscreen-exit"]
5763
5780
  ])
5764
5781
  ])
@@ -5768,11 +5785,11 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5768
5785
  };
5769
5786
  }
5770
5787
  });
5771
- const _hoisted_1$k = /* @__PURE__ */ createTextVNode("\u5BC6\u5EA6");
5772
- const _hoisted_2$d = /* @__PURE__ */ createElementVNode("span", null, "\u9ED8\u8BA4", -1);
5773
- const _hoisted_3$7 = /* @__PURE__ */ createElementVNode("span", null, "\u4E2D\u7B49", -1);
5774
- const _hoisted_4$5 = /* @__PURE__ */ createElementVNode("span", null, "\u7D27\u51D1", -1);
5775
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
5788
+ const _hoisted_1$o = /* @__PURE__ */ createTextVNode("\u5BC6\u5EA6");
5789
+ const _hoisted_2$g = /* @__PURE__ */ createElementVNode("span", null, "\u9ED8\u8BA4", -1);
5790
+ const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("span", null, "\u4E2D\u7B49", -1);
5791
+ const _hoisted_4$7 = /* @__PURE__ */ createElementVNode("span", null, "\u7D27\u51D1", -1);
5792
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
5776
5793
  __name: "Size",
5777
5794
  setup(__props) {
5778
5795
  const table = getTableInstance();
@@ -5785,7 +5802,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
5785
5802
  const _directive_icon = resolveDirective("icon");
5786
5803
  return openBlock(), createBlock(unref(Tooltip), null, {
5787
5804
  title: withCtx(() => [
5788
- _hoisted_1$k
5805
+ _hoisted_1$o
5789
5806
  ]),
5790
5807
  default: withCtx(() => [
5791
5808
  createVNode(unref(Dropdown), {
@@ -5803,19 +5820,19 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
5803
5820
  default: withCtx(() => [
5804
5821
  createVNode(unref(MenuItem), { key: "default" }, {
5805
5822
  default: withCtx(() => [
5806
- _hoisted_2$d
5823
+ _hoisted_2$g
5807
5824
  ]),
5808
5825
  _: 1
5809
5826
  }),
5810
5827
  createVNode(unref(MenuItem), { key: "middle" }, {
5811
5828
  default: withCtx(() => [
5812
- _hoisted_3$7
5829
+ _hoisted_3$9
5813
5830
  ]),
5814
5831
  _: 1
5815
5832
  }),
5816
5833
  createVNode(unref(MenuItem), { key: "small" }, {
5817
5834
  default: withCtx(() => [
5818
- _hoisted_4$5
5835
+ _hoisted_4$7
5819
5836
  ]),
5820
5837
  _: 1
5821
5838
  })
@@ -5836,11 +5853,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
5836
5853
  };
5837
5854
  }
5838
5855
  });
5839
- const _hoisted_1$j = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA", -1);
5840
- const _hoisted_2$c = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u5F53\u524D\u9875", -1);
5841
- const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u9009\u4E2D\u5217", -1);
5842
- const _hoisted_4$4 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u6240\u6709\u5217", -1);
5843
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
5856
+ const _hoisted_1$n = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA", -1);
5857
+ const _hoisted_2$f = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u5F53\u524D\u9875", -1);
5858
+ const _hoisted_3$8 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u9009\u4E2D\u5217", -1);
5859
+ const _hoisted_4$6 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u6240\u6709\u5217", -1);
5860
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
5844
5861
  __name: "Download",
5845
5862
  setup(__props) {
5846
5863
  const table = getTableInstance();
@@ -5858,7 +5875,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
5858
5875
  const _directive_icon = resolveDirective("icon");
5859
5876
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
5860
5877
  title: withCtx(() => [
5861
- _hoisted_1$j
5878
+ _hoisted_1$n
5862
5879
  ]),
5863
5880
  default: withCtx(() => [
5864
5881
  createVNode(unref(Dropdown), {
@@ -5871,19 +5888,19 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
5871
5888
  default: withCtx(() => [
5872
5889
  createVNode(unref(MenuItem), { key: "current" }, {
5873
5890
  default: withCtx(() => [
5874
- _hoisted_2$c
5891
+ _hoisted_2$f
5875
5892
  ]),
5876
5893
  _: 1
5877
5894
  }),
5878
5895
  createVNode(unref(MenuItem), { key: "select" }, {
5879
5896
  default: withCtx(() => [
5880
- _hoisted_3$6
5897
+ _hoisted_3$8
5881
5898
  ]),
5882
5899
  _: 1
5883
5900
  }),
5884
5901
  createVNode(unref(MenuItem), { key: "all" }, {
5885
5902
  default: withCtx(() => [
5886
- _hoisted_4$4
5903
+ _hoisted_4$6
5887
5904
  ]),
5888
5905
  _: 1
5889
5906
  })
@@ -5904,13 +5921,13 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
5904
5921
  };
5905
5922
  }
5906
5923
  });
5907
- const _sfc_main$z = defineComponent({
5924
+ const _sfc_main$D = defineComponent({
5908
5925
  name: "table-setting",
5909
5926
  components: {
5910
- ColumnSetting: _sfc_main$D,
5911
- FullscreenSetting: _sfc_main$C,
5912
- SizeSetting: _sfc_main$B,
5913
- Download: _sfc_main$A
5927
+ ColumnSetting: _sfc_main$H,
5928
+ FullscreenSetting: _sfc_main$G,
5929
+ SizeSetting: _sfc_main$F,
5930
+ Download: _sfc_main$E
5914
5931
  },
5915
5932
  props: {
5916
5933
  setting: {
@@ -5953,8 +5970,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5953
5970
  _ctx.getSetting.fullscreen ? (openBlock(), createBlock(_component_FullscreenSetting, { key: 3 })) : createCommentVNode("", true)
5954
5971
  ], 64);
5955
5972
  }
5956
- var TableSettinCom = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$2]]);
5957
- const _sfc_main$y = defineComponent({
5973
+ var TableSettinCom = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$2]]);
5974
+ const _sfc_main$C = defineComponent({
5958
5975
  name: "table-header",
5959
5976
  components: {
5960
5977
  TableSettinCom,
@@ -5994,36 +6011,36 @@ const _sfc_main$y = defineComponent({
5994
6011
  };
5995
6012
  }
5996
6013
  });
5997
- const _hoisted_1$i = { class: "dt-table-header" };
5998
- const _hoisted_2$b = { class: "dt-table-header-actions" };
5999
- const _hoisted_3$5 = { class: "dt-table-header-actions__left" };
6000
- const _hoisted_4$3 = { class: "dt-table-header-actions__right" };
6001
- const _hoisted_5$2 = {
6014
+ const _hoisted_1$m = { class: "dt-table-header" };
6015
+ const _hoisted_2$e = { class: "dt-table-header-actions" };
6016
+ const _hoisted_3$7 = { class: "dt-table-header-actions__left" };
6017
+ const _hoisted_4$5 = { class: "dt-table-header-actions__right" };
6018
+ const _hoisted_5$4 = {
6002
6019
  key: 0,
6003
6020
  style: { "margin": "5px" }
6004
6021
  };
6005
6022
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6006
6023
  const _component_FormButtons = resolveComponent("FormButtons");
6007
6024
  const _component_TableSettinCom = resolveComponent("TableSettinCom");
6008
- return openBlock(), createElementBlock("div", _hoisted_1$i, [
6009
- createElementVNode("div", _hoisted_2$b, [
6010
- createElementVNode("div", _hoisted_3$5, [
6025
+ return openBlock(), createElementBlock("div", _hoisted_1$m, [
6026
+ createElementVNode("div", _hoisted_2$e, [
6027
+ createElementVNode("div", _hoisted_3$7, [
6011
6028
  createVNode(_component_FormButtons, mergeProps(_ctx.getActionsProps, { onHandleMethod: _ctx.handleMethod }), null, 16, ["onHandleMethod"]),
6012
6029
  renderSlot(_ctx.$slots, "toolbar")
6013
6030
  ]),
6014
- createElementVNode("div", _hoisted_4$3, [
6031
+ createElementVNode("div", _hoisted_4$5, [
6015
6032
  createVNode(_component_TableSettinCom, {
6016
6033
  setting: _ctx.tableTools,
6017
6034
  onColumnsChange: _ctx.handleColumnChange
6018
6035
  }, null, 8, ["setting", "onColumnsChange"])
6019
6036
  ])
6020
6037
  ]),
6021
- _ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
6038
+ _ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
6022
6039
  renderSlot(_ctx.$slots, "headerTop")
6023
6040
  ])) : createCommentVNode("", true)
6024
6041
  ]);
6025
6042
  }
6026
- var TableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$1]]);
6043
+ var TableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$1]]);
6027
6044
  function useTableHeader(propsRef, slots, handlers) {
6028
6045
  const getHeaderProps = computed(() => {
6029
6046
  const { tableSetting, toolbar } = unref(propsRef);
@@ -6203,12 +6220,12 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
6203
6220
  filterSource
6204
6221
  };
6205
6222
  }
6206
- const _sfc_main$x = defineComponent({
6223
+ const _sfc_main$B = defineComponent({
6207
6224
  name: "dt-table",
6208
6225
  props: TableProps,
6209
6226
  components: {
6210
6227
  Table,
6211
- TableRender: _sfc_main$F
6228
+ TableRender: _sfc_main$J
6212
6229
  },
6213
6230
  emits: [
6214
6231
  "register",
@@ -6316,12 +6333,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6316
6333
  onChange: _ctx.handleTableChange,
6317
6334
  onResizeColumn: _ctx.handleResizeColumn
6318
6335
  }), createSlots({
6319
- bodyCell: withCtx(({ column, record, index: index2 }) => [
6336
+ bodyCell: withCtx(({ column, record, index }) => [
6320
6337
  (column == null ? void 0 : column.render) ? (openBlock(), createBlock(_component_TableRender, {
6321
6338
  key: 0,
6322
6339
  column,
6323
6340
  record,
6324
- index: index2
6341
+ index
6325
6342
  }, null, 8, ["column", "record", "index"])) : createCommentVNode("", true)
6326
6343
  ]),
6327
6344
  _: 2
@@ -6336,20 +6353,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6336
6353
  })
6337
6354
  ]), 1040, ["rowClassName", "onChange", "onResizeColumn"]);
6338
6355
  }
6339
- var index = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render]]);
6356
+ var DtTable = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render]]);
6340
6357
  function useFetch(api, baseUrl = "") {
6341
6358
  function fetch(params = {}) {
6342
- let type, header = {}, model = {}, _api = "";
6359
+ let type, header = {}, model = {};
6343
6360
  if (isString(api)) {
6344
- _api = baseUrl + api;
6361
+ api = baseUrl + api;
6345
6362
  } else {
6346
6363
  type = api.type;
6347
- _api = baseUrl + api.api;
6364
+ if (api.api.indexOf(baseUrl) === -1) {
6365
+ api.api = `${baseUrl}${api.api}`;
6366
+ }
6348
6367
  header = api.header;
6349
6368
  model = api.model;
6350
6369
  }
6351
6370
  return new Promise((resolve, reject) => {
6352
- http[type || "post"](_api, Object.assign({}, model, params), {
6371
+ http[type || "post"](api, Object.assign({}, model, params), {
6353
6372
  ...header,
6354
6373
  ...{ onlyData: false }
6355
6374
  }).then((data) => {
@@ -6396,9 +6415,18 @@ function useSource(opt) {
6396
6415
  const { add, deletes, update, queryById, queryPage } = api;
6397
6416
  const { message } = useMessage();
6398
6417
  const apiFul = {};
6418
+ const apiPath = {};
6399
6419
  for (let it in api) {
6400
6420
  loading["on" + it.slice(0, 1).toUpperCase() + it.slice(1).toLowerCase()] = ref(false);
6401
- apiFul[it] = baseUrl + (isString(api[it]) ? api[it] : api[it].api);
6421
+ if (isString(api[it])) {
6422
+ apiFul[it] = baseUrl + api[it];
6423
+ } else {
6424
+ apiFul[it] = {
6425
+ ...api[it],
6426
+ api: baseUrl + api[it].api
6427
+ };
6428
+ }
6429
+ apiPath[it] = baseUrl + (isString(api[it]) ? api[it] : api[it].api);
6402
6430
  }
6403
6431
  const { appConf } = useAppStore();
6404
6432
  const pagination = ref({
@@ -6415,7 +6443,7 @@ function useSource(opt) {
6415
6443
  },
6416
6444
  orderDTOs: []
6417
6445
  });
6418
- function onSearch(model) {
6446
+ function onSearch(model = {}) {
6419
6447
  baseData.entityDTO = { ...model };
6420
6448
  baseData.pageDTO.pageNo = 0;
6421
6449
  loading.onSearch.value = true;
@@ -6428,12 +6456,20 @@ function useSource(opt) {
6428
6456
  search();
6429
6457
  }
6430
6458
  function onTableChange(params, needSearch = true) {
6431
- const { pagination: pagination2, showBtnLoading, sort = [], filter } = params;
6459
+ const { pagination: pagination2, showBtnLoading, sort, filter: filter2 } = params;
6432
6460
  baseData.pageDTO = {
6433
6461
  pageNo: pagination2.current - 1,
6434
6462
  pageSize: pagination2.pageSize
6435
6463
  };
6436
- baseData.orderDTOs = [];
6464
+ const { field, order } = sort;
6465
+ if (field) {
6466
+ baseData.orderDTOs = [{
6467
+ propertyName: field,
6468
+ dir: order === "ascend" ? "asc" : "desc"
6469
+ }];
6470
+ } else {
6471
+ baseData.orderDTOs = [];
6472
+ }
6437
6473
  if (needSearch)
6438
6474
  search();
6439
6475
  }
@@ -6501,8 +6537,8 @@ function useSource(opt) {
6501
6537
  onDeletes
6502
6538
  };
6503
6539
  return {
6504
- api,
6505
- apiFul,
6540
+ api: apiFul,
6541
+ apiPath,
6506
6542
  form,
6507
6543
  table,
6508
6544
  curd,
@@ -6545,7 +6581,7 @@ const basicProps = {
6545
6581
  type: Object
6546
6582
  }
6547
6583
  };
6548
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
6584
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6549
6585
  __name: "dialog",
6550
6586
  props: {
6551
6587
  ...basicProps,
@@ -6590,7 +6626,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
6590
6626
  }
6591
6627
  }
6592
6628
  return (_ctx, _cache) => {
6593
- return openBlock(), createBlock(unref(_sfc_main$G), {
6629
+ return openBlock(), createBlock(unref(_sfc_main$K), {
6594
6630
  onRegister: unref(registerDialog),
6595
6631
  onSave: handleSave
6596
6632
  }, {
@@ -6615,7 +6651,7 @@ function useCurd(curdOpt) {
6615
6651
  const DtCurdModal = () => {
6616
6652
  return h(createVNode("div", {
6617
6653
  "class": "curdModal"
6618
- }, [createVNode(_sfc_main$w, mergeProps(curdOpt, {
6654
+ }, [createVNode(_sfc_main$A, mergeProps(curdOpt, {
6619
6655
  "formsVal": formsVal,
6620
6656
  "formProps": curdOpt.formProps,
6621
6657
  "onRegister": register
@@ -6681,9 +6717,9 @@ function useCurd(curdOpt) {
6681
6717
  update
6682
6718
  };
6683
6719
  }
6684
- const _hoisted_1$h = { class: "iframe-page" };
6685
- const _hoisted_2$a = ["src"];
6686
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
6720
+ const _hoisted_1$l = { class: "iframe-page" };
6721
+ const _hoisted_2$d = ["src"];
6722
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
6687
6723
  __name: "index",
6688
6724
  props: {
6689
6725
  showLoading: {
@@ -6705,7 +6741,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
6705
6741
  iframeWin.postMessage(props.postMsg, props.src);
6706
6742
  }
6707
6743
  return (_ctx, _cache) => {
6708
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
6744
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
6709
6745
  createVNode(unref(Spin), {
6710
6746
  spinning: loading.value,
6711
6747
  size: "large"
@@ -6717,7 +6753,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
6717
6753
  ref_key: "frameRef",
6718
6754
  ref: frameRef,
6719
6755
  onLoad: _cache[0] || (_cache[0] = ($event) => afterLoaded())
6720
- }, null, 40, _hoisted_2$a)
6756
+ }, null, 40, _hoisted_2$d)
6721
6757
  ]),
6722
6758
  _: 1
6723
6759
  }, 8, ["spinning"])
@@ -6725,29 +6761,1471 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
6725
6761
  };
6726
6762
  }
6727
6763
  });
6728
- function useDialog() {
6729
- function createDialog(component, options) {
6730
- return new Promise((resolve) => {
6731
- const div = document.createElement("div");
6732
- document.body.appendChild(div);
6733
- render$1();
6734
- function render$1() {
6735
- const vm = createVNode(component.children[0]);
6736
- render(vm, div);
6737
- return vm;
6764
+ const basicUploadProps = {
6765
+ showTemplateDownload: {
6766
+ type: Boolean,
6767
+ default: false
6768
+ },
6769
+ templateDownload: {
6770
+ type: Function,
6771
+ default: () => {
6772
+ }
6773
+ },
6774
+ helpText: {
6775
+ type: String,
6776
+ default: ""
6777
+ },
6778
+ multiple: {
6779
+ type: Boolean,
6780
+ default: true
6781
+ },
6782
+ accept: {
6783
+ type: Array,
6784
+ default: () => []
6785
+ },
6786
+ maxSize: {
6787
+ type: Number,
6788
+ default: 2
6789
+ },
6790
+ maxNumber: {
6791
+ type: Number,
6792
+ default: Infinity
6793
+ },
6794
+ defaultFiles: {
6795
+ type: Array,
6796
+ default: []
6797
+ }
6798
+ };
6799
+ function useHelpers(acceptRef, helpTextRef, maxNumberRef, maxSizeRef) {
6800
+ const getAccept = computed(() => {
6801
+ const accept = unref(acceptRef);
6802
+ if (accept && accept.length > 0) {
6803
+ return accept;
6804
+ }
6805
+ return [];
6806
+ });
6807
+ const getStringAccept = computed(() => {
6808
+ return unref(getAccept).map((item) => {
6809
+ if (item.indexOf("/") > 0 || item.startsWith(".")) {
6810
+ return item;
6811
+ }
6812
+ return `.${item}`;
6813
+ }).join(",");
6814
+ });
6815
+ return {
6816
+ getStringAccept
6817
+ };
6818
+ }
6819
+ var sparkMd5 = { exports: {} };
6820
+ (function(module, exports) {
6821
+ (function(factory) {
6822
+ {
6823
+ module.exports = factory();
6824
+ }
6825
+ })(function(undefined$1) {
6826
+ var hex_chr = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
6827
+ function md5cycle(x, k) {
6828
+ var a = x[0], b = x[1], c = x[2], d = x[3];
6829
+ a += (b & c | ~b & d) + k[0] - 680876936 | 0;
6830
+ a = (a << 7 | a >>> 25) + b | 0;
6831
+ d += (a & b | ~a & c) + k[1] - 389564586 | 0;
6832
+ d = (d << 12 | d >>> 20) + a | 0;
6833
+ c += (d & a | ~d & b) + k[2] + 606105819 | 0;
6834
+ c = (c << 17 | c >>> 15) + d | 0;
6835
+ b += (c & d | ~c & a) + k[3] - 1044525330 | 0;
6836
+ b = (b << 22 | b >>> 10) + c | 0;
6837
+ a += (b & c | ~b & d) + k[4] - 176418897 | 0;
6838
+ a = (a << 7 | a >>> 25) + b | 0;
6839
+ d += (a & b | ~a & c) + k[5] + 1200080426 | 0;
6840
+ d = (d << 12 | d >>> 20) + a | 0;
6841
+ c += (d & a | ~d & b) + k[6] - 1473231341 | 0;
6842
+ c = (c << 17 | c >>> 15) + d | 0;
6843
+ b += (c & d | ~c & a) + k[7] - 45705983 | 0;
6844
+ b = (b << 22 | b >>> 10) + c | 0;
6845
+ a += (b & c | ~b & d) + k[8] + 1770035416 | 0;
6846
+ a = (a << 7 | a >>> 25) + b | 0;
6847
+ d += (a & b | ~a & c) + k[9] - 1958414417 | 0;
6848
+ d = (d << 12 | d >>> 20) + a | 0;
6849
+ c += (d & a | ~d & b) + k[10] - 42063 | 0;
6850
+ c = (c << 17 | c >>> 15) + d | 0;
6851
+ b += (c & d | ~c & a) + k[11] - 1990404162 | 0;
6852
+ b = (b << 22 | b >>> 10) + c | 0;
6853
+ a += (b & c | ~b & d) + k[12] + 1804603682 | 0;
6854
+ a = (a << 7 | a >>> 25) + b | 0;
6855
+ d += (a & b | ~a & c) + k[13] - 40341101 | 0;
6856
+ d = (d << 12 | d >>> 20) + a | 0;
6857
+ c += (d & a | ~d & b) + k[14] - 1502002290 | 0;
6858
+ c = (c << 17 | c >>> 15) + d | 0;
6859
+ b += (c & d | ~c & a) + k[15] + 1236535329 | 0;
6860
+ b = (b << 22 | b >>> 10) + c | 0;
6861
+ a += (b & d | c & ~d) + k[1] - 165796510 | 0;
6862
+ a = (a << 5 | a >>> 27) + b | 0;
6863
+ d += (a & c | b & ~c) + k[6] - 1069501632 | 0;
6864
+ d = (d << 9 | d >>> 23) + a | 0;
6865
+ c += (d & b | a & ~b) + k[11] + 643717713 | 0;
6866
+ c = (c << 14 | c >>> 18) + d | 0;
6867
+ b += (c & a | d & ~a) + k[0] - 373897302 | 0;
6868
+ b = (b << 20 | b >>> 12) + c | 0;
6869
+ a += (b & d | c & ~d) + k[5] - 701558691 | 0;
6870
+ a = (a << 5 | a >>> 27) + b | 0;
6871
+ d += (a & c | b & ~c) + k[10] + 38016083 | 0;
6872
+ d = (d << 9 | d >>> 23) + a | 0;
6873
+ c += (d & b | a & ~b) + k[15] - 660478335 | 0;
6874
+ c = (c << 14 | c >>> 18) + d | 0;
6875
+ b += (c & a | d & ~a) + k[4] - 405537848 | 0;
6876
+ b = (b << 20 | b >>> 12) + c | 0;
6877
+ a += (b & d | c & ~d) + k[9] + 568446438 | 0;
6878
+ a = (a << 5 | a >>> 27) + b | 0;
6879
+ d += (a & c | b & ~c) + k[14] - 1019803690 | 0;
6880
+ d = (d << 9 | d >>> 23) + a | 0;
6881
+ c += (d & b | a & ~b) + k[3] - 187363961 | 0;
6882
+ c = (c << 14 | c >>> 18) + d | 0;
6883
+ b += (c & a | d & ~a) + k[8] + 1163531501 | 0;
6884
+ b = (b << 20 | b >>> 12) + c | 0;
6885
+ a += (b & d | c & ~d) + k[13] - 1444681467 | 0;
6886
+ a = (a << 5 | a >>> 27) + b | 0;
6887
+ d += (a & c | b & ~c) + k[2] - 51403784 | 0;
6888
+ d = (d << 9 | d >>> 23) + a | 0;
6889
+ c += (d & b | a & ~b) + k[7] + 1735328473 | 0;
6890
+ c = (c << 14 | c >>> 18) + d | 0;
6891
+ b += (c & a | d & ~a) + k[12] - 1926607734 | 0;
6892
+ b = (b << 20 | b >>> 12) + c | 0;
6893
+ a += (b ^ c ^ d) + k[5] - 378558 | 0;
6894
+ a = (a << 4 | a >>> 28) + b | 0;
6895
+ d += (a ^ b ^ c) + k[8] - 2022574463 | 0;
6896
+ d = (d << 11 | d >>> 21) + a | 0;
6897
+ c += (d ^ a ^ b) + k[11] + 1839030562 | 0;
6898
+ c = (c << 16 | c >>> 16) + d | 0;
6899
+ b += (c ^ d ^ a) + k[14] - 35309556 | 0;
6900
+ b = (b << 23 | b >>> 9) + c | 0;
6901
+ a += (b ^ c ^ d) + k[1] - 1530992060 | 0;
6902
+ a = (a << 4 | a >>> 28) + b | 0;
6903
+ d += (a ^ b ^ c) + k[4] + 1272893353 | 0;
6904
+ d = (d << 11 | d >>> 21) + a | 0;
6905
+ c += (d ^ a ^ b) + k[7] - 155497632 | 0;
6906
+ c = (c << 16 | c >>> 16) + d | 0;
6907
+ b += (c ^ d ^ a) + k[10] - 1094730640 | 0;
6908
+ b = (b << 23 | b >>> 9) + c | 0;
6909
+ a += (b ^ c ^ d) + k[13] + 681279174 | 0;
6910
+ a = (a << 4 | a >>> 28) + b | 0;
6911
+ d += (a ^ b ^ c) + k[0] - 358537222 | 0;
6912
+ d = (d << 11 | d >>> 21) + a | 0;
6913
+ c += (d ^ a ^ b) + k[3] - 722521979 | 0;
6914
+ c = (c << 16 | c >>> 16) + d | 0;
6915
+ b += (c ^ d ^ a) + k[6] + 76029189 | 0;
6916
+ b = (b << 23 | b >>> 9) + c | 0;
6917
+ a += (b ^ c ^ d) + k[9] - 640364487 | 0;
6918
+ a = (a << 4 | a >>> 28) + b | 0;
6919
+ d += (a ^ b ^ c) + k[12] - 421815835 | 0;
6920
+ d = (d << 11 | d >>> 21) + a | 0;
6921
+ c += (d ^ a ^ b) + k[15] + 530742520 | 0;
6922
+ c = (c << 16 | c >>> 16) + d | 0;
6923
+ b += (c ^ d ^ a) + k[2] - 995338651 | 0;
6924
+ b = (b << 23 | b >>> 9) + c | 0;
6925
+ a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;
6926
+ a = (a << 6 | a >>> 26) + b | 0;
6927
+ d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;
6928
+ d = (d << 10 | d >>> 22) + a | 0;
6929
+ c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;
6930
+ c = (c << 15 | c >>> 17) + d | 0;
6931
+ b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;
6932
+ b = (b << 21 | b >>> 11) + c | 0;
6933
+ a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;
6934
+ a = (a << 6 | a >>> 26) + b | 0;
6935
+ d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;
6936
+ d = (d << 10 | d >>> 22) + a | 0;
6937
+ c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;
6938
+ c = (c << 15 | c >>> 17) + d | 0;
6939
+ b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;
6940
+ b = (b << 21 | b >>> 11) + c | 0;
6941
+ a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;
6942
+ a = (a << 6 | a >>> 26) + b | 0;
6943
+ d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;
6944
+ d = (d << 10 | d >>> 22) + a | 0;
6945
+ c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;
6946
+ c = (c << 15 | c >>> 17) + d | 0;
6947
+ b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;
6948
+ b = (b << 21 | b >>> 11) + c | 0;
6949
+ a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;
6950
+ a = (a << 6 | a >>> 26) + b | 0;
6951
+ d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;
6952
+ d = (d << 10 | d >>> 22) + a | 0;
6953
+ c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;
6954
+ c = (c << 15 | c >>> 17) + d | 0;
6955
+ b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;
6956
+ b = (b << 21 | b >>> 11) + c | 0;
6957
+ x[0] = a + x[0] | 0;
6958
+ x[1] = b + x[1] | 0;
6959
+ x[2] = c + x[2] | 0;
6960
+ x[3] = d + x[3] | 0;
6961
+ }
6962
+ function md5blk(s) {
6963
+ var md5blks = [], i;
6964
+ for (i = 0; i < 64; i += 4) {
6965
+ md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
6966
+ }
6967
+ return md5blks;
6968
+ }
6969
+ function md5blk_array(a) {
6970
+ var md5blks = [], i;
6971
+ for (i = 0; i < 64; i += 4) {
6972
+ md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);
6973
+ }
6974
+ return md5blks;
6975
+ }
6976
+ function md51(s) {
6977
+ var n = s.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp, lo, hi;
6978
+ for (i = 64; i <= n; i += 64) {
6979
+ md5cycle(state, md5blk(s.substring(i - 64, i)));
6980
+ }
6981
+ s = s.substring(i - 64);
6982
+ length = s.length;
6983
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
6984
+ for (i = 0; i < length; i += 1) {
6985
+ tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
6986
+ }
6987
+ tail[i >> 2] |= 128 << (i % 4 << 3);
6988
+ if (i > 55) {
6989
+ md5cycle(state, tail);
6990
+ for (i = 0; i < 16; i += 1) {
6991
+ tail[i] = 0;
6992
+ }
6993
+ }
6994
+ tmp = n * 8;
6995
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
6996
+ lo = parseInt(tmp[2], 16);
6997
+ hi = parseInt(tmp[1], 16) || 0;
6998
+ tail[14] = lo;
6999
+ tail[15] = hi;
7000
+ md5cycle(state, tail);
7001
+ return state;
7002
+ }
7003
+ function md51_array(a) {
7004
+ var n = a.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp, lo, hi;
7005
+ for (i = 64; i <= n; i += 64) {
7006
+ md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
7007
+ }
7008
+ a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);
7009
+ length = a.length;
7010
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
7011
+ for (i = 0; i < length; i += 1) {
7012
+ tail[i >> 2] |= a[i] << (i % 4 << 3);
7013
+ }
7014
+ tail[i >> 2] |= 128 << (i % 4 << 3);
7015
+ if (i > 55) {
7016
+ md5cycle(state, tail);
7017
+ for (i = 0; i < 16; i += 1) {
7018
+ tail[i] = 0;
7019
+ }
7020
+ }
7021
+ tmp = n * 8;
7022
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
7023
+ lo = parseInt(tmp[2], 16);
7024
+ hi = parseInt(tmp[1], 16) || 0;
7025
+ tail[14] = lo;
7026
+ tail[15] = hi;
7027
+ md5cycle(state, tail);
7028
+ return state;
7029
+ }
7030
+ function rhex(n) {
7031
+ var s = "", j;
7032
+ for (j = 0; j < 4; j += 1) {
7033
+ s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];
7034
+ }
7035
+ return s;
7036
+ }
7037
+ function hex(x) {
7038
+ var i;
7039
+ for (i = 0; i < x.length; i += 1) {
7040
+ x[i] = rhex(x[i]);
7041
+ }
7042
+ return x.join("");
7043
+ }
7044
+ if (hex(md51("hello")) !== "5d41402abc4b2a76b9719d911017c592")
7045
+ ;
7046
+ if (typeof ArrayBuffer !== "undefined" && !ArrayBuffer.prototype.slice) {
7047
+ (function() {
7048
+ function clamp(val, length) {
7049
+ val = val | 0 || 0;
7050
+ if (val < 0) {
7051
+ return Math.max(val + length, 0);
7052
+ }
7053
+ return Math.min(val, length);
7054
+ }
7055
+ ArrayBuffer.prototype.slice = function(from, to) {
7056
+ var length = this.byteLength, begin = clamp(from, length), end = length, num, target, targetArray, sourceArray;
7057
+ if (to !== undefined$1) {
7058
+ end = clamp(to, length);
7059
+ }
7060
+ if (begin > end) {
7061
+ return new ArrayBuffer(0);
7062
+ }
7063
+ num = end - begin;
7064
+ target = new ArrayBuffer(num);
7065
+ targetArray = new Uint8Array(target);
7066
+ sourceArray = new Uint8Array(this, begin, num);
7067
+ targetArray.set(sourceArray);
7068
+ return target;
7069
+ };
7070
+ })();
7071
+ }
7072
+ function toUtf8(str) {
7073
+ if (/[\u0080-\uFFFF]/.test(str)) {
7074
+ str = unescape(encodeURIComponent(str));
7075
+ }
7076
+ return str;
7077
+ }
7078
+ function utf8Str2ArrayBuffer(str, returnUInt8Array) {
7079
+ var length = str.length, buff = new ArrayBuffer(length), arr = new Uint8Array(buff), i;
7080
+ for (i = 0; i < length; i += 1) {
7081
+ arr[i] = str.charCodeAt(i);
7082
+ }
7083
+ return returnUInt8Array ? arr : buff;
7084
+ }
7085
+ function arrayBuffer2Utf8Str(buff) {
7086
+ return String.fromCharCode.apply(null, new Uint8Array(buff));
7087
+ }
7088
+ function concatenateArrayBuffers(first, second, returnUInt8Array) {
7089
+ var result = new Uint8Array(first.byteLength + second.byteLength);
7090
+ result.set(new Uint8Array(first));
7091
+ result.set(new Uint8Array(second), first.byteLength);
7092
+ return returnUInt8Array ? result : result.buffer;
7093
+ }
7094
+ function hexToBinaryString(hex2) {
7095
+ var bytes = [], length = hex2.length, x;
7096
+ for (x = 0; x < length - 1; x += 2) {
7097
+ bytes.push(parseInt(hex2.substr(x, 2), 16));
7098
+ }
7099
+ return String.fromCharCode.apply(String, bytes);
7100
+ }
7101
+ function SparkMD5() {
7102
+ this.reset();
7103
+ }
7104
+ SparkMD5.prototype.append = function(str) {
7105
+ this.appendBinary(toUtf8(str));
7106
+ return this;
7107
+ };
7108
+ SparkMD5.prototype.appendBinary = function(contents) {
7109
+ this._buff += contents;
7110
+ this._length += contents.length;
7111
+ var length = this._buff.length, i;
7112
+ for (i = 64; i <= length; i += 64) {
7113
+ md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));
7114
+ }
7115
+ this._buff = this._buff.substring(i - 64);
7116
+ return this;
7117
+ };
7118
+ SparkMD5.prototype.end = function(raw) {
7119
+ var buff = this._buff, length = buff.length, i, tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ret;
7120
+ for (i = 0; i < length; i += 1) {
7121
+ tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);
7122
+ }
7123
+ this._finish(tail, length);
7124
+ ret = hex(this._hash);
7125
+ if (raw) {
7126
+ ret = hexToBinaryString(ret);
7127
+ }
7128
+ this.reset();
7129
+ return ret;
7130
+ };
7131
+ SparkMD5.prototype.reset = function() {
7132
+ this._buff = "";
7133
+ this._length = 0;
7134
+ this._hash = [1732584193, -271733879, -1732584194, 271733878];
7135
+ return this;
7136
+ };
7137
+ SparkMD5.prototype.getState = function() {
7138
+ return {
7139
+ buff: this._buff,
7140
+ length: this._length,
7141
+ hash: this._hash.slice()
7142
+ };
7143
+ };
7144
+ SparkMD5.prototype.setState = function(state) {
7145
+ this._buff = state.buff;
7146
+ this._length = state.length;
7147
+ this._hash = state.hash;
7148
+ return this;
7149
+ };
7150
+ SparkMD5.prototype.destroy = function() {
7151
+ delete this._hash;
7152
+ delete this._buff;
7153
+ delete this._length;
7154
+ };
7155
+ SparkMD5.prototype._finish = function(tail, length) {
7156
+ var i = length, tmp, lo, hi;
7157
+ tail[i >> 2] |= 128 << (i % 4 << 3);
7158
+ if (i > 55) {
7159
+ md5cycle(this._hash, tail);
7160
+ for (i = 0; i < 16; i += 1) {
7161
+ tail[i] = 0;
7162
+ }
7163
+ }
7164
+ tmp = this._length * 8;
7165
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
7166
+ lo = parseInt(tmp[2], 16);
7167
+ hi = parseInt(tmp[1], 16) || 0;
7168
+ tail[14] = lo;
7169
+ tail[15] = hi;
7170
+ md5cycle(this._hash, tail);
7171
+ };
7172
+ SparkMD5.hash = function(str, raw) {
7173
+ return SparkMD5.hashBinary(toUtf8(str), raw);
7174
+ };
7175
+ SparkMD5.hashBinary = function(content, raw) {
7176
+ var hash = md51(content), ret = hex(hash);
7177
+ return raw ? hexToBinaryString(ret) : ret;
7178
+ };
7179
+ SparkMD5.ArrayBuffer = function() {
7180
+ this.reset();
7181
+ };
7182
+ SparkMD5.ArrayBuffer.prototype.append = function(arr) {
7183
+ var buff = concatenateArrayBuffers(this._buff.buffer, arr, true), length = buff.length, i;
7184
+ this._length += arr.byteLength;
7185
+ for (i = 64; i <= length; i += 64) {
7186
+ md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));
7187
+ }
7188
+ this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);
7189
+ return this;
7190
+ };
7191
+ SparkMD5.ArrayBuffer.prototype.end = function(raw) {
7192
+ var buff = this._buff, length = buff.length, tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], i, ret;
7193
+ for (i = 0; i < length; i += 1) {
7194
+ tail[i >> 2] |= buff[i] << (i % 4 << 3);
7195
+ }
7196
+ this._finish(tail, length);
7197
+ ret = hex(this._hash);
7198
+ if (raw) {
7199
+ ret = hexToBinaryString(ret);
7200
+ }
7201
+ this.reset();
7202
+ return ret;
7203
+ };
7204
+ SparkMD5.ArrayBuffer.prototype.reset = function() {
7205
+ this._buff = new Uint8Array(0);
7206
+ this._length = 0;
7207
+ this._hash = [1732584193, -271733879, -1732584194, 271733878];
7208
+ return this;
7209
+ };
7210
+ SparkMD5.ArrayBuffer.prototype.getState = function() {
7211
+ var state = SparkMD5.prototype.getState.call(this);
7212
+ state.buff = arrayBuffer2Utf8Str(state.buff);
7213
+ return state;
7214
+ };
7215
+ SparkMD5.ArrayBuffer.prototype.setState = function(state) {
7216
+ state.buff = utf8Str2ArrayBuffer(state.buff, true);
7217
+ return SparkMD5.prototype.setState.call(this, state);
7218
+ };
7219
+ SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;
7220
+ SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;
7221
+ SparkMD5.ArrayBuffer.hash = function(arr, raw) {
7222
+ var hash = md51_array(new Uint8Array(arr)), ret = hex(hash);
7223
+ return raw ? hexToBinaryString(ret) : ret;
7224
+ };
7225
+ return SparkMD5;
7226
+ });
7227
+ })(sparkMd5);
7228
+ const _hoisted_1$k = { class: "file-header" };
7229
+ const _hoisted_2$c = /* @__PURE__ */ createTextVNode(" \u6587\u4EF6\u4E0A\u4F20 ");
7230
+ const _hoisted_3$6 = /* @__PURE__ */ createTextVNode(" \u6A21\u677F\u4E0B\u8F7D ");
7231
+ const _hoisted_4$4 = { class: "file-type-tips ant-alert-info" };
7232
+ const _hoisted_5$3 = /* @__PURE__ */ createElementVNode("i", null, "\u8BF7\u4E0A\u4F20pptx\u3001doc\u3001jpg\u3001jpeg\u3001png\u3001bmp\u3001gif\u3001xls\u3001xlsx\u3001txt\u3001rar\u3001zip\u30017z\u3001tar\u3001gz\u683C\u5F0F\u6587\u4EF6", -1);
7233
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7234
+ __name: "upload",
7235
+ props: basicUploadProps,
7236
+ setup(__props, { expose }) {
7237
+ const props = __props;
7238
+ const { message } = useMessage();
7239
+ const filesRef = ref([]);
7240
+ const historyFilesRef = ref([]);
7241
+ const allFilesRef = ref([]);
7242
+ const imgVisable = ref(false);
7243
+ const setImgVisible = (value) => imgVisable.value = value;
7244
+ const { accept, helpText, maxNumber, maxSize } = toRefs(props);
7245
+ const { getStringAccept } = useHelpers(accept);
7246
+ const [registerTable, {}] = useTable({
7247
+ tableSetting: false,
7248
+ pagination: false,
7249
+ dataSource: allFilesRef,
7250
+ columns: [
7251
+ { title: "\u6587\u4EF6\u540D\u79F0", dataIndex: "fileName" },
7252
+ { title: "\u4E0A\u4F20\u72B6\u6001", dataIndex: "fileStatue", render(row) {
7253
+ return h("span", {
7254
+ style: `color: ${row.status === 0 ? "orange" : "green"}`
7255
+ }, row.fileStatue);
7256
+ } }
7257
+ ],
7258
+ operations: {
7259
+ expand: true,
7260
+ btns: [
7261
+ {
7262
+ title: "\u9884\u89C8",
7263
+ icon: "ic:baseline-remove-red-eye",
7264
+ ifShow(row) {
7265
+ const supportFileTypes = ["pdf", "jpg", "jpeg", "png", "bmp", "gif"];
7266
+ return supportFileTypes.includes(row.fileName.split(".").pop());
7267
+ },
7268
+ action: () => {
7269
+ setImgVisible(true);
7270
+ }
7271
+ },
7272
+ { title: "\u7F16\u8F91", icon: "mdi:text-box-edit-outline" },
7273
+ { title: "\u5220\u9664", icon: "mdi:delete-outline" }
7274
+ ]
7275
+ }
7276
+ });
7277
+ watchEffect(() => {
7278
+ historyFilesRef.value = props.defaultFiles.map((file) => {
7279
+ return {
7280
+ ...file,
7281
+ fileName: file.fileName,
7282
+ status: 0,
7283
+ fileStatue: "\u5386\u53F2\u4E0A\u4F20"
7284
+ };
7285
+ });
7286
+ allFilesRef.value = [...historyFilesRef.value, ...filesRef.value];
7287
+ });
7288
+ function beforeUpload(file) {
7289
+ const { maxSize: maxSize2 } = props;
7290
+ if (maxSize2 && file.size / 1024 / 1024 >= maxSize2) {
7291
+ message.error(`\u53EA\u80FD\u4E0A\u4F20\u4E0D\u8D85\u8FC7${maxSize2}MB\u7684\u6587\u4EF6!`);
7292
+ return false;
7293
+ }
7294
+ addFile(file);
7295
+ return false;
7296
+ }
7297
+ function addFile(file) {
7298
+ let blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
7299
+ let chunkSize = 2097152, chunks = Math.ceil(file.size / chunkSize), currentChunk = 0, spark = new sparkMd5.exports.ArrayBuffer(), fileReader = new FileReader();
7300
+ fileReader.onload = function(e) {
7301
+ spark.append(e.target["result"]);
7302
+ currentChunk++;
7303
+ if (currentChunk < chunks) {
7304
+ loadNext();
7305
+ } else {
7306
+ filesRef.value.push({
7307
+ fileName: file.name,
7308
+ fileId: spark.end(),
7309
+ file,
7310
+ status: 1,
7311
+ fileStatue: "\u5F85\u4E0A\u4F20"
7312
+ });
7313
+ }
7314
+ };
7315
+ function loadNext() {
7316
+ var start = currentChunk * chunkSize, end = start + chunkSize >= file.size ? file.size : start + chunkSize;
7317
+ fileReader.readAsArrayBuffer(blobSlice.call(file, start, end));
7318
+ }
7319
+ loadNext();
7320
+ }
7321
+ expose({
7322
+ allFilesRef
7323
+ });
7324
+ return (_ctx, _cache) => {
7325
+ const _directive_icon = resolveDirective("icon");
7326
+ return openBlock(), createElementBlock(Fragment, null, [
7327
+ createElementVNode("div", _hoisted_1$k, [
7328
+ createElementVNode("div", null, [
7329
+ createVNode(unref(Upload), {
7330
+ accept: unref(getStringAccept),
7331
+ multiple: _ctx.multiple,
7332
+ "before-upload": beforeUpload,
7333
+ "show-upload-list": false
7334
+ }, {
7335
+ default: withCtx(() => [
7336
+ createVNode(unref(Button), { type: "primary" }, {
7337
+ default: withCtx(() => [
7338
+ withDirectives(createElementVNode("span", null, null, 512), [
7339
+ [_directive_icon, "ic:baseline-file-upload"]
7340
+ ]),
7341
+ _hoisted_2$c
7342
+ ]),
7343
+ _: 1
7344
+ })
7345
+ ]),
7346
+ _: 1
7347
+ }, 8, ["accept", "multiple"]),
7348
+ _ctx.showTemplateDownload ? (openBlock(), createBlock(unref(Button), {
7349
+ key: 0,
7350
+ type: "primary",
7351
+ onClick: _ctx.templateDownload
7352
+ }, {
7353
+ default: withCtx(() => [
7354
+ withDirectives(createElementVNode("span", null, null, 512), [
7355
+ [_directive_icon, "ic:baseline-file-download"]
7356
+ ]),
7357
+ _hoisted_3$6
7358
+ ]),
7359
+ _: 1
7360
+ }, 8, ["onClick"])) : createCommentVNode("", true)
7361
+ ]),
7362
+ renderSlot(_ctx.$slots, "default")
7363
+ ]),
7364
+ createElementVNode("div", _hoisted_4$4, [
7365
+ withDirectives(createElementVNode("span", null, null, 512), [
7366
+ [_directive_icon, "ant-design:info-circle-outlined"]
7367
+ ]),
7368
+ _hoisted_5$3
7369
+ ]),
7370
+ createVNode(unref(DtTable), { onRegister: unref(registerTable) }, null, 8, ["onRegister"]),
7371
+ createVNode(unref(Image), {
7372
+ width: 200,
7373
+ style: { display: "none" },
7374
+ preview: {
7375
+ visible: imgVisable.value,
7376
+ onVisibleChange: setImgVisible
7377
+ },
7378
+ src: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
7379
+ }, null, 8, ["preview"])
7380
+ ], 64);
7381
+ };
7382
+ }
7383
+ });
7384
+ const _hoisted_1$j = { class: "dt-upload-wrap" };
7385
+ const _hoisted_2$b = /* @__PURE__ */ createTextVNode(" 111 ");
7386
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
7387
+ __name: "index",
7388
+ emits: ["register"],
7389
+ setup(__props, { emit: emites }) {
7390
+ const uploadRef = ref(null);
7391
+ const [register] = useModal({
7392
+ width: "700px",
7393
+ title: "\u6587\u4EF6\u4E0A\u4F20",
7394
+ maskClosable: false
7395
+ });
7396
+ const defaultFiles = [
7397
+ { fileName: "\u53EE\u549A\u53D1\u7968667.09.pdf", fileId: "1" }
7398
+ ];
7399
+ function handleSave() {
7400
+ console.log(uploadRef.value.allFilesRef);
7401
+ alert("s-s-s-");
7402
+ }
7403
+ return (_ctx, _cache) => {
7404
+ return openBlock(), createBlock(unref(_sfc_main$K), {
7405
+ onSave: _cache[0] || (_cache[0] = ($event) => handleSave()),
7406
+ onRegister: unref(register)
7407
+ }, {
7408
+ default: withCtx(() => [
7409
+ createElementVNode("div", _hoisted_1$j, [
7410
+ createVNode(_sfc_main$y, {
7411
+ ref_key: "uploadRef",
7412
+ ref: uploadRef,
7413
+ defaultFiles
7414
+ }, {
7415
+ default: withCtx(() => [
7416
+ _hoisted_2$b
7417
+ ]),
7418
+ _: 1
7419
+ }, 512)
7420
+ ])
7421
+ ]),
7422
+ _: 1
7423
+ }, 8, ["onRegister"]);
7424
+ };
7425
+ }
7426
+ });
7427
+ const BasicProps = {
7428
+ loading: {
7429
+ type: Boolean,
7430
+ default: false
7431
+ },
7432
+ checkStrictly: Boolean,
7433
+ expandedKeys: {
7434
+ type: Array,
7435
+ default: () => []
7436
+ },
7437
+ selectedKeys: {
7438
+ type: Array,
7439
+ default: () => []
7440
+ },
7441
+ checkedKeys: {
7442
+ type: Array,
7443
+ default: () => []
7444
+ },
7445
+ fieldNames: {
7446
+ type: Object
7447
+ },
7448
+ beforeRightClick: {
7449
+ type: Function,
7450
+ default: void 0
7451
+ },
7452
+ rightMenuList: {
7453
+ type: Array
7454
+ },
7455
+ renderIcon: {
7456
+ type: Function
7457
+ },
7458
+ highlight: {
7459
+ type: [Boolean, String],
7460
+ default: false
7461
+ },
7462
+ actionList: {
7463
+ type: Array,
7464
+ default: () => []
7465
+ },
7466
+ clickRowToExpand: {
7467
+ type: Boolean,
7468
+ default: false
7469
+ },
7470
+ searchValue: {
7471
+ type: String,
7472
+ default: ""
7473
+ },
7474
+ filterFn: {
7475
+ type: Function,
7476
+ default: void 0
7477
+ },
7478
+ checkable: Boolean,
7479
+ expandOnSearch: Boolean,
7480
+ checkOnSearch: Boolean,
7481
+ selectedOnSearch: Boolean,
7482
+ treeData: {
7483
+ type: Array
7484
+ },
7485
+ value: {
7486
+ type: [Object, Array]
7487
+ },
7488
+ title: {
7489
+ type: String,
7490
+ default: ""
7491
+ },
7492
+ toolbar: Boolean,
7493
+ search: Boolean
7494
+ };
7495
+ const searchProps = {
7496
+ title: {
7497
+ type: String,
7498
+ default: ""
7499
+ },
7500
+ toolbar: {
7501
+ type: Boolean,
7502
+ default: false
7503
+ },
7504
+ checkable: {
7505
+ type: Boolean,
7506
+ default: false
7507
+ },
7508
+ search: {
7509
+ type: Boolean,
7510
+ default: false
7511
+ },
7512
+ searchText: {
7513
+ type: String,
7514
+ default: ""
7515
+ },
7516
+ checkAll: {
7517
+ type: Function,
7518
+ default: void 0
7519
+ },
7520
+ expandAll: {
7521
+ type: Function,
7522
+ default: void 0
7523
+ }
7524
+ };
7525
+ var ToolbarEnum = /* @__PURE__ */ ((ToolbarEnum2) => {
7526
+ ToolbarEnum2[ToolbarEnum2["SELECT_ALL"] = 0] = "SELECT_ALL";
7527
+ ToolbarEnum2[ToolbarEnum2["UN_SELECT_ALL"] = 1] = "UN_SELECT_ALL";
7528
+ ToolbarEnum2[ToolbarEnum2["EXPAND_ALL"] = 2] = "EXPAND_ALL";
7529
+ ToolbarEnum2[ToolbarEnum2["UN_EXPAND_ALL"] = 3] = "UN_EXPAND_ALL";
7530
+ ToolbarEnum2[ToolbarEnum2["CHECK_STRICTLY"] = 4] = "CHECK_STRICTLY";
7531
+ ToolbarEnum2[ToolbarEnum2["CHECK_UN_STRICTLY"] = 5] = "CHECK_UN_STRICTLY";
7532
+ return ToolbarEnum2;
7533
+ })(ToolbarEnum || {});
7534
+ const _hoisted_1$i = { class: "dt-tree-header" };
7535
+ const _hoisted_2$a = {
7536
+ key: 1,
7537
+ class: "headerTitle"
7538
+ };
7539
+ const _hoisted_3$5 = {
7540
+ key: 2,
7541
+ class: "dt-tree-search"
7542
+ };
7543
+ const _hoisted_4$3 = {
7544
+ key: 0,
7545
+ class: "dt-tree-search-input"
7546
+ };
7547
+ const _hoisted_5$2 = /* @__PURE__ */ createElementVNode("i", { class: "i ic:baseline-more-vert" }, null, -1);
7548
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
7549
+ __name: "treeHeader",
7550
+ props: searchProps,
7551
+ emits: [
7552
+ "search",
7553
+ "strictly-change",
7554
+ "strictly-change"
7555
+ ],
7556
+ setup(__props, { emit: emits }) {
7557
+ const props = __props;
7558
+ const slots = useSlots$1();
7559
+ const searchValue = ref("");
7560
+ function emitChange(value) {
7561
+ emits("search", value);
7562
+ }
7563
+ function handleMenuClick(e) {
7564
+ var _a, _b, _c, _d;
7565
+ const { key } = e;
7566
+ switch (key) {
7567
+ case ToolbarEnum.SELECT_ALL:
7568
+ (_a = props.checkAll) == null ? void 0 : _a.call(props, true);
7569
+ break;
7570
+ case ToolbarEnum.UN_SELECT_ALL:
7571
+ (_b = props.checkAll) == null ? void 0 : _b.call(props, false);
7572
+ break;
7573
+ case ToolbarEnum.EXPAND_ALL:
7574
+ (_c = props.expandAll) == null ? void 0 : _c.call(props, true);
7575
+ break;
7576
+ case ToolbarEnum.UN_EXPAND_ALL:
7577
+ (_d = props.expandAll) == null ? void 0 : _d.call(props, false);
7578
+ break;
7579
+ case ToolbarEnum.CHECK_STRICTLY:
7580
+ emits("strictly-change", false);
7581
+ break;
7582
+ case ToolbarEnum.CHECK_UN_STRICTLY:
7583
+ emits("strictly-change", true);
7584
+ break;
7585
+ }
7586
+ }
7587
+ const toolbarList = computed(() => {
7588
+ const { checkable } = props;
7589
+ const defaultToolbarList = [
7590
+ { label: "\u5C55\u5F00\u5168\u90E8", value: ToolbarEnum.EXPAND_ALL },
7591
+ {
7592
+ label: "\u6298\u53E0\u5168\u90E8",
7593
+ value: ToolbarEnum.UN_EXPAND_ALL,
7594
+ divider: checkable
7595
+ }
7596
+ ];
7597
+ return checkable ? [
7598
+ { label: "\u9009\u62E9\u5168\u90E8", value: ToolbarEnum.SELECT_ALL },
7599
+ {
7600
+ label: "\u53D6\u6D88\u9009\u62E9",
7601
+ value: ToolbarEnum.UN_SELECT_ALL,
7602
+ divider: checkable
7603
+ },
7604
+ ...defaultToolbarList,
7605
+ { label: "\u5C42\u7EA7\u5173\u8054", value: ToolbarEnum.CHECK_STRICTLY },
7606
+ { label: "\u5C42\u7EA7\u72EC\u7ACB", value: ToolbarEnum.CHECK_UN_STRICTLY }
7607
+ ] : defaultToolbarList;
7608
+ });
7609
+ const debounceEmitChange = useDebounceFn(emitChange, 200);
7610
+ watch(() => searchValue.value, (v) => {
7611
+ debounceEmitChange(v);
7612
+ });
7613
+ return (_ctx, _cache) => {
7614
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
7615
+ unref(slots).headerTitle ? renderSlot(_ctx.$slots, "headerTitle", { key: 0 }) : createCommentVNode("", true),
7616
+ !unref(slots).headerTitle && _ctx.title ? (openBlock(), createElementBlock("h4", _hoisted_2$a, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
7617
+ _ctx.search || _ctx.toolbar ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
7618
+ _ctx.search ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
7619
+ createVNode(unref(InputSearch), {
7620
+ size: "small",
7621
+ allowClear: "",
7622
+ value: searchValue.value,
7623
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event),
7624
+ placeholder: "\u641C\u7D22"
7625
+ }, null, 8, ["value"])
7626
+ ])) : createCommentVNode("", true),
7627
+ _ctx.toolbar ? (openBlock(), createBlock(unref(Dropdown), {
7628
+ key: 1,
7629
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {
7630
+ }, ["prevent"]))
7631
+ }, {
7632
+ overlay: withCtx(() => [
7633
+ createVNode(unref(Menu), { onClick: handleMenuClick }, {
7634
+ default: withCtx(() => [
7635
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(toolbarList), (item) => {
7636
+ return openBlock(), createElementBlock(Fragment, {
7637
+ key: item.value
7638
+ }, [
7639
+ createVNode(unref(MenuItem), normalizeProps(guardReactiveProps({ key: item.value })), {
7640
+ default: withCtx(() => [
7641
+ createTextVNode(toDisplayString(item.label), 1)
7642
+ ]),
7643
+ _: 2
7644
+ }, 1040),
7645
+ item.divider ? (openBlock(), createBlock(unref(MenuDivider), { key: 0 })) : createCommentVNode("", true)
7646
+ ], 64);
7647
+ }), 128))
7648
+ ]),
7649
+ _: 1
7650
+ })
7651
+ ]),
7652
+ default: withCtx(() => [
7653
+ _hoisted_5$2
7654
+ ]),
7655
+ _: 1
7656
+ })) : createCommentVNode("", true)
7657
+ ])) : createCommentVNode("", true)
7658
+ ]);
7659
+ };
7660
+ }
7661
+ });
7662
+ function eachTree(treeDatas, callBack, parentNode = {}) {
7663
+ treeDatas.forEach((el) => {
7664
+ const newNode = callBack(el, parentNode) || el;
7665
+ if (el.children) {
7666
+ eachTree(el.children, callBack, newNode);
7667
+ }
7668
+ });
7669
+ }
7670
+ function forEach(tree, func, config = {}) {
7671
+ const list = [...tree];
7672
+ const { children = "children" } = config;
7673
+ for (let i = 0; i < list.length; i++) {
7674
+ if (func(list[i])) {
7675
+ return;
7676
+ }
7677
+ children && list[i][children] && list.splice(i + 1, 0, ...list[i][children]);
7678
+ }
7679
+ }
7680
+ function filter(tree, func, config = {}) {
7681
+ const children = config.children || "children";
7682
+ function listFilter(list) {
7683
+ return list.map((node) => ({ ...node })).filter((node) => {
7684
+ node[children] = node[children] && listFilter(node[children]);
7685
+ return func(node) || node[children] && node[children].length;
7686
+ });
7687
+ }
7688
+ return listFilter(tree);
7689
+ }
7690
+ function treeToList(tree, config = {}) {
7691
+ const { children = "children" } = config;
7692
+ const result = [...tree];
7693
+ for (let i = 0; i < result.length; i++) {
7694
+ if (!result[i][children])
7695
+ continue;
7696
+ result.splice(i + 1, 0, ...result[i][children]);
7697
+ }
7698
+ return result;
7699
+ }
7700
+ function useTree(treeDataRef, getFieldNames) {
7701
+ function getAllKeys(list) {
7702
+ const keys = [];
7703
+ const treeData = list || unref(treeDataRef);
7704
+ const { key: keyField, children: childrenField } = unref(getFieldNames);
7705
+ if (!childrenField || !keyField)
7706
+ return keys;
7707
+ for (let index = 0; index < treeData.length; index++) {
7708
+ const node = treeData[index];
7709
+ keys.push(node[keyField]);
7710
+ const children = node[childrenField];
7711
+ if (children && children.length) {
7712
+ keys.push(...getAllKeys(children));
7713
+ }
7714
+ }
7715
+ return keys;
7716
+ }
7717
+ function getEnabledKeys(list) {
7718
+ const keys = [];
7719
+ const treeData = list || unref(treeDataRef);
7720
+ const { key: keyField, children: childrenField } = unref(getFieldNames);
7721
+ if (!childrenField || !keyField)
7722
+ return keys;
7723
+ for (let index = 0; index < treeData.length; index++) {
7724
+ const node = treeData[index];
7725
+ node.disabled !== true && node.selectable !== false && keys.push(node[keyField]);
7726
+ const children = node[childrenField];
7727
+ if (children && children.length) {
7728
+ keys.push(...getEnabledKeys(children));
7729
+ }
7730
+ }
7731
+ return keys;
7732
+ }
7733
+ function getChildrenKeys(nodeKey, list) {
7734
+ const keys = [];
7735
+ const treeData = list || unref(treeDataRef);
7736
+ const { key: keyField, children: childrenField } = unref(getFieldNames);
7737
+ if (!childrenField || !keyField)
7738
+ return keys;
7739
+ for (let index = 0; index < treeData.length; index++) {
7740
+ const node = treeData[index];
7741
+ const children = node[childrenField];
7742
+ if (nodeKey === node[keyField]) {
7743
+ keys.push(node[keyField]);
7744
+ if (children && children.length) {
7745
+ keys.push(...getAllKeys(children));
7746
+ }
7747
+ } else {
7748
+ if (children && children.length) {
7749
+ keys.push(...getChildrenKeys(nodeKey, children));
7750
+ }
7751
+ }
7752
+ }
7753
+ return keys;
7754
+ }
7755
+ function updateNodeByKey(key, node, list) {
7756
+ if (!key)
7757
+ return;
7758
+ const treeData = list || unref(treeDataRef);
7759
+ const { key: keyField, children: childrenField } = unref(getFieldNames);
7760
+ if (!childrenField || !keyField)
7761
+ return;
7762
+ for (let index = 0; index < treeData.length; index++) {
7763
+ const element = treeData[index];
7764
+ const children = element[childrenField];
7765
+ if (element[keyField] === key) {
7766
+ treeData[index] = { ...treeData[index], ...node };
7767
+ break;
7768
+ } else if (children && children.length) {
7769
+ updateNodeByKey(key, node, element[childrenField]);
7770
+ }
7771
+ }
7772
+ }
7773
+ function filterByLevel(level = 1, list, currentLevel = 1) {
7774
+ if (!level)
7775
+ return [];
7776
+ const res = [];
7777
+ const data = list || unref(treeDataRef) || [];
7778
+ for (let index = 0; index < data.length; index++) {
7779
+ const item = data[index];
7780
+ const { key: keyField, children: childrenField } = unref(getFieldNames);
7781
+ const key = keyField ? item[keyField] : "";
7782
+ const children = childrenField ? item[childrenField] : [];
7783
+ res.push(key);
7784
+ if (children && children.length && currentLevel < level) {
7785
+ currentLevel += 1;
7786
+ res.push(...filterByLevel(level, children, currentLevel));
7787
+ }
7788
+ }
7789
+ return res;
7790
+ }
7791
+ function insertNodeByKey({ parentKey = null, node, push = "push" }) {
7792
+ const treeData = cloneDeep(unref(treeDataRef));
7793
+ if (!parentKey) {
7794
+ treeData[push](node);
7795
+ treeDataRef.value = treeData;
7796
+ return;
7797
+ }
7798
+ const { key: keyField, children: childrenField } = unref(getFieldNames);
7799
+ if (!childrenField || !keyField)
7800
+ return;
7801
+ forEach(treeData, (treeItem) => {
7802
+ if (treeItem[keyField] === parentKey) {
7803
+ treeItem[childrenField] = treeItem[childrenField] || [];
7804
+ treeItem[childrenField][push](node);
7805
+ return true;
7806
+ }
7807
+ });
7808
+ treeDataRef.value = treeData;
7809
+ }
7810
+ function insertNodesByKey({ parentKey = null, list, push = "push" }) {
7811
+ const treeData = cloneDeep(unref(treeDataRef));
7812
+ if (!list || list.length < 1)
7813
+ return;
7814
+ if (!parentKey) {
7815
+ for (let i = 0; i < list.length; i++) {
7816
+ treeData[push](list[i]);
7817
+ }
7818
+ } else {
7819
+ const { key: keyField, children: childrenField } = unref(getFieldNames);
7820
+ if (!childrenField || !keyField)
7821
+ return;
7822
+ forEach(treeData, (treeItem) => {
7823
+ if (treeItem[keyField] === parentKey) {
7824
+ treeItem[childrenField] = treeItem[childrenField] || [];
7825
+ for (let i = 0; i < list.length; i++) {
7826
+ treeItem[childrenField][push](list[i]);
7827
+ }
7828
+ treeDataRef.value = treeData;
7829
+ return true;
7830
+ }
7831
+ });
7832
+ }
7833
+ }
7834
+ function deleteNodeByKey(key, list) {
7835
+ if (!key)
7836
+ return;
7837
+ const treeData = list || unref(treeDataRef);
7838
+ const { key: keyField, children: childrenField } = unref(getFieldNames);
7839
+ if (!childrenField || !keyField)
7840
+ return;
7841
+ for (let index = 0; index < treeData.length; index++) {
7842
+ const element = treeData[index];
7843
+ const children = element[childrenField];
7844
+ if (element[keyField] === key) {
7845
+ treeData.splice(index, 1);
7846
+ break;
7847
+ } else if (children && children.length) {
7848
+ deleteNodeByKey(key, element[childrenField]);
7849
+ }
7850
+ }
7851
+ }
7852
+ function getSelectedNode(key, list, selectedNode) {
7853
+ if (!key && key !== 0)
7854
+ return null;
7855
+ const treeData = list || unref(treeDataRef);
7856
+ treeData.forEach((item) => {
7857
+ if ((selectedNode == null ? void 0 : selectedNode.key) || (selectedNode == null ? void 0 : selectedNode.key) === 0)
7858
+ return selectedNode;
7859
+ if (item.key === key) {
7860
+ selectedNode = item;
7861
+ return;
7862
+ }
7863
+ if (item.children && item.children.length) {
7864
+ selectedNode = getSelectedNode(key, item.children, selectedNode);
6738
7865
  }
6739
7866
  });
7867
+ return selectedNode || null;
6740
7868
  }
6741
7869
  return {
6742
- createDialog
7870
+ getAllKeys,
7871
+ getEnabledKeys,
7872
+ getChildrenKeys,
7873
+ updateNodeByKey,
7874
+ filterByLevel,
7875
+ insertNodeByKey,
7876
+ insertNodesByKey,
7877
+ deleteNodeByKey,
7878
+ getSelectedNode
6743
7879
  };
6744
7880
  }
7881
+ const _hoisted_1$h = {
7882
+ class: "dt-tree"
7883
+ };
7884
+ var _sfc_main$v = /* @__PURE__ */ defineComponent({
7885
+ __name: "index",
7886
+ props: BasicProps,
7887
+ emits: ["update:expandedKeys", "update:selectedKeys", "update:value", "check", "change", "clickNode", "update:searchValue"],
7888
+ setup(__props, {
7889
+ expose,
7890
+ emit
7891
+ }) {
7892
+ const props = __props;
7893
+ const attrs = useAttrs$1();
7894
+ const slots = useSlots$1();
7895
+ const {
7896
+ getSlot,
7897
+ extendSlots
7898
+ } = useSlots();
7899
+ const state = reactive({
7900
+ checkStrictly: props.checkStrictly,
7901
+ expandedKeys: props.expandedKeys || [],
7902
+ selectedKeys: props.selectedKeys || [],
7903
+ checkedKeys: props.checkedKeys || []
7904
+ });
7905
+ const searchState = reactive({
7906
+ startSearch: false,
7907
+ searchText: "",
7908
+ searchData: []
7909
+ });
7910
+ const treeDataRef = ref([]);
7911
+ const getFieldNames = computed(() => {
7912
+ const {
7913
+ fieldNames
7914
+ } = props;
7915
+ return {
7916
+ children: "children",
7917
+ title: "title",
7918
+ key: "key",
7919
+ ...fieldNames
7920
+ };
7921
+ });
7922
+ const getTreeData = computed(() => {
7923
+ return searchState.startSearch ? searchState.searchData : unref(treeDataRef);
7924
+ });
7925
+ const getNotFound = computed(() => {
7926
+ return !getTreeData.value || getTreeData.value.length === 0;
7927
+ });
7928
+ const getIcon = (params, icon) => {
7929
+ if (!icon) {
7930
+ if (props.renderIcon && isFunction(props.renderIcon)) {
7931
+ return props.renderIcon(params);
7932
+ }
7933
+ }
7934
+ return icon;
7935
+ };
7936
+ const treeData = computed(() => {
7937
+ const data = cloneDeep(getTreeData.value);
7938
+ eachTree(data, (item, _parent) => {
7939
+ const searchText = searchState.searchText;
7940
+ const {
7941
+ highlight
7942
+ } = unref(props);
7943
+ const {
7944
+ title: titleField,
7945
+ key: keyField,
7946
+ children: childrenField
7947
+ } = unref(getFieldNames);
7948
+ const icon = getIcon(item, item.icon);
7949
+ const title = get(item, titleField);
7950
+ const searchIdx = searchText ? title.indexOf(searchText) : -1;
7951
+ const isHighlight = searchState.startSearch && !isEmpty(searchText) && highlight && searchIdx !== -1;
7952
+ const highlightStyle = `color: ${isBoolean(highlight) ? "#f50" : highlight}`;
7953
+ const titleDom = isHighlight ? createVNode("span", {
7954
+ "class": "tree-content"
7955
+ }, [createVNode("span", null, [title.substr(0, searchIdx)]), createVNode("span", {
7956
+ "style": highlightStyle
7957
+ }, [searchText]), createVNode("span", null, [title.substr(searchIdx + searchText.length)])]) : title;
7958
+ item[titleField] = createVNode("span", {
7959
+ "class": "tree-title",
7960
+ "onClick": handleClickNode.bind(null, item[keyField], item[childrenField], item)
7961
+ }, [(slots == null ? void 0 : slots.title) ? getSlot(slots, "title", item) : createVNode(Fragment, null, [icon && createVNode("i", {
7962
+ "class": `i ${icon}`
7963
+ }, null), titleDom, createVNode("span", {
7964
+ "class": "tree-action"
7965
+ }, [renderAction(item)])])]);
7966
+ });
7967
+ return data;
7968
+ });
7969
+ const showTitle = computed(() => {
7970
+ return true;
7971
+ });
7972
+ const getBindValues = computed(() => {
7973
+ let propsData = {
7974
+ blockNode: true,
7975
+ ...attrs,
7976
+ ...props,
7977
+ expandedKeys: state.expandedKeys,
7978
+ selectedKeys: state.selectedKeys,
7979
+ checkedKeys: state.checkedKeys,
7980
+ checkStrictly: state.checkStrictly,
7981
+ fieldNames: unref(getFieldNames),
7982
+ "onUpdate:expandedKeys": (v) => {
7983
+ state.expandedKeys = v;
7984
+ emit("update:expandedKeys", v);
7985
+ },
7986
+ "onUpdate:selectedKeys": (v) => {
7987
+ state.selectedKeys = v;
7988
+ emit("update:selectedKeys", v);
7989
+ },
7990
+ onCheck: (v, e) => {
7991
+ let currentValue = toRaw(state.checkedKeys);
7992
+ if (isArray$1(currentValue) && searchState.startSearch) {
7993
+ const {
7994
+ key
7995
+ } = unref(getFieldNames);
7996
+ currentValue = difference(currentValue, getChildrenKeys(e.node.$attrs.node[key]));
7997
+ if (e.checked) {
7998
+ currentValue.push(e.node.$attrs.node[key]);
7999
+ }
8000
+ state.checkedKeys = currentValue;
8001
+ } else {
8002
+ state.checkedKeys = v;
8003
+ }
8004
+ const rawVal = toRaw(state.checkedKeys);
8005
+ emit("update:value", rawVal);
8006
+ emit("check", rawVal, e);
8007
+ }
8008
+ };
8009
+ return omit(propsData, "treeData", "class");
8010
+ });
8011
+ function handleClickNode(key, children, node) {
8012
+ emit("clickNode", node);
8013
+ if (!props.clickRowToExpand || !children || children.length === 0)
8014
+ return;
8015
+ if (!state.expandedKeys.includes(key)) {
8016
+ setExpandedKeys([...state.expandedKeys, key]);
8017
+ } else {
8018
+ const keys = [...state.expandedKeys];
8019
+ const index = keys.findIndex((item) => item === key);
8020
+ if (index !== -1) {
8021
+ keys.splice(index, 1);
8022
+ }
8023
+ setExpandedKeys(keys);
8024
+ }
8025
+ }
8026
+ function renderAction(node) {
8027
+ const {
8028
+ actionList
8029
+ } = props;
8030
+ if (!actionList || actionList.length === 0)
8031
+ return;
8032
+ return actionList.map((item, index) => {
8033
+ var _a;
8034
+ let nodeShow = true;
8035
+ if (isFunction(item.show)) {
8036
+ nodeShow = (_a = item.show) == null ? void 0 : _a.call(item, node);
8037
+ } else if (isBoolean(item.show)) {
8038
+ nodeShow = item.show;
8039
+ }
8040
+ if (!nodeShow)
8041
+ return null;
8042
+ return createVNode("span", {
8043
+ "key": index,
8044
+ "class": "tree-action"
8045
+ }, [item.render(node)]);
8046
+ });
8047
+ }
8048
+ const {
8049
+ deleteNodeByKey,
8050
+ insertNodeByKey,
8051
+ insertNodesByKey,
8052
+ filterByLevel,
8053
+ updateNodeByKey,
8054
+ getAllKeys,
8055
+ getChildrenKeys,
8056
+ getEnabledKeys,
8057
+ getSelectedNode
8058
+ } = useTree(treeDataRef, getFieldNames);
8059
+ function setExpandedKeys(keys) {
8060
+ state.expandedKeys = keys;
8061
+ }
8062
+ function getExpandedKeys() {
8063
+ return state.expandedKeys;
8064
+ }
8065
+ function setSelectedKeys(keys) {
8066
+ state.selectedKeys = keys;
8067
+ }
8068
+ function getSelectedKeys() {
8069
+ return state.selectedKeys;
8070
+ }
8071
+ function setCheckedKeys(keys) {
8072
+ state.checkedKeys = keys;
8073
+ }
8074
+ function getCheckedKeys() {
8075
+ return state.checkedKeys;
8076
+ }
8077
+ function checkAll(checkAll2) {
8078
+ state.checkedKeys = checkAll2 ? getEnabledKeys() : [];
8079
+ }
8080
+ function expandAll(expandAll2) {
8081
+ state.expandedKeys = expandAll2 ? getAllKeys() : [];
8082
+ }
8083
+ function onStrictlyChange(strictly) {
8084
+ state.checkStrictly = strictly;
8085
+ }
8086
+ const instance = {
8087
+ setExpandedKeys,
8088
+ getExpandedKeys,
8089
+ setSelectedKeys,
8090
+ getSelectedKeys,
8091
+ setCheckedKeys,
8092
+ getCheckedKeys,
8093
+ insertNodeByKey,
8094
+ insertNodesByKey,
8095
+ deleteNodeByKey,
8096
+ updateNodeByKey,
8097
+ getSelectedNode,
8098
+ checkAll,
8099
+ expandAll,
8100
+ onStrictlyChange,
8101
+ filterByLevel: (level) => {
8102
+ state.expandedKeys = filterByLevel(level);
8103
+ },
8104
+ setSearchValue: (value) => {
8105
+ handleSearch(value);
8106
+ },
8107
+ getSearchValue: () => {
8108
+ return searchState.searchText;
8109
+ }
8110
+ };
8111
+ function handleSearch(searchValue) {
8112
+ if (searchValue !== searchState.searchText)
8113
+ searchState.searchText = searchValue;
8114
+ emit("update:searchValue", searchValue);
8115
+ if (!searchValue) {
8116
+ searchState.startSearch = false;
8117
+ return;
8118
+ }
8119
+ const {
8120
+ filterFn,
8121
+ checkable,
8122
+ expandOnSearch,
8123
+ checkOnSearch,
8124
+ selectedOnSearch
8125
+ } = unref(props);
8126
+ const {
8127
+ title: titleField,
8128
+ key: keyField
8129
+ } = unref(getFieldNames);
8130
+ const matchedKeys = [];
8131
+ searchState.startSearch = true;
8132
+ searchState.searchData = filter(unref(treeDataRef), (node) => {
8133
+ var _a, _b;
8134
+ const result = filterFn ? filterFn(searchValue, node, unref(getFieldNames)) : (_b = (_a = node[titleField]) == null ? void 0 : _a.includes(searchValue)) != null ? _b : false;
8135
+ if (result) {
8136
+ matchedKeys.push(node[keyField]);
8137
+ }
8138
+ return result;
8139
+ }, unref(getFieldNames));
8140
+ if (expandOnSearch) {
8141
+ const expandKeys = treeToList(searchState.searchData).map((val) => {
8142
+ return val[keyField];
8143
+ });
8144
+ if (expandKeys && expandKeys.length) {
8145
+ setExpandedKeys(expandKeys);
8146
+ }
8147
+ }
8148
+ if (checkOnSearch && checkable && matchedKeys.length) {
8149
+ setCheckedKeys(matchedKeys);
8150
+ }
8151
+ if (selectedOnSearch && matchedKeys.length) {
8152
+ setSelectedKeys(matchedKeys);
8153
+ }
8154
+ }
8155
+ watch(() => props.searchValue, (val) => {
8156
+ if (val !== searchState.searchText) {
8157
+ searchState.searchText = val;
8158
+ }
8159
+ }, {
8160
+ immediate: true
8161
+ });
8162
+ watch(() => props.treeData, (val) => {
8163
+ if (val) {
8164
+ handleSearch(searchState.searchText);
8165
+ }
8166
+ });
8167
+ watch(() => props.value, () => {
8168
+ state.checkedKeys = toRaw(props.value || []);
8169
+ }, {
8170
+ immediate: true
8171
+ });
8172
+ watch(() => state.checkedKeys, () => {
8173
+ const v = toRaw(state.checkedKeys);
8174
+ emit("update:value", v);
8175
+ emit("change", v);
8176
+ });
8177
+ watchEffect(() => {
8178
+ treeDataRef.value = props.treeData;
8179
+ });
8180
+ watchEffect(() => {
8181
+ state.expandedKeys = props.expandedKeys;
8182
+ });
8183
+ watchEffect(() => {
8184
+ state.selectedKeys = props.selectedKeys;
8185
+ });
8186
+ watchEffect(() => {
8187
+ state.checkedKeys = props.checkedKeys;
8188
+ });
8189
+ watchEffect(() => {
8190
+ state.checkStrictly = props.checkStrictly;
8191
+ });
8192
+ expose(instance);
8193
+ return (_ctx, _cache) => {
8194
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [unref(showTitle) ? (openBlock(), createBlock(_sfc_main$w, {
8195
+ key: 0,
8196
+ title: _ctx.title,
8197
+ toolbar: _ctx.toolbar,
8198
+ search: _ctx.search,
8199
+ checkable: _ctx.checkable,
8200
+ searchText: searchState.searchText,
8201
+ checkAll,
8202
+ expandAll,
8203
+ onSearch: handleSearch
8204
+ }, {
8205
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(extendSlots)(unref(slots))), 1)]),
8206
+ _: 1
8207
+ }, 8, ["title", "toolbar", "search", "checkable", "searchText"])) : createCommentVNode("", true), createVNode(unref(Spin), {
8208
+ spinning: _ctx.loading,
8209
+ tip: "\u52A0\u8F7D\u4E2D..."
8210
+ }, {
8211
+ default: withCtx(() => [withDirectives(createElementVNode("div", null, [createVNode(unref(Tree), mergeProps(unref(getBindValues), {
8212
+ showIcon: false,
8213
+ treeData: unref(treeData)
8214
+ }), null, 16, ["treeData"])], 512), [[vShow, !unref(getNotFound)]]), withDirectives(createVNode(unref(Empty), null, null, 512), [[vShow, unref(getNotFound)]])]),
8215
+ _: 1
8216
+ }, 8, ["spinning"])]);
8217
+ };
8218
+ }
8219
+ });
6745
8220
  const dtComponents = [
6746
8221
  { name: "dt-base-router", component: DtBaseRouter },
6747
8222
  { name: "dt-icon", component: DtIcon },
6748
- { name: "dt-pick-icon", component: _sfc_main$R },
6749
- { name: "dt-modal", component: _sfc_main$G },
6750
- { name: "dt-form", component: DtForm }
8223
+ { name: "dt-pick-icon", component: _sfc_main$V },
8224
+ { name: "dt-modal", component: _sfc_main$K },
8225
+ { name: "dt-form", component: DtForm },
8226
+ { name: "dt-upload", component: _sfc_main$y },
8227
+ { name: "dt-upload-modal", component: _sfc_main$x },
8228
+ { name: "dt-tree", component: _sfc_main$v }
6751
8229
  ];
6752
8230
  function initComponents() {
6753
8231
  return {
@@ -6841,7 +8319,8 @@ function deleteChildrenProp(menu) {
6841
8319
  return obj;
6842
8320
  }
6843
8321
  function getBreadCrumb(path, menus) {
6844
- const _menus = menus || DtCache.getLocal(CacheKey.MENUS) || [];
8322
+ var _a;
8323
+ const _menus = menus || ((_a = DtCache.getLocal(CacheKey.MENUS)) == null ? void 0 : _a.children) || [];
6845
8324
  let routes = [];
6846
8325
  let getParentByPath = (menu, path2 = "") => {
6847
8326
  if (menu.children && menu.children.length) {
@@ -6860,20 +8339,21 @@ function getBreadCrumb(path, menus) {
6860
8339
  });
6861
8340
  return routes;
6862
8341
  }
6863
- function getFilterMenu(filter = "", flag = false) {
8342
+ function getFilterMenu(filter2 = "", flag = false) {
8343
+ var _a;
6864
8344
  let _menus = [];
6865
- if (!trim(filter) && !flag)
8345
+ if (!trim(filter2) && !flag)
6866
8346
  return _menus;
6867
8347
  let getTargetMenus = (menusArr) => {
6868
8348
  menusArr.forEach((menu) => {
6869
8349
  if (menu.children && menu.children.length) {
6870
8350
  getTargetMenus(menu.children);
6871
- } else if (menu.label.indexOf(filter) !== -1 || flag && !trim(filter)) {
8351
+ } else if (menu.label.indexOf(filter2) !== -1 || flag && !trim(filter2)) {
6872
8352
  _menus.push(menu);
6873
8353
  }
6874
8354
  });
6875
8355
  };
6876
- getTargetMenus(DtCache.getLocal(CacheKey.MENUS));
8356
+ getTargetMenus((_a = DtCache.getLocal(CacheKey.MENUS)) == null ? void 0 : _a.children);
6877
8357
  return _menus;
6878
8358
  }
6879
8359
  const _hoisted_1$e = { class: "dt-breadcrumb" };
@@ -7541,7 +9021,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
7541
9021
  setup(__props) {
7542
9022
  const menuList = ref([]);
7543
9023
  const router = useRouter();
7544
- const filter = ref("");
9024
+ const filter2 = ref("");
7545
9025
  const { getShowSearch } = useHeader();
7546
9026
  const isUseDef = computed(() => {
7547
9027
  return isBoolean(getShowSearch.value);
@@ -7550,16 +9030,16 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
7550
9030
  if (e) {
7551
9031
  filterMenu();
7552
9032
  } else {
7553
- filter.value = null;
9033
+ filter2.value = null;
7554
9034
  }
7555
9035
  }
7556
9036
  function filterMenu() {
7557
- menuList.value = getFilterMenu(filter.value, true);
9037
+ menuList.value = getFilterMenu(filter2.value, true);
7558
9038
  }
7559
9039
  function navigation(url) {
7560
9040
  router.push(url);
7561
9041
  setTimeout(() => {
7562
- filter.value = "";
9042
+ filter2.value = "";
7563
9043
  menuList.value = [];
7564
9044
  });
7565
9045
  }
@@ -7586,8 +9066,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
7586
9066
  ]),
7587
9067
  default: withCtx(() => [
7588
9068
  createVNode(unref(InputSearch), {
7589
- value: filter.value,
7590
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => filter.value = $event),
9069
+ value: filter2.value,
9070
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => filter2.value = $event),
7591
9071
  placeholder: "\u641C\u7D22...",
7592
9072
  onInput: filterMenu
7593
9073
  }, null, 8, ["value"])
@@ -7627,8 +9107,9 @@ function useSplitMenu(splitType) {
7627
9107
  menusRef.value = (_a = menusMap.filter((it) => it.includesPath.includes(path))[0]) == null ? void 0 : _a.children;
7628
9108
  }
7629
9109
  async function getMenus2() {
9110
+ var _a;
7630
9111
  if (unref(normalType)) {
7631
- menusRef.value = DtCache.getLocal(CacheKey.MENUS);
9112
+ menusRef.value = (_a = DtCache.getLocal(CacheKey.MENUS)) == null ? void 0 : _a.children;
7632
9113
  return;
7633
9114
  }
7634
9115
  if (unref(getSplitTop)) {
@@ -7641,7 +9122,8 @@ function useSplitMenu(splitType) {
7641
9122
  return { menusRef };
7642
9123
  }
7643
9124
  async function getMenus() {
7644
- return DtCache.getLocal(CacheKey.MENUS);
9125
+ var _a;
9126
+ return (_a = DtCache.getLocal(CacheKey.MENUS)) == null ? void 0 : _a.children;
7645
9127
  }
7646
9128
  function getFirstMenuPath(item) {
7647
9129
  let isFind = false, path = "";
@@ -8031,7 +9513,7 @@ var _sfc_main$b = defineComponent({
8031
9513
  }), null);
8032
9514
  }
8033
9515
  return () => {
8034
- return createVNode(Fragment, null, [renderHeader(), unref(getUseScroll) ? createVNode(_sfc_main$P, null, {
9516
+ return createVNode(Fragment, null, [renderHeader(), unref(getUseScroll) ? createVNode(_sfc_main$T, null, {
8035
9517
  default: () => renderMenu()
8036
9518
  }) : renderMenu()]);
8037
9519
  };
@@ -8366,10 +9848,10 @@ function useTabDropdown() {
8366
9848
  const { path, meta } = unref(currentRoute);
8367
9849
  const curItem = state.current;
8368
9850
  const isCurItem = curItem ? curItem.path === path : false;
8369
- const index2 = state.currentIndex;
8370
- const closeLeftDisabled = index2 === 0 || !isCurItem;
9851
+ const index = state.currentIndex;
9852
+ const closeLeftDisabled = index === 0 || !isCurItem;
8371
9853
  const disabled = tabStore.getTabList.length === 1;
8372
- const closeRightDisabled = !isCurItem || index2 === tabStore.getTabList.length - 1 && tabStore.getLastDragEndIndex >= 0;
9854
+ const closeRightDisabled = !isCurItem || index === tabStore.getTabList.length - 1 && tabStore.getLastDragEndIndex >= 0;
8373
9855
  const dropMenuList = [
8374
9856
  {
8375
9857
  icon: "ic:baseline-close",
@@ -8410,9 +9892,9 @@ function useTabDropdown() {
8410
9892
  function handleContext(e) {
8411
9893
  e == null ? void 0 : e.preventDefault();
8412
9894
  const { path } = unref(currentRoute);
8413
- const index2 = tabStore.getTabList.findIndex((tab) => tab.path === path);
9895
+ const index = tabStore.getTabList.findIndex((tab) => tab.path === path);
8414
9896
  state.current = unref(currentRoute);
8415
- state.currentIndex = index2;
9897
+ state.currentIndex = index;
8416
9898
  }
8417
9899
  function handleMenuEvent(item) {
8418
9900
  var _a;
@@ -8440,8 +9922,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
8440
9922
  overlay: withCtx(() => [
8441
9923
  createVNode(unref(Menu), null, {
8442
9924
  default: withCtx(() => [
8443
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getDropMenuList), (item, index2) => {
8444
- return openBlock(), createElementBlock(Fragment, { key: index2 }, [
9925
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getDropMenuList), (item, index) => {
9926
+ return openBlock(), createElementBlock(Fragment, { key: index }, [
8445
9927
  createVNode(unref(MenuItem), {
8446
9928
  onClick: ($event) => unref(handleMenuEvent)(item),
8447
9929
  disabled: item.disabled
@@ -8455,7 +9937,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
8455
9937
  _: 2
8456
9938
  }, 1032, ["onClick", "disabled"]),
8457
9939
  item.divider ? (openBlock(), createBlock(unref(MenuDivider), {
8458
- key: `d-${index2}`
9940
+ key: `d-${index}`
8459
9941
  })) : createCommentVNode("", true)
8460
9942
  ], 64);
8461
9943
  }), 128))
@@ -8875,7 +10357,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8875
10357
  }, {
8876
10358
  default: withCtx(() => [
8877
10359
  unref(getShowSidebar) ? (openBlock(), createBlock(_sfc_main$7, { key: 0 })) : createCommentVNode("", true),
8878
- createVNode(unref(_sfc_main$P), {
10360
+ createVNode(unref(_sfc_main$T), {
8879
10361
  ref_key: "wrapperRef",
8880
10362
  ref: wrapperRef,
8881
10363
  class: normalizeClass({ "fixedWrap": unref(getFixed) })
@@ -8908,4 +10390,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8908
10390
  };
8909
10391
  }
8910
10392
  });
8911
- export { DtBaseRouter, DtForm, DtIcon, _sfc_main$v as DtIframe, _sfc_main$G as DtModal, _sfc_main$R as DtPickIcon, index as DtTable, _sfc_main as DtTheme, FormButtons, authMounted, export2Excel, iconMounted, initComponents, initDirectives, useCurd, useDialog, useForm, useModal, useModalOut, useSource, useTable };
10393
+ export { DtBaseRouter, DtForm, DtIcon, _sfc_main$z as DtIframe, _sfc_main$K as DtModal, _sfc_main$V as DtPickIcon, DtTable, _sfc_main as DtTheme, _sfc_main$v as DtTree, _sfc_main$y as DtUpload, _sfc_main$x as DtUploadModal, FormButtons, authMounted, export2Excel, iconMounted, initComponents, initDirectives, useCurd, useForm, useModal, useModalOut, useSource, useTable };