@dt-frames/ui 1.0.12 → 1.0.16

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 (217) hide show
  1. package/es/components/curd/src/components/dialog.d.ts +27 -23
  2. package/es/components/curd/src/components/props.d.ts +6 -5
  3. package/es/components/curd/src/hooks/useCurd.d.ts +1 -0
  4. package/es/components/curd/src/types/curd.type.d.ts +4 -3
  5. package/es/components/forms/src/components/formButton.d.ts +1 -2
  6. package/es/components/forms/src/components/formIcon.d.ts +16 -11
  7. package/es/components/forms/src/hooks/helper.d.ts +2 -0
  8. package/es/components/forms/src/hooks/useFormActions.d.ts +2 -2
  9. package/es/components/forms/src/index.d.ts +2 -3
  10. package/es/components/forms/src/types/form.type.d.ts +3 -17
  11. package/es/components/index.d.ts +2 -2
  12. package/es/components/modal/src/components/modal.d.ts +2 -2
  13. package/es/components/modal/src/components/modalFooter.d.ts +10 -5
  14. package/es/components/modal/src/index.d.ts +16 -11
  15. package/es/components/modal/src/props.d.ts +2 -1
  16. package/es/components/source/src/hooks/useFetch.d.ts +1 -1
  17. package/es/components/table/src/hooks/useTable.d.ts +2 -2
  18. package/es/components/table/src/index.d.ts +3 -3
  19. package/es/components/table/src/props.d.ts +1 -2
  20. package/es/components/table/src/types/table.type.d.ts +2 -2
  21. package/es/components/tree/src/props.d.ts +8 -1
  22. package/es/components/upload/index.d.ts +1 -2
  23. package/es/components/upload/src/helper.d.ts +1 -0
  24. package/es/components/upload/src/index.d.ts +13 -9
  25. package/es/components/upload/src/props.d.ts +4 -1
  26. package/es/components/upload/src/upload.d.ts +21 -9
  27. package/es/index.js +391 -232
  28. package/es/style/components/icons/index.less +1 -1
  29. package/es/style/components/upload/index.less +3 -11
  30. package/package.json +1 -10
  31. package/vite.config.js +10 -0
  32. package/src/assets/data/icons/actions.ts +0 -427
  33. package/src/assets/data/icons/code.ts +0 -10
  34. package/src/assets/data/icons/commuticate.ts +0 -190
  35. package/src/assets/data/icons/currency.ts +0 -46
  36. package/src/assets/data/icons/devices.ts +0 -128
  37. package/src/assets/data/icons/edit.ts +0 -165
  38. package/src/assets/data/icons/file.ts +0 -104
  39. package/src/assets/data/icons/math.ts +0 -53
  40. package/src/assets/data/icons/message.ts +0 -75
  41. package/src/assets/data/icons/navigate.ts +0 -181
  42. package/src/assets/data/icons/other.ts +0 -333
  43. package/src/assets/data/icons.ts +0 -58
  44. package/src/assets/imgs/header/avatar.png +0 -0
  45. package/src/assets/imgs/logo/logo.png +0 -0
  46. package/src/assets/locales/en_US.json +0 -3
  47. package/src/assets/locales/zh_CN.json +0 -3
  48. package/src/assets/style/index.less +0 -10
  49. package/src/assets/style/reset.less +0 -17
  50. package/src/components/container/index.less +0 -85
  51. package/src/components/container/index.ts +0 -8
  52. package/src/components/container/src/bar.ts +0 -107
  53. package/src/components/container/src/lazy-container.vue +0 -9
  54. package/src/components/container/src/scroll-bar.vue +0 -117
  55. package/src/components/container/src/scroll-container.vue +0 -61
  56. package/src/components/curd/index.ts +0 -5
  57. package/src/components/curd/src/components/dialog.vue +0 -74
  58. package/src/components/curd/src/components/props.ts +0 -32
  59. package/src/components/curd/src/hooks/useCurd.tsx +0 -87
  60. package/src/components/curd/src/types/curd.type.ts +0 -31
  61. package/src/components/excel/index.ts +0 -6
  62. package/src/components/excel/src/export2Excel.ts +0 -44
  63. package/src/components/forms/index.less +0 -107
  64. package/src/components/forms/index.ts +0 -11
  65. package/src/components/forms/src/componentMap.ts +0 -46
  66. package/src/components/forms/src/components/formButton.vue +0 -150
  67. package/src/components/forms/src/components/formIcon.vue +0 -51
  68. package/src/components/forms/src/components/formInputUseDialog.vue +0 -43
  69. package/src/components/forms/src/components/formItem.vue +0 -420
  70. package/src/components/forms/src/components/radioButton.vue +0 -58
  71. package/src/components/forms/src/const/form.const.ts +0 -7
  72. package/src/components/forms/src/hooks/helper.ts +0 -70
  73. package/src/components/forms/src/hooks/useForm.ts +0 -130
  74. package/src/components/forms/src/hooks/useFormActions.ts +0 -63
  75. package/src/components/forms/src/hooks/useFormEvents.ts +0 -248
  76. package/src/components/forms/src/hooks/useFormValue.ts +0 -49
  77. package/src/components/forms/src/hooks/useFormValues.ts +0 -131
  78. package/src/components/forms/src/hooks/useLabelWidth.ts +0 -57
  79. package/src/components/forms/src/index.vue +0 -310
  80. package/src/components/forms/src/prop.ts +0 -80
  81. package/src/components/forms/src/types/form.type.ts +0 -275
  82. package/src/components/icons/index.less +0 -101
  83. package/src/components/icons/index.ts +0 -7
  84. package/src/components/icons/src/pick-icon.vue +0 -119
  85. package/src/components/icons/src/svg-icon.vue +0 -117
  86. package/src/components/iframe/index.less +0 -3
  87. package/src/components/iframe/index.ts +0 -5
  88. package/src/components/iframe/src/index.less +0 -3
  89. package/src/components/iframe/src/index.vue +0 -38
  90. package/src/components/index.ts +0 -54
  91. package/src/components/modal/index.less +0 -60
  92. package/src/components/modal/index.ts +0 -8
  93. package/src/components/modal/src/components/close-icon.vue +0 -46
  94. package/src/components/modal/src/components/modal-wrap.vue +0 -128
  95. package/src/components/modal/src/components/modal.tsx +0 -30
  96. package/src/components/modal/src/components/modalFooter.vue +0 -38
  97. package/src/components/modal/src/hooks/useDrag.ts +0 -107
  98. package/src/components/modal/src/hooks/useFullScreen.ts +0 -29
  99. package/src/components/modal/src/hooks/useModal.ts +0 -200
  100. package/src/components/modal/src/index.vue +0 -173
  101. package/src/components/modal/src/props.ts +0 -43
  102. package/src/components/modal/src/types/modal.type.ts +0 -30
  103. package/src/components/router/base-router.vue +0 -11
  104. package/src/components/router/index.ts +0 -3
  105. package/src/components/source/index.ts +0 -1
  106. package/src/components/source/src/hooks/useFetch.ts +0 -42
  107. package/src/components/source/src/hooks/usePage.ts +0 -3
  108. package/src/components/source/src/hooks/useSource.ts +0 -214
  109. package/src/components/source/src/index.ts +0 -5
  110. package/src/components/source/src/types/source.type.ts +0 -58
  111. package/src/components/source/src/types/table.type.ts +0 -8
  112. package/src/components/table/index.less +0 -179
  113. package/src/components/table/index.ts +0 -7
  114. package/src/components/table/src/components/TableActions.vue +0 -108
  115. package/src/components/table/src/components/TableHeader.vue +0 -78
  116. package/src/components/table/src/components/TableRender.vue +0 -76
  117. package/src/components/table/src/components/editable/CellComponent.ts +0 -57
  118. package/src/components/table/src/components/editable/EditTableCell.vue +0 -181
  119. package/src/components/table/src/components/editable/componentMap.ts +0 -18
  120. package/src/components/table/src/components/editable/index.ts +0 -58
  121. package/src/components/table/src/components/setting/Column.vue +0 -354
  122. package/src/components/table/src/components/setting/Download.vue +0 -55
  123. package/src/components/table/src/components/setting/Fullscreen.vue +0 -43
  124. package/src/components/table/src/components/setting/Size.vue +0 -42
  125. package/src/components/table/src/components/setting/index.vue +0 -64
  126. package/src/components/table/src/const.ts +0 -13
  127. package/src/components/table/src/hooks/useColumns.ts +0 -326
  128. package/src/components/table/src/hooks/useCustomRow.ts +0 -86
  129. package/src/components/table/src/hooks/useDataSource.ts +0 -97
  130. package/src/components/table/src/hooks/useHeaderCode.ts +0 -89
  131. package/src/components/table/src/hooks/useLoading.ts +0 -29
  132. package/src/components/table/src/hooks/usePagination.ts +0 -76
  133. package/src/components/table/src/hooks/useRowSelection.ts +0 -145
  134. package/src/components/table/src/hooks/useRows.ts +0 -30
  135. package/src/components/table/src/hooks/useTable.ts +0 -90
  136. package/src/components/table/src/hooks/useTableHeader.ts +0 -48
  137. package/src/components/table/src/hooks/useTableInstance.ts +0 -29
  138. package/src/components/table/src/hooks/useTableScroll.ts +0 -229
  139. package/src/components/table/src/index.vue +0 -212
  140. package/src/components/table/src/props.ts +0 -160
  141. package/src/components/table/src/types/table.type.ts +0 -160
  142. package/src/components/table/src/types/tableHeader.type.ts +0 -27
  143. package/src/components/tree/index.less +0 -41
  144. package/src/components/tree/index.ts +0 -5
  145. package/src/components/tree/src/components/TreeHeader.vue +0 -97
  146. package/src/components/tree/src/hooks/useTree.ts +0 -239
  147. package/src/components/tree/src/index.vue +0 -392
  148. package/src/components/tree/src/props.ts +0 -133
  149. package/src/components/tree/src/type/tree.ts +0 -105
  150. package/src/components/tree/src/utils/tree.ts +0 -73
  151. package/src/components/type.ts +0 -0
  152. package/src/components/upload/index.less +0 -43
  153. package/src/components/upload/index.ts +0 -7
  154. package/src/components/upload/src/helper.ts +0 -32
  155. package/src/components/upload/src/index.vue +0 -38
  156. package/src/components/upload/src/props.ts +0 -48
  157. package/src/components/upload/src/upload.vue +0 -166
  158. package/src/directives/icon.ts +0 -36
  159. package/src/directives/index.ts +0 -26
  160. package/src/directives/permission.ts +0 -20
  161. package/src/global.d.ts +0 -8
  162. package/src/index.ts +0 -4
  163. package/src/theme/content/index.vue +0 -37
  164. package/src/theme/feature/back-top.vue +0 -11
  165. package/src/theme/feature/index.vue +0 -7
  166. package/src/theme/footer/index.less +0 -16
  167. package/src/theme/footer/index.vue +0 -24
  168. package/src/theme/header/components/bread-crumb.vue +0 -26
  169. package/src/theme/header/components/fullscreen.vue +0 -12
  170. package/src/theme/header/components/handler.ts +0 -81
  171. package/src/theme/header/components/index.ts +0 -21
  172. package/src/theme/header/components/lang-picker.vue +0 -36
  173. package/src/theme/header/components/logo.vue +0 -35
  174. package/src/theme/header/components/menu-search.vue +0 -62
  175. package/src/theme/header/components/notify.vue +0 -22
  176. package/src/theme/header/components/setting-theme.vue +0 -123
  177. package/src/theme/header/components/theme-drawer/enum.ts +0 -12
  178. package/src/theme/header/components/theme-drawer/feature.vue +0 -75
  179. package/src/theme/header/components/theme-drawer/index.ts +0 -7
  180. package/src/theme/header/components/theme-drawer/menu-type.vue +0 -40
  181. package/src/theme/header/components/theme-drawer/select-item.vue +0 -46
  182. package/src/theme/header/components/theme-drawer/switch-item.vue +0 -39
  183. package/src/theme/header/components/theme-drawer/theme-color.vue +0 -26
  184. package/src/theme/header/components/trigger.vue +0 -14
  185. package/src/theme/header/components/user-info.vue +0 -60
  186. package/src/theme/header/const/index.ts +0 -40
  187. package/src/theme/header/helper/menu-tree.ts +0 -64
  188. package/src/theme/header/index.less +0 -442
  189. package/src/theme/header/index.ts +0 -0
  190. package/src/theme/header/index.vue +0 -96
  191. package/src/theme/header/multiple-header.vue +0 -67
  192. package/src/theme/header/set-theme.less +0 -68
  193. package/src/theme/index.ts +0 -3
  194. package/src/theme/sider/components/basic-menu/basic-menu-item.vue +0 -14
  195. package/src/theme/sider/components/basic-menu/basic-menu.vue +0 -122
  196. package/src/theme/sider/components/basic-menu/basic-sub-menu-item.vue +0 -46
  197. package/src/theme/sider/components/basic-menu/menu-item-content.vue +0 -13
  198. package/src/theme/sider/components/drag-bar.vue +0 -26
  199. package/src/theme/sider/components/layout-menu.vue +0 -132
  200. package/src/theme/sider/components/props.ts +0 -97
  201. package/src/theme/sider/components/sider-trigger.vue +0 -24
  202. package/src/theme/sider/helper/sider.ts +0 -52
  203. package/src/theme/sider/helper/split-menu.ts +0 -146
  204. package/src/theme/sider/hooks/useDragLine.ts +0 -86
  205. package/src/theme/sider/hooks/useOpenKeys.ts +0 -57
  206. package/src/theme/sider/index.less +0 -203
  207. package/src/theme/sider/index.vue +0 -88
  208. package/src/theme/tabs/components/TabContent.vue +0 -36
  209. package/src/theme/tabs/components/TabRedo.vue +0 -18
  210. package/src/theme/tabs/hooks/useMultifyTabs.ts +0 -96
  211. package/src/theme/tabs/hooks/useTabDropdown.ts +0 -89
  212. package/src/theme/tabs/index.less +0 -165
  213. package/src/theme/tabs/index.vue +0 -98
  214. package/src/theme/tabs/types/tabs.type.ts +0 -8
  215. package/src/theme/theme.less +0 -67
  216. package/src/theme/theme.vue +0 -90
  217. package/src/theme/transition.less +0 -99
package/es/index.js CHANGED
@@ -14,15 +14,15 @@ var _export_sfc = (sfc, props) => {
14
14
  }
15
15
  return target;
16
16
  };
17
- const _sfc_main$Z = defineComponent({
17
+ const _sfc_main$Y = defineComponent({
18
18
  name: "dt-base-router"
19
19
  });
20
20
  function _sfc_render$8(_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$Z, [["render", _sfc_render$8]]);
25
- const _sfc_main$Y = defineComponent({
24
+ var DtBaseRouter = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$8]]);
25
+ const _sfc_main$X = defineComponent({
26
26
  props: {
27
27
  iconClass: {
28
28
  type: String,
@@ -90,7 +90,7 @@ const _sfc_main$Y = defineComponent({
90
90
  };
91
91
  }
92
92
  });
93
- const _hoisted_1$x = ["xlink:href", "fill"];
93
+ const _hoisted_1$w = ["xlink:href", "fill"];
94
94
  function _sfc_render$7(_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$7(_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$x)
108
+ }, null, 8, _hoisted_1$w)
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$7(_ctx, _cache, $props, $setup, $data, $options) {
115
115
  })
116
116
  }, null, 6));
117
117
  }
118
- var DtIcon = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$7]]);
118
+ var DtIcon = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$7]]);
119
119
  const Actions = [
120
120
  "ic:baseline-save",
121
121
  "ic:baseline-save-all",
@@ -1874,9 +1874,9 @@ const Icons = [
1874
1874
  children: Other
1875
1875
  }
1876
1876
  ];
1877
- const _hoisted_1$w = ["onClick"];
1878
- const _hoisted_2$l = ["onClick"];
1879
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
1877
+ const _hoisted_1$v = ["onClick"];
1878
+ const _hoisted_2$k = ["onClick"];
1879
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1880
1880
  __name: "pick-icon",
1881
1881
  emits: ["chooseIcon"],
1882
1882
  setup(__props, { emit: emits }) {
@@ -1943,7 +1943,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1943
1943
  createTextVNode(toDisplayString(menu.type), 1),
1944
1944
  createElementVNode("span", null, "(" + toDisplayString(menu.total) + ")", 1)
1945
1945
  ])
1946
- ], 10, _hoisted_1$w);
1946
+ ], 10, _hoisted_1$v);
1947
1947
  }), 128))
1948
1948
  ], 2),
1949
1949
  createElementVNode("div", {
@@ -1980,7 +1980,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1980
1980
  ]),
1981
1981
  _: 2
1982
1982
  }, 1024)
1983
- ], 10, _hoisted_2$l);
1983
+ ], 10, _hoisted_2$k);
1984
1984
  }), 128))
1985
1985
  ], 2)
1986
1986
  ], 1024))
@@ -2050,7 +2050,7 @@ function useModalOut() {
2050
2050
  if (!data)
2051
2051
  return;
2052
2052
  if (openOnSet) {
2053
- dataTransfer[id] = toRaw(data);
2053
+ dataTransfer[id] = { ...toRaw(data) };
2054
2054
  return;
2055
2055
  }
2056
2056
  const equal = isEqual(toRaw(dataTransfer[id]), toRaw(data));
@@ -2384,8 +2384,8 @@ var Bar = defineComponent({
2384
2384
  }));
2385
2385
  }
2386
2386
  });
2387
- const _hoisted_1$v = { class: "scrollbar" };
2388
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
2387
+ const _hoisted_1$u = { class: "scrollbar" };
2388
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2389
2389
  __name: "scroll-bar",
2390
2390
  props: {
2391
2391
  wrapClass: {
@@ -2462,7 +2462,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
2462
2462
  }
2463
2463
  });
2464
2464
  return (_ctx, _cache) => {
2465
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
2465
+ return openBlock(), createElementBlock("div", _hoisted_1$u, [
2466
2466
  createElementVNode("div", {
2467
2467
  ref_key: "wrap",
2468
2468
  ref: wrap,
@@ -2497,12 +2497,12 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
2497
2497
  };
2498
2498
  }
2499
2499
  });
2500
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
2500
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
2501
2501
  __name: "scroll-container",
2502
2502
  setup(__props) {
2503
2503
  const scrollbarRef = ref(null);
2504
2504
  return (_ctx, _cache) => {
2505
- return openBlock(), createBlock(_sfc_main$W, mergeProps({
2505
+ return openBlock(), createBlock(_sfc_main$V, mergeProps({
2506
2506
  ref_key: "scrollbarRef",
2507
2507
  ref: scrollbarRef,
2508
2508
  class: "scroll-container"
@@ -2515,7 +2515,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2515
2515
  };
2516
2516
  }
2517
2517
  });
2518
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
2518
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
2519
2519
  __name: "modal-wrap",
2520
2520
  props: {
2521
2521
  loading: { type: Boolean },
@@ -2603,7 +2603,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
2603
2603
  }
2604
2604
  });
2605
2605
  return (_ctx, _cache) => {
2606
- return openBlock(), createBlock(unref(_sfc_main$V), {
2606
+ return openBlock(), createBlock(unref(_sfc_main$U), {
2607
2607
  ref_key: "wrapperRef",
2608
2608
  ref: wrapperRef
2609
2609
  }, {
@@ -2689,7 +2689,7 @@ function useFormValue(props, key = "value", changeEvent = "change", emitData) {
2689
2689
  });
2690
2690
  return [state, setState, defaultState];
2691
2691
  }
2692
- const _sfc_main$T = defineComponent({
2692
+ const _sfc_main$S = defineComponent({
2693
2693
  name: "radio-button",
2694
2694
  props: {
2695
2695
  value: {
@@ -2747,8 +2747,8 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
2747
2747
  _: 1
2748
2748
  }, 16, ["value"]);
2749
2749
  }
2750
- var RadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$6]]);
2751
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
2750
+ var RadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$6]]);
2751
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2752
2752
  __name: "formIcon",
2753
2753
  props: {
2754
2754
  value: String,
@@ -2798,9 +2798,9 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
2798
2798
  ]),
2799
2799
  _: 1
2800
2800
  }),
2801
- createVNode(unref(_sfc_main$L), { onRegister: unref(register) }, {
2801
+ createVNode(unref(_sfc_main$K), { onRegister: unref(register) }, {
2802
2802
  default: withCtx(() => [
2803
- createVNode(unref(_sfc_main$X), {
2803
+ createVNode(unref(_sfc_main$W), {
2804
2804
  onChooseIcon: _cache[2] || (_cache[2] = ($event) => chooseIcon($event))
2805
2805
  })
2806
2806
  ]),
@@ -2810,8 +2810,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
2810
2810
  };
2811
2811
  }
2812
2812
  });
2813
- const _hoisted_1$u = { class: "input-with-dialog" };
2814
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
2813
+ const _hoisted_1$t = { class: "input-with-dialog" };
2814
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2815
2815
  __name: "formInputUseDialog",
2816
2816
  setup(__props) {
2817
2817
  const attrs = useAttrs$1();
@@ -2836,21 +2836,23 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2836
2836
  [...schema.linkProps, schema.name].forEach((it) => model[it] = null);
2837
2837
  }
2838
2838
  return (_ctx, _cache) => {
2839
- return openBlock(), createElementBlock("div", _hoisted_1$u, [
2839
+ var _a, _b, _c;
2840
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
2840
2841
  createElementVNode("div", { onClick: onClickInput }, [
2841
2842
  createVNode(unref(Input), normalizeProps(guardReactiveProps(unref(bindProps))), null, 16)
2842
2843
  ]),
2843
- createElementVNode("i", {
2844
+ ((_c = (_b = (_a = unref(attrs).formValues) == null ? void 0 : _a.schema) == null ? void 0 : _b.linkProps) == null ? void 0 : _c.length) ? (openBlock(), createElementBlock("i", {
2845
+ key: 0,
2844
2846
  class: "i mdi:close-circle",
2845
2847
  onClick: clearProps
2846
- })
2848
+ })) : createCommentVNode("", true)
2847
2849
  ]);
2848
2850
  };
2849
2851
  }
2850
2852
  });
2851
2853
  const components = {
2852
2854
  Input,
2853
- InputWithDialog: _sfc_main$R,
2855
+ InputWithDialog: _sfc_main$Q,
2854
2856
  InputTextArea: Input.TextArea,
2855
2857
  InputSearch: Input.Search,
2856
2858
  InputGroup: Input.Group,
@@ -2874,7 +2876,7 @@ const components = {
2874
2876
  Slider,
2875
2877
  Rate,
2876
2878
  Divider,
2877
- Icon: _sfc_main$S
2879
+ Icon: _sfc_main$R
2878
2880
  };
2879
2881
  const componentMap$1 = /* @__PURE__ */ new Map();
2880
2882
  for (let item in components) {
@@ -2892,8 +2894,10 @@ function createPlaceholder(component) {
2892
2894
  }
2893
2895
  return "";
2894
2896
  }
2897
+ const SINGLE_DATA_TYPE = ["DatePicker", "MonthPicker", "WeekPicker", "TimePicker"];
2898
+ const MULTIFY_DATA_TYPE = ["RangePicker"];
2895
2899
  function setComponentRuleType(rule, component, valueFormat) {
2896
- if (["DatePicker", "MonthPicker", "WeekPicker", "TimePicker"].includes(component)) {
2900
+ if (SINGLE_DATA_TYPE.includes(component)) {
2897
2901
  rule.type = valueFormat ? "string" : "object";
2898
2902
  } else if (["RangePicker", "Upload", "CheckboxGroup", "TimePicker"].includes(component)) {
2899
2903
  rule.type = "array";
@@ -2914,7 +2918,7 @@ function handleInputNumberValue(component, val) {
2914
2918
  }
2915
2919
  return val;
2916
2920
  }
2917
- const datePickerType = ["DatePicker", "MonthPicker", "WeekPicker", "TimePicker", "RangePicker"];
2921
+ const datePickerType = [...SINGLE_DATA_TYPE, ...MULTIFY_DATA_TYPE];
2918
2922
  const BasicProps$1 = {
2919
2923
  mode: {
2920
2924
  type: String,
@@ -2982,7 +2986,7 @@ const FormItemProps = {
2982
2986
  function _isSlot(s) {
2983
2987
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
2984
2988
  }
2985
- var _sfc_main$Q = defineComponent({
2989
+ var _sfc_main$P = defineComponent({
2986
2990
  name: "FormItem",
2987
2991
  inheritAttrs: false,
2988
2992
  props: FormItemProps,
@@ -3310,7 +3314,7 @@ var _sfc_main$Q = defineComponent({
3310
3314
  }
3311
3315
  return createVNode(Col, {
3312
3316
  "span": 24
3313
- }, _isSlot(_slot2 = render2()) ? _slot2 : {
3317
+ }, _isSlot(_slot2 = render2(values)) ? _slot2 : {
3314
3318
  default: () => [_slot2]
3315
3319
  });
3316
3320
  }
@@ -3369,7 +3373,7 @@ function initDirectives() {
3369
3373
  }
3370
3374
  };
3371
3375
  }
3372
- const _sfc_main$P = defineComponent({
3376
+ const _sfc_main$O = defineComponent({
3373
3377
  name: "form-buttons",
3374
3378
  props: {
3375
3379
  mode: {
@@ -3456,11 +3460,11 @@ const _sfc_main$P = defineComponent({
3456
3460
  };
3457
3461
  }
3458
3462
  });
3459
- const _hoisted_1$t = {
3463
+ const _hoisted_1$s = {
3460
3464
  key: 0,
3461
3465
  className: "preIcon"
3462
3466
  };
3463
- const _hoisted_2$k = {
3467
+ const _hoisted_2$j = {
3464
3468
  key: 0,
3465
3469
  className: "preIcon"
3466
3470
  };
@@ -3492,13 +3496,13 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3492
3496
  onClick: ($event) => _ctx.handleBtnClick(button)
3493
3497
  }, {
3494
3498
  icon: withCtx(() => [
3495
- button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$t, null, 512)), [
3499
+ button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$s, null, 512)), [
3496
3500
  [_directive_icon, button.preIcon]
3497
3501
  ]) : createCommentVNode("", true)
3498
3502
  ]),
3499
3503
  default: withCtx(() => [
3500
3504
  createTextVNode(" " + toDisplayString(button.name) + " ", 1),
3501
- button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$k, null, 512)), [
3505
+ button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$j, null, 512)), [
3502
3506
  [_directive_icon, button.postIcon]
3503
3507
  ]) : createCommentVNode("", true)
3504
3508
  ]),
@@ -3532,7 +3536,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3532
3536
  _: 1
3533
3537
  }, 16)) : createCommentVNode("", true);
3534
3538
  }
3535
- var FormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$5]]);
3539
+ var FormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$5]]);
3536
3540
  const isArray = Array.isArray;
3537
3541
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3538
3542
  var dayjs_min = { exports: {} };
@@ -3755,6 +3759,12 @@ function useFormValues({
3755
3759
  if (!key || Array.isArray(value) && value.length === 0 || isFunction(value)) {
3756
3760
  continue;
3757
3761
  }
3762
+ const schema = unref(getSchema).filter((it) => it.name === key)[0];
3763
+ if (SINGLE_DATA_TYPE.includes(schema == null ? void 0 : schema.component)) {
3764
+ value = dayjs(value).valueOf();
3765
+ } else if (MULTIFY_DATA_TYPE.includes(schema == null ? void 0 : schema.component)) {
3766
+ value = value.map((item) => dayjs(item).valueOf());
3767
+ }
3758
3768
  if (isString(value)) {
3759
3769
  value = value.trim();
3760
3770
  }
@@ -3801,6 +3811,8 @@ function useFormValues({
3801
3811
  }
3802
3812
  }
3803
3813
  } else {
3814
+ if (!names)
3815
+ return;
3804
3816
  names.forEach((key, index) => {
3805
3817
  let defaultV = null;
3806
3818
  if (component === "TreeSelect" && (mode === "multiple" || treeCheckable) || component === "Select" && mode === "multiple") {
@@ -3817,6 +3829,100 @@ function useFormValues({
3817
3829
  initDefault
3818
3830
  };
3819
3831
  }
3832
+ var weekday$1 = { exports: {} };
3833
+ (function(module, exports) {
3834
+ !function(e, t) {
3835
+ module.exports = t();
3836
+ }(commonjsGlobal, function() {
3837
+ return function(e, t) {
3838
+ t.prototype.weekday = function(e2) {
3839
+ var t2 = this.$locale().weekStart || 0, i = this.$W, n = (i < t2 ? i + 7 : i) - t2;
3840
+ return this.$utils().u(e2) ? n : this.subtract(n, "day").add(e2, "day");
3841
+ };
3842
+ };
3843
+ });
3844
+ })(weekday$1);
3845
+ var weekday = weekday$1.exports;
3846
+ var localeData$1 = { exports: {} };
3847
+ (function(module, exports) {
3848
+ !function(n, e) {
3849
+ module.exports = e();
3850
+ }(commonjsGlobal, function() {
3851
+ return function(n, e, t) {
3852
+ var r = e.prototype, o = function(n2) {
3853
+ return n2 && (n2.indexOf ? n2 : n2.s);
3854
+ }, u = function(n2, e2, t2, r2, u2) {
3855
+ var i2 = n2.name ? n2 : n2.$locale(), a2 = o(i2[e2]), s2 = o(i2[t2]), f = a2 || s2.map(function(n3) {
3856
+ return n3.slice(0, r2);
3857
+ });
3858
+ if (!u2)
3859
+ return f;
3860
+ var d = i2.weekStart;
3861
+ return f.map(function(n3, e3) {
3862
+ return f[(e3 + (d || 0)) % 7];
3863
+ });
3864
+ }, i = function() {
3865
+ return t.Ls[t.locale()];
3866
+ }, a = function(n2, e2) {
3867
+ return n2.formats[e2] || function(n3) {
3868
+ return n3.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(n4, e3, t2) {
3869
+ return e3 || t2.slice(1);
3870
+ });
3871
+ }(n2.formats[e2.toUpperCase()]);
3872
+ }, s = function() {
3873
+ var n2 = this;
3874
+ return { months: function(e2) {
3875
+ return e2 ? e2.format("MMMM") : u(n2, "months");
3876
+ }, monthsShort: function(e2) {
3877
+ return e2 ? e2.format("MMM") : u(n2, "monthsShort", "months", 3);
3878
+ }, firstDayOfWeek: function() {
3879
+ return n2.$locale().weekStart || 0;
3880
+ }, weekdays: function(e2) {
3881
+ return e2 ? e2.format("dddd") : u(n2, "weekdays");
3882
+ }, weekdaysMin: function(e2) {
3883
+ return e2 ? e2.format("dd") : u(n2, "weekdaysMin", "weekdays", 2);
3884
+ }, weekdaysShort: function(e2) {
3885
+ return e2 ? e2.format("ddd") : u(n2, "weekdaysShort", "weekdays", 3);
3886
+ }, longDateFormat: function(e2) {
3887
+ return a(n2.$locale(), e2);
3888
+ }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
3889
+ };
3890
+ r.localeData = function() {
3891
+ return s.bind(this)();
3892
+ }, t.localeData = function() {
3893
+ var n2 = i();
3894
+ return { firstDayOfWeek: function() {
3895
+ return n2.weekStart || 0;
3896
+ }, weekdays: function() {
3897
+ return t.weekdays();
3898
+ }, weekdaysShort: function() {
3899
+ return t.weekdaysShort();
3900
+ }, weekdaysMin: function() {
3901
+ return t.weekdaysMin();
3902
+ }, months: function() {
3903
+ return t.months();
3904
+ }, monthsShort: function() {
3905
+ return t.monthsShort();
3906
+ }, longDateFormat: function(e2) {
3907
+ return a(n2, e2);
3908
+ }, meridiem: n2.meridiem, ordinal: n2.ordinal };
3909
+ }, t.months = function() {
3910
+ return u(i(), "months");
3911
+ }, t.monthsShort = function() {
3912
+ return u(i(), "monthsShort", "months", 3);
3913
+ }, t.weekdays = function(n2) {
3914
+ return u(i(), "weekdays", null, null, n2);
3915
+ }, t.weekdaysShort = function(n2) {
3916
+ return u(i(), "weekdaysShort", "weekdays", 3, n2);
3917
+ }, t.weekdaysMin = function(n2) {
3918
+ return u(i(), "weekdaysMin", "weekdays", 2, n2);
3919
+ };
3920
+ };
3921
+ });
3922
+ })(localeData$1);
3923
+ var localeData = localeData$1.exports;
3924
+ dayjs.extend(weekday);
3925
+ dayjs.extend(localeData);
3820
3926
  function useFormEvents({
3821
3927
  emit,
3822
3928
  getSchema,
@@ -4005,12 +4111,12 @@ function useFormActions(opt) {
4005
4111
  }
4006
4112
  return [handleMethod];
4007
4113
  }
4008
- const _sfc_main$O = defineComponent({
4114
+ const _sfc_main$N = defineComponent({
4009
4115
  name: "dt-form",
4010
4116
  components: {
4011
4117
  Form,
4012
4118
  Row,
4013
- FormItem: _sfc_main$Q,
4119
+ FormItem: _sfc_main$P,
4014
4120
  FormButtons
4015
4121
  },
4016
4122
  props: BasicProps$1,
@@ -4026,7 +4132,7 @@ const _sfc_main$O = defineComponent({
4026
4132
  const { style, mode } = unref(getProps);
4027
4133
  return {
4028
4134
  style: deepMerge({
4029
- padding: mode === "dialog" ? "20px" : null
4135
+ padding: mode === "dialog" ? "20px 30px" : null
4030
4136
  }, style)
4031
4137
  };
4032
4138
  });
@@ -4052,9 +4158,9 @@ const _sfc_main$O = defineComponent({
4052
4158
  const getCompact = compact === null ? mode === "dialog" ? false : true : compact;
4053
4159
  return [
4054
4160
  "basic-form",
4161
+ `basic-form--${mode}`,
4055
4162
  {
4056
- "basic-form--compact": getCompact,
4057
- "basic-form--search": mode === "search" || mode === void 0 ? true : false
4163
+ "basic-form--compact": getCompact
4058
4164
  }
4059
4165
  ];
4060
4166
  });
@@ -4239,7 +4345,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
4239
4345
  _: 3
4240
4346
  }, 16, ["class", "model", "layout"]);
4241
4347
  }
4242
- var DtForm = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$4]]);
4348
+ var DtForm = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$4]]);
4243
4349
  function useForm(props) {
4244
4350
  const formRef = ref(null);
4245
4351
  const loadedRef = ref(false);
@@ -4312,9 +4418,10 @@ function useForm(props) {
4312
4418
  };
4313
4419
  return [registerForm, methods];
4314
4420
  }
4315
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
4421
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4316
4422
  __name: "modalFooter",
4317
4423
  props: {
4424
+ buttons: Object,
4318
4425
  showSave: {
4319
4426
  type: Boolean,
4320
4427
  default: true
@@ -4325,10 +4432,16 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
4325
4432
  "handleCancel"
4326
4433
  ],
4327
4434
  setup(__props, { emit: emits }) {
4435
+ const props = __props;
4328
4436
  const buttonActions = [
4329
4437
  { name: "\u4FDD\u5B58", preIcon: "mdi:content-save", type: "primary", flag: "OK" },
4330
4438
  { name: "\u5173\u95ED", preIcon: "mdi:close", flag: "CANCEL" }
4331
4439
  ];
4440
+ const buttonList = computed(() => {
4441
+ if (props.buttons && props.buttons.length)
4442
+ return props.buttons;
4443
+ return buttonActions;
4444
+ });
4332
4445
  function handleMethod(item) {
4333
4446
  switch (item.flag) {
4334
4447
  case "OK":
@@ -4344,14 +4457,14 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
4344
4457
  renderSlot(_ctx.$slots, "appendFooter"),
4345
4458
  createVNode(unref(FormButtons), {
4346
4459
  mode: "dialog",
4347
- buttonList: buttonActions,
4460
+ buttonList: unref(buttonList),
4348
4461
  onHandleMethod: _cache[0] || (_cache[0] = ($event) => handleMethod($event))
4349
- })
4462
+ }, null, 8, ["buttonList"])
4350
4463
  ], 64);
4351
4464
  };
4352
4465
  }
4353
4466
  });
4354
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
4467
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4355
4468
  __name: "close-icon",
4356
4469
  props: {
4357
4470
  canFullscreen: { type: Boolean, default: true },
@@ -4416,7 +4529,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4416
4529
  };
4417
4530
  }
4418
4531
  });
4419
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
4532
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
4420
4533
  __name: "index",
4421
4534
  props: basicProps$1,
4422
4535
  emits: ["visible-change", "height-change", "cancel", "save", "register", "update:visible"],
@@ -4426,6 +4539,12 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4426
4539
  const propsRef = ref();
4427
4540
  const modalWrapperRef = ref(null);
4428
4541
  const extHeightRef = ref(0);
4542
+ const modalFooterHeight = computed(() => {
4543
+ if (isArray$1(props.footer)) {
4544
+ return unref(propsRef).footer.length ? 0 : void 0;
4545
+ }
4546
+ return props.footer !== void 0 && !props.footer ? 0 : void 0;
4547
+ });
4429
4548
  const modalMethods = {
4430
4549
  setModalProps,
4431
4550
  emitVisible: void 0,
@@ -4458,7 +4577,11 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4458
4577
  visible: unref(visibleRef),
4459
4578
  wrapClassName: unref(getWrapClassName)
4460
4579
  };
4461
- return omit(bindValue, unref(fullScreenRef) ? ["height", "title"] : "title");
4580
+ let omitArr = unref(fullScreenRef) ? ["height", "title"] : ["title"];
4581
+ if (isArray$1(unref(propsRef).footer)) {
4582
+ omitArr.push("footer");
4583
+ }
4584
+ return omit(bindValue, omitArr);
4462
4585
  });
4463
4586
  const getWrapperHeight = computed(() => {
4464
4587
  if (unref(fullScreenRef))
@@ -4518,7 +4641,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4518
4641
  return (_ctx, _cache) => {
4519
4642
  return openBlock(), createBlock(unref(Modal), mergeProps(unref(getBindValue), { onCancel: handleCancel }), createSlots({
4520
4643
  default: withCtx(() => [
4521
- createVNode(_sfc_main$U, mergeProps({
4644
+ createVNode(_sfc_main$T, mergeProps({
4522
4645
  useWrapper: unref(getBindValue).useWrapper,
4523
4646
  footerOffset: _ctx.wrapperFooterOffset,
4524
4647
  fullScreen: unref(fullScreenRef),
@@ -4529,7 +4652,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4529
4652
  minHeight: unref(getBindValue).minHeight,
4530
4653
  height: unref(getWrapperHeight),
4531
4654
  visible: visibleRef.value,
4532
- modalFooterHeight: _ctx.footer !== void 0 && !_ctx.footer ? 0 : void 0
4655
+ modalFooterHeight: unref(modalFooterHeight)
4533
4656
  }, unref(omit)(unref(getBindValue).wrapperProps, "visible", "height", "modalFooterHeight"), {
4534
4657
  onExtHeight: handleExtHeight,
4535
4658
  onHeightChange: handleHeightChange
@@ -4545,7 +4668,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4545
4668
  !_ctx.$slots.closeIcon ? {
4546
4669
  name: "closeIcon",
4547
4670
  fn: withCtx(() => [
4548
- createVNode(_sfc_main$M, {
4671
+ createVNode(_sfc_main$L, {
4549
4672
  canFullscreen: unref(getBindValue).canFullscreen,
4550
4673
  fullScreen: unref(fullScreenRef),
4551
4674
  onCancel: handleCancel,
@@ -4562,7 +4685,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4562
4685
  !_ctx.$slots.footer ? {
4563
4686
  name: "footer",
4564
4687
  fn: withCtx(() => [
4565
- createVNode(_sfc_main$N, {
4688
+ createVNode(_sfc_main$M, {
4689
+ buttons: propsRef.value.footer,
4566
4690
  showSave: unref(getBindValue).showSave,
4567
4691
  onHandleSave: handleSave,
4568
4692
  onHandleCancel: handleCancel
@@ -4575,7 +4699,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4575
4699
  ])
4576
4700
  };
4577
4701
  })
4578
- ]), 1032, ["showSave"])
4702
+ ]), 1032, ["buttons", "showSave"])
4579
4703
  ])
4580
4704
  } : void 0,
4581
4705
  renderList(Object.keys(unref(omit)(_ctx.$slots, "default")), (item) => {
@@ -4956,11 +5080,12 @@ function useRowSelection(propsRef, emit) {
4956
5080
  return null;
4957
5081
  }
4958
5082
  return {
4959
- ...rowSelection,
4960
5083
  selectedRowKeys: toRaw(unref(selectedRowKeysRef)),
4961
5084
  onChange: (selectedRowKeys) => {
4962
5085
  setSelectedRowKeys(selectedRowKeys);
4963
- }
5086
+ },
5087
+ preserveSelectedRowKeys: true,
5088
+ ...omit(rowSelection, ["onChange"])
4964
5089
  };
4965
5090
  });
4966
5091
  watch(() => {
@@ -5028,7 +5153,7 @@ function useRowSelection(propsRef, emit) {
5028
5153
  setSelectedRowKeys
5029
5154
  };
5030
5155
  }
5031
- var _sfc_main$K = defineComponent({
5156
+ var _sfc_main$J = defineComponent({
5032
5157
  name: "TableFormat",
5033
5158
  props: {
5034
5159
  column: {
@@ -5059,8 +5184,20 @@ var _sfc_main$K = defineComponent({
5059
5184
  dict,
5060
5185
  date,
5061
5186
  number,
5062
- percent
5187
+ percent,
5188
+ struc
5063
5189
  } = render2;
5190
+ if (struc) {
5191
+ const {
5192
+ appConf
5193
+ } = useAppStore();
5194
+ let apiStruc = appConf.structure[struc];
5195
+ if (!apiStruc) {
5196
+ error(`${struc}\u672A\u5728structure\u4E2D\u914D\u7F6E`);
5197
+ } else {
5198
+ renderText = getDictValueByCode(text, apiStruc);
5199
+ }
5200
+ }
5064
5201
  if (dict) {
5065
5202
  renderText = getDictValueByCode(text, dict);
5066
5203
  }
@@ -5129,7 +5266,7 @@ const CellComponent = ({
5129
5266
  content: () => ruleMessage
5130
5267
  });
5131
5268
  };
5132
- var _sfc_main$J = defineComponent({
5269
+ var _sfc_main$I = defineComponent({
5133
5270
  name: "EditableCell",
5134
5271
  components: {
5135
5272
  Spin,
@@ -5275,11 +5412,11 @@ var _sfc_main$J = defineComponent({
5275
5412
  };
5276
5413
  }
5277
5414
  });
5278
- const _hoisted_1$s = { class: "editable-cell" };
5415
+ const _hoisted_1$r = { class: "editable-cell" };
5279
5416
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
5280
5417
  var _a;
5281
5418
  const _component_CellComponent = resolveComponent("CellComponent");
5282
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
5419
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
5283
5420
  createVNode(_component_CellComponent, mergeProps({ ref: "elRef" }, _ctx.getComponentProps, {
5284
5421
  component: (_a = _ctx.column) == null ? void 0 : _a.editComponent,
5285
5422
  popoverVisible: _ctx.getRuleVisible,
@@ -5291,7 +5428,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
5291
5428
  }), null, 16, ["component", "popoverVisible", "rule", "ruleMessage", "class", "onChange", "onOptionsChange"])
5292
5429
  ]);
5293
5430
  }
5294
- var EditableCell = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$3]]);
5431
+ var EditableCell = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$3]]);
5295
5432
  function renderEditCell(column) {
5296
5433
  return ({ text: value, record, index }) => {
5297
5434
  record.onValid = async () => {
@@ -5330,9 +5467,9 @@ function renderEditCell(column) {
5330
5467
  });
5331
5468
  };
5332
5469
  }
5333
- const _hoisted_1$r = { class: "dt-table-action-btn" };
5334
- const _hoisted_2$j = ["color", "onClick"];
5335
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
5470
+ const _hoisted_1$q = { class: "dt-table-action-btn" };
5471
+ const _hoisted_2$i = ["color", "onClick"];
5472
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5336
5473
  __name: "TableActions",
5337
5474
  props: {
5338
5475
  fixed: {
@@ -5388,7 +5525,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5388
5525
  return (_ctx, _cache) => {
5389
5526
  const _directive_icon = resolveDirective("icon");
5390
5527
  return props.expand ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.btns, (item) => {
5391
- return openBlock(), createElementBlock("span", _hoisted_1$r, [
5528
+ return openBlock(), createElementBlock("span", _hoisted_1$q, [
5392
5529
  item.ifShow ? (openBlock(), createBlock(unref(Tooltip), {
5393
5530
  key: 0,
5394
5531
  placement: "bottom"
@@ -5400,7 +5537,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5400
5537
  withDirectives(createElementVNode("span", {
5401
5538
  color: item.color,
5402
5539
  onClick: ($event) => handleAction(item)
5403
- }, null, 8, _hoisted_2$j), [
5540
+ }, null, 8, _hoisted_2$i), [
5404
5541
  [_directive_icon, item.icon]
5405
5542
  ])
5406
5543
  ]),
@@ -5558,7 +5695,7 @@ function handleActionColumn(propsRef, columns) {
5558
5695
  columns.push({
5559
5696
  ...columnObj,
5560
5697
  customRender: ({ record, index }) => {
5561
- return h(_sfc_main$I, omit({
5698
+ return h(_sfc_main$H, omit({
5562
5699
  ...columnObj,
5563
5700
  record,
5564
5701
  index
@@ -5672,8 +5809,8 @@ function useColumns(propsRef, getPaginationRef) {
5672
5809
  getCacheColumns
5673
5810
  };
5674
5811
  }
5675
- const _hoisted_1$q = /* @__PURE__ */ createElementVNode("span", null, "\u5217\u63A7\u5236", -1);
5676
- const _hoisted_2$i = /* @__PURE__ */ createTextVNode(" \u5217\u5C55\u793A ");
5812
+ const _hoisted_1$p = /* @__PURE__ */ createElementVNode("span", null, "\u5217\u63A7\u5236", -1);
5813
+ const _hoisted_2$h = /* @__PURE__ */ createTextVNode(" \u5217\u5C55\u793A ");
5677
5814
  const _hoisted_3$b = /* @__PURE__ */ createTextVNode(" \u5E8F\u5217\u53F7 ");
5678
5815
  const _hoisted_4$8 = /* @__PURE__ */ createTextVNode(" \u590D\u9009\u6846 ");
5679
5816
  const _hoisted_5$5 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
@@ -5683,7 +5820,7 @@ const _hoisted_6$2 = {
5683
5820
  };
5684
5821
  const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("\u56FA\u5B9A\u5230\u5DE6\u4FA7");
5685
5822
  const _hoisted_8$1 = /* @__PURE__ */ createTextVNode("\u56FA\u5B9A\u5230\u53F3\u4FA7");
5686
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
5823
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5687
5824
  __name: "Column",
5688
5825
  emits: [
5689
5826
  "columns-change"
@@ -5862,7 +5999,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5862
5999
  const _directive_icon = resolveDirective("icon");
5863
6000
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
5864
6001
  title: withCtx(() => [
5865
- _hoisted_1$q
6002
+ _hoisted_1$p
5866
6003
  ]),
5867
6004
  default: withCtx(() => [
5868
6005
  createVNode(unref(Popover), {
@@ -5883,7 +6020,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5883
6020
  onChange: onCheckAllChange
5884
6021
  }, {
5885
6022
  default: withCtx(() => [
5886
- _hoisted_2$i
6023
+ _hoisted_2$h
5887
6024
  ]),
5888
6025
  _: 1
5889
6026
  }, 8, ["indeterminate", "checked"]),
@@ -6015,10 +6152,10 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
6015
6152
  };
6016
6153
  }
6017
6154
  });
6018
- const _hoisted_1$p = { key: 0 };
6019
- const _hoisted_2$h = { key: 0 };
6155
+ const _hoisted_1$o = { key: 0 };
6156
+ const _hoisted_2$g = { key: 0 };
6020
6157
  const _hoisted_3$a = { key: 1 };
6021
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
6158
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
6022
6159
  __name: "Fullscreen",
6023
6160
  setup(__props) {
6024
6161
  const table = getTableInstance();
@@ -6041,13 +6178,13 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
6041
6178
  const _directive_icon = resolveDirective("icon");
6042
6179
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
6043
6180
  title: withCtx(() => [
6044
- !unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$p, "\u5168\u5C4F")) : createCommentVNode("", true)
6181
+ !unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$o, "\u5168\u5C4F")) : createCommentVNode("", true)
6045
6182
  ]),
6046
6183
  default: withCtx(() => [
6047
6184
  createElementVNode("span", {
6048
6185
  onClick: _cache[0] || (_cache[0] = (...args) => unref(toggle) && unref(toggle)(...args))
6049
6186
  }, [
6050
- !unref(isFullscreen) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$h, null, 512)), [
6187
+ !unref(isFullscreen) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$g, null, 512)), [
6051
6188
  [_directive_icon, "ic:baseline-fullscreen"]
6052
6189
  ]) : withDirectives((openBlock(), createElementBlock("span", _hoisted_3$a, null, 512)), [
6053
6190
  [_directive_icon, "ic:baseline-fullscreen-exit"]
@@ -6059,11 +6196,11 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
6059
6196
  };
6060
6197
  }
6061
6198
  });
6062
- const _hoisted_1$o = /* @__PURE__ */ createTextVNode("\u5BC6\u5EA6");
6063
- const _hoisted_2$g = /* @__PURE__ */ createElementVNode("span", null, "\u9ED8\u8BA4", -1);
6199
+ const _hoisted_1$n = /* @__PURE__ */ createTextVNode("\u5BC6\u5EA6");
6200
+ const _hoisted_2$f = /* @__PURE__ */ createElementVNode("span", null, "\u9ED8\u8BA4", -1);
6064
6201
  const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("span", null, "\u4E2D\u7B49", -1);
6065
6202
  const _hoisted_4$7 = /* @__PURE__ */ createElementVNode("span", null, "\u7D27\u51D1", -1);
6066
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
6203
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6067
6204
  __name: "Size",
6068
6205
  setup(__props) {
6069
6206
  const table = getTableInstance();
@@ -6076,7 +6213,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
6076
6213
  const _directive_icon = resolveDirective("icon");
6077
6214
  return openBlock(), createBlock(unref(Tooltip), null, {
6078
6215
  title: withCtx(() => [
6079
- _hoisted_1$o
6216
+ _hoisted_1$n
6080
6217
  ]),
6081
6218
  default: withCtx(() => [
6082
6219
  createVNode(unref(Dropdown), {
@@ -6094,7 +6231,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
6094
6231
  default: withCtx(() => [
6095
6232
  createVNode(unref(MenuItem), { key: "default" }, {
6096
6233
  default: withCtx(() => [
6097
- _hoisted_2$g
6234
+ _hoisted_2$f
6098
6235
  ]),
6099
6236
  _: 1
6100
6237
  }),
@@ -6127,11 +6264,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
6127
6264
  };
6128
6265
  }
6129
6266
  });
6130
- const _hoisted_1$n = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA", -1);
6131
- const _hoisted_2$f = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u5F53\u524D\u9875", -1);
6267
+ const _hoisted_1$m = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA", -1);
6268
+ const _hoisted_2$e = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u5F53\u524D\u9875", -1);
6132
6269
  const _hoisted_3$8 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u9009\u4E2D\u5217", -1);
6133
6270
  const _hoisted_4$6 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u6240\u6709\u5217", -1);
6134
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
6271
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6135
6272
  __name: "Download",
6136
6273
  setup(__props) {
6137
6274
  const table = getTableInstance();
@@ -6149,7 +6286,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6149
6286
  const _directive_icon = resolveDirective("icon");
6150
6287
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
6151
6288
  title: withCtx(() => [
6152
- _hoisted_1$n
6289
+ _hoisted_1$m
6153
6290
  ]),
6154
6291
  default: withCtx(() => [
6155
6292
  createVNode(unref(Dropdown), {
@@ -6162,7 +6299,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6162
6299
  default: withCtx(() => [
6163
6300
  createVNode(unref(MenuItem), { key: "current" }, {
6164
6301
  default: withCtx(() => [
6165
- _hoisted_2$f
6302
+ _hoisted_2$e
6166
6303
  ]),
6167
6304
  _: 1
6168
6305
  }),
@@ -6195,13 +6332,13 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6195
6332
  };
6196
6333
  }
6197
6334
  });
6198
- const _sfc_main$D = defineComponent({
6335
+ const _sfc_main$C = defineComponent({
6199
6336
  name: "table-setting",
6200
6337
  components: {
6201
- ColumnSetting: _sfc_main$H,
6202
- FullscreenSetting: _sfc_main$G,
6203
- SizeSetting: _sfc_main$F,
6204
- Download: _sfc_main$E
6338
+ ColumnSetting: _sfc_main$G,
6339
+ FullscreenSetting: _sfc_main$F,
6340
+ SizeSetting: _sfc_main$E,
6341
+ Download: _sfc_main$D
6205
6342
  },
6206
6343
  props: {
6207
6344
  setting: {
@@ -6244,8 +6381,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6244
6381
  _ctx.getSetting.fullscreen ? (openBlock(), createBlock(_component_FullscreenSetting, { key: 3 })) : createCommentVNode("", true)
6245
6382
  ], 64);
6246
6383
  }
6247
- var TableSettinCom = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$2]]);
6248
- const _sfc_main$C = defineComponent({
6384
+ var TableSettinCom = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$2]]);
6385
+ const _sfc_main$B = defineComponent({
6249
6386
  name: "table-header",
6250
6387
  components: {
6251
6388
  TableSettinCom,
@@ -6285,8 +6422,8 @@ const _sfc_main$C = defineComponent({
6285
6422
  };
6286
6423
  }
6287
6424
  });
6288
- const _hoisted_1$m = { class: "dt-table-header" };
6289
- const _hoisted_2$e = { class: "dt-table-header-actions" };
6425
+ const _hoisted_1$l = { class: "dt-table-header" };
6426
+ const _hoisted_2$d = { class: "dt-table-header-actions" };
6290
6427
  const _hoisted_3$7 = { class: "dt-table-header-actions__left" };
6291
6428
  const _hoisted_4$5 = {
6292
6429
  key: 0,
@@ -6299,8 +6436,8 @@ const _hoisted_5$4 = {
6299
6436
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6300
6437
  const _component_FormButtons = resolveComponent("FormButtons");
6301
6438
  const _component_TableSettinCom = resolveComponent("TableSettinCom");
6302
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
6303
- createElementVNode("div", _hoisted_2$e, [
6439
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
6440
+ createElementVNode("div", _hoisted_2$d, [
6304
6441
  createElementVNode("div", _hoisted_3$7, [
6305
6442
  createVNode(_component_FormButtons, mergeProps(_ctx.getActionsProps, { onHandleMethod: _ctx.handleMethod }), null, 16, ["onHandleMethod"]),
6306
6443
  renderSlot(_ctx.$slots, "toolbar")
@@ -6317,12 +6454,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6317
6454
  ])) : createCommentVNode("", true)
6318
6455
  ]);
6319
6456
  }
6320
- var TableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$1]]);
6457
+ var TableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$1]]);
6321
6458
  function useTableHeader(propsRef, slots, handlers) {
6322
6459
  const getHeaderProps = computed(() => {
6323
- const { tableSetting, toolbar = [] } = unref(propsRef);
6460
+ const { tableSetting, toolbar } = unref(propsRef);
6324
6461
  const { getSlot } = useSlots();
6325
- const hideTitle = !toolbar.length && !slots.toolbar && !slots.headerTop && !tableSetting;
6462
+ const hideTitle = !toolbar && !slots.toolbar && !slots.headerTop && !tableSetting;
6326
6463
  return {
6327
6464
  title: hideTitle ? null : () => h(TableHeader, {
6328
6465
  tableTools: tableSetting,
@@ -6390,6 +6527,7 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
6390
6527
  bodyEl.style.height = "unset";
6391
6528
  if (unref(propsRef).dataSource.length === 0)
6392
6529
  return;
6530
+ filterSource.value = [];
6393
6531
  await nextTick();
6394
6532
  let headerHeight = 0, paginationHeight = 2, footerHeight = 0, titleHeight = (_b = (_a = tableEl.querySelector(".ant-table-title")) == null ? void 0 : _a.offsetHeight) != null ? _b : 0, marginHeight = 15;
6395
6533
  const headEl = tableEl.querySelector(".ant-table-thead ");
@@ -6561,12 +6699,12 @@ function useCustomRow(propsRef, { setSelectedRowKeys, getSelectRowKeys, clearSel
6561
6699
  customRow
6562
6700
  };
6563
6701
  }
6564
- const _sfc_main$B = defineComponent({
6702
+ const _sfc_main$A = defineComponent({
6565
6703
  name: "dt-table",
6566
6704
  props: TableProps,
6567
6705
  components: {
6568
6706
  Table,
6569
- TableRender: _sfc_main$K
6707
+ TableRender: _sfc_main$J
6570
6708
  },
6571
6709
  emits: [
6572
6710
  "register",
@@ -6710,9 +6848,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6710
6848
  })
6711
6849
  ]), 1040, ["rowClassName", "onChange", "onResizeColumn"]);
6712
6850
  }
6713
- var DtTable = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render]]);
6851
+ var DtTable = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render]]);
6714
6852
  function useFetch(api, baseUrl = "") {
6715
- function fetch(params) {
6853
+ function fetch(params, onlyData = true) {
6716
6854
  let type, header = {}, model = {};
6717
6855
  if (isString(api)) {
6718
6856
  api = baseUrl + api;
@@ -6730,7 +6868,7 @@ function useFetch(api, baseUrl = "") {
6730
6868
  ...header,
6731
6869
  ...{ onlyData: false }
6732
6870
  }).then((data) => {
6733
- resolve(data == null ? void 0 : data.data);
6871
+ resolve(onlyData ? data == null ? void 0 : data.data : data);
6734
6872
  }, (error2) => {
6735
6873
  reject(error2);
6736
6874
  });
@@ -6784,7 +6922,7 @@ function useSource(opt) {
6784
6922
  api: baseUrl + api[it].api
6785
6923
  };
6786
6924
  }
6787
- apiPath[it] = baseUrl + (isString(api[it]) ? api[it] : api[it].api);
6925
+ apiPath[it] = isString(api[it]) ? api[it] : api[it].api;
6788
6926
  }
6789
6927
  const { appConf } = useAppStore();
6790
6928
  const pagination = ref({
@@ -6836,6 +6974,10 @@ function useSource(opt) {
6836
6974
  loading.onQuerypage.value = true;
6837
6975
  fetch(toRaw(baseData)).then((rsp) => {
6838
6976
  var _a2, _b2, _c2;
6977
+ if (isArray$1(rsp)) {
6978
+ dataSource.value.splice(0, dataSource.value.length, ...rsp);
6979
+ return;
6980
+ }
6839
6981
  const { records, pageDTO } = rsp;
6840
6982
  dataSource.value.splice(0, dataSource.value.length, ...records);
6841
6983
  pagination.value = {
@@ -6851,8 +6993,9 @@ function useSource(opt) {
6851
6993
  }
6852
6994
  function onAdd(model) {
6853
6995
  const { fetch } = useFetch(add, baseUrl);
6854
- return fetch(model).then((rsp) => {
6855
- message.success("\u65B0\u589E\u6210\u529F");
6996
+ return fetch(model, false).then((rsp) => {
6997
+ if ((rsp == null ? void 0 : rsp.code) === 0)
6998
+ message.success("\u65B0\u589E\u6210\u529F");
6856
6999
  search();
6857
7000
  });
6858
7001
  }
@@ -6862,15 +7005,17 @@ function useSource(opt) {
6862
7005
  }
6863
7006
  function onUpdate(model) {
6864
7007
  const { fetch } = useFetch(update, baseUrl);
6865
- return fetch(model).then((rsp) => {
6866
- message.success("\u66F4\u65B0\u6570\u636E\u6210\u529F");
7008
+ return fetch(model, false).then((rsp) => {
7009
+ if ((rsp == null ? void 0 : rsp.code) === 0)
7010
+ message.success("\u66F4\u65B0\u6570\u636E\u6210\u529F");
6867
7011
  search();
6868
7012
  });
6869
7013
  }
6870
7014
  function onDeletes(ids) {
6871
7015
  const { fetch } = useFetch(deletes, baseUrl);
6872
- fetch(toRaw(ids)).then((rsp) => {
6873
- message.success(`${ids.length > 1 ? "\u6279\u91CF" : ""} \u5220\u9664\u6210\u529F\uFF01`);
7016
+ fetch(toRaw(ids), false).then((rsp) => {
7017
+ if ((rsp == null ? void 0 : rsp.code) === 0)
7018
+ message.success(`${ids.length > 1 ? "\u6279\u91CF" : ""} \u5220\u9664\u6210\u529F\uFF01`);
6874
7019
  search();
6875
7020
  });
6876
7021
  }
@@ -6924,9 +7069,9 @@ const basicProps = {
6924
7069
  type: Array,
6925
7070
  default: []
6926
7071
  },
6927
- actions: {
7072
+ footer: {
6928
7073
  type: Array,
6929
- default: []
7074
+ default: void 0
6930
7075
  },
6931
7076
  canFullscreen: {
6932
7077
  type: Boolean,
@@ -6940,7 +7085,7 @@ const basicProps = {
6940
7085
  type: Object
6941
7086
  }
6942
7087
  };
6943
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
7088
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
6944
7089
  __name: "dialog",
6945
7090
  props: {
6946
7091
  ...basicProps,
@@ -6959,7 +7104,6 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6959
7104
  const props = __props;
6960
7105
  const [registerDialog, { closeModal }] = useModal({
6961
7106
  ...omit(toRaw(props), [
6962
- "actions",
6963
7107
  "curd",
6964
7108
  "formProps",
6965
7109
  "formsVal",
@@ -6983,11 +7127,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6983
7127
  if (props.curd && isFunction((_a = props.curd) == null ? void 0 : _a.onAdd)) {
6984
7128
  let obj = Object.assign({}, props.formsVal.value || {}, getFormValues());
6985
7129
  let pro = obj.id ? props.curd.onUpdate(obj) : props.curd.onAdd(obj);
6986
- pro.then((rsp) => closeModal());
7130
+ pro == null ? void 0 : pro.then((rsp) => closeModal());
6987
7131
  }
6988
7132
  }
6989
7133
  return (_ctx, _cache) => {
6990
- return openBlock(), createBlock(unref(_sfc_main$L), {
7134
+ return openBlock(), createBlock(unref(_sfc_main$K), {
6991
7135
  onRegister: unref(registerDialog),
6992
7136
  onSave: handleSave
6993
7137
  }, {
@@ -7002,8 +7146,6 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
7002
7146
  function useCurd(curdOpt) {
7003
7147
  const formsVal = ref();
7004
7148
  const [register, {
7005
- closeModal,
7006
- setModalProps,
7007
7149
  openModal
7008
7150
  }] = useModalOut();
7009
7151
  const {
@@ -7012,13 +7154,14 @@ function useCurd(curdOpt) {
7012
7154
  const DtCurdModal = () => {
7013
7155
  return h(createVNode("div", {
7014
7156
  "class": "curdModal"
7015
- }, [createVNode(_sfc_main$A, mergeProps(curdOpt, {
7157
+ }, [createVNode(_sfc_main$z, mergeProps(curdOpt, {
7016
7158
  "formsVal": formsVal,
7017
7159
  "formProps": curdOpt.formProps,
7018
7160
  "onRegister": register
7019
7161
  }), null)]));
7020
7162
  };
7021
7163
  function add() {
7164
+ formsVal.value = null;
7022
7165
  openModal();
7023
7166
  }
7024
7167
  function del({
@@ -7050,6 +7193,7 @@ function useCurd(curdOpt) {
7050
7193
  } = curdOpt;
7051
7194
  curd.onQueryById(row[primaryKey]).then((rsp) => {
7052
7195
  formsVal.value = rsp;
7196
+ nextTick(() => dispatchResize());
7053
7197
  });
7054
7198
  openModal();
7055
7199
  }
@@ -7070,17 +7214,24 @@ function useCurd(curdOpt) {
7070
7214
  error(`\u7F3A\u5C11curd\u51FD\u6570\u914D\u7F6E, \u8BF7\u5C06useSource\u4E2D\u8FD4\u56DE\u7684curd\u53C2\u6570\u4F20\u5165useCurd\u914D\u7F6E\u9879\u4E2D!`);
7071
7215
  }
7072
7216
  }
7217
+ function setFormValues(params) {
7218
+ formsVal.value = {
7219
+ ...formsVal.value,
7220
+ ...params
7221
+ };
7222
+ }
7073
7223
  return {
7074
7224
  DtCurdModal,
7075
7225
  add,
7076
7226
  del,
7077
7227
  dels,
7078
- update
7228
+ update,
7229
+ setFormValues
7079
7230
  };
7080
7231
  }
7081
- const _hoisted_1$l = { class: "iframe-page" };
7082
- const _hoisted_2$d = ["src"];
7083
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
7232
+ const _hoisted_1$k = { class: "iframe-page" };
7233
+ const _hoisted_2$c = ["src"];
7234
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7084
7235
  __name: "index",
7085
7236
  props: {
7086
7237
  showLoading: {
@@ -7102,7 +7253,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
7102
7253
  iframeWin.postMessage(props.postMsg, props.src);
7103
7254
  }
7104
7255
  return (_ctx, _cache) => {
7105
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
7256
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
7106
7257
  createVNode(unref(Spin), {
7107
7258
  spinning: loading.value,
7108
7259
  size: "large"
@@ -7114,7 +7265,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
7114
7265
  ref_key: "frameRef",
7115
7266
  ref: frameRef,
7116
7267
  onLoad: _cache[0] || (_cache[0] = ($event) => afterLoaded())
7117
- }, null, 40, _hoisted_2$d)
7268
+ }, null, 40, _hoisted_2$c)
7118
7269
  ]),
7119
7270
  _: 1
7120
7271
  }, 8, ["spinning"])
@@ -7145,8 +7296,7 @@ const basicUploadProps = {
7145
7296
  default: () => []
7146
7297
  },
7147
7298
  maxSize: {
7148
- type: Number,
7149
- default: 2
7299
+ type: Number
7150
7300
  },
7151
7301
  maxNumber: {
7152
7302
  type: Number,
@@ -7155,6 +7305,10 @@ const basicUploadProps = {
7155
7305
  defaultFiles: {
7156
7306
  type: Array,
7157
7307
  default: []
7308
+ },
7309
+ showView: {
7310
+ type: Boolean,
7311
+ default: false
7158
7312
  }
7159
7313
  };
7160
7314
  function useHelpers(acceptRef, helpTextRef, maxNumberRef, maxSizeRef) {
@@ -7173,8 +7327,29 @@ function useHelpers(acceptRef, helpTextRef, maxNumberRef, maxSizeRef) {
7173
7327
  return `.${item}`;
7174
7328
  }).join(",");
7175
7329
  });
7330
+ const getHelpText = computed(() => {
7331
+ const helpText = unref(helpTextRef);
7332
+ if (helpText) {
7333
+ return helpText;
7334
+ }
7335
+ const helpTexts = [];
7336
+ const accept = unref(acceptRef);
7337
+ if (accept.length > 0) {
7338
+ helpTexts.push(`\u652F\u6301${accept.join(",")}\u683C\u5F0F`);
7339
+ }
7340
+ const maxSize = unref(maxSizeRef);
7341
+ if (maxSize) {
7342
+ helpTexts.push(`\u4E0D\u8D85\u8FC7${maxSize}M`);
7343
+ }
7344
+ const maxNumber = unref(maxNumberRef);
7345
+ if (maxNumber && maxNumber !== Infinity) {
7346
+ helpTexts.push(`\u6700\u591A\u53EF\u9009\u62E9${maxNumber}\u4E2A\u6587\u4EF6`);
7347
+ }
7348
+ return helpTexts.join(",") || "\u8BF7\u4E0A\u4F20pptx\u3001doc\u3001jpg\u3001jpeg\u3001png\u3001bmp\u3001gif\u3001xls\u3001xlsx\u3001txt\u3001rar\u3001zip\u30017z\u3001tar\u3001gz\u683C\u5F0F\u6587\u4EF6";
7349
+ });
7176
7350
  return {
7177
- getStringAccept
7351
+ getStringAccept,
7352
+ getHelpText
7178
7353
  };
7179
7354
  }
7180
7355
  var sparkMd5 = { exports: {} };
@@ -7586,12 +7761,12 @@ var sparkMd5 = { exports: {} };
7586
7761
  return SparkMD5;
7587
7762
  });
7588
7763
  })(sparkMd5);
7589
- const _hoisted_1$k = { class: "file-header" };
7590
- const _hoisted_2$c = /* @__PURE__ */ createTextVNode(" \u6587\u4EF6\u4E0A\u4F20 ");
7591
- const _hoisted_3$6 = /* @__PURE__ */ createTextVNode(" \u6A21\u677F\u4E0B\u8F7D ");
7592
- const _hoisted_4$4 = { class: "file-type-tips ant-alert-info" };
7593
- 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);
7594
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
7764
+ const _hoisted_1$j = { class: "dt-file" };
7765
+ const _hoisted_2$b = { class: "file-header" };
7766
+ const _hoisted_3$6 = /* @__PURE__ */ createTextVNode(" \u6587\u4EF6\u4E0A\u4F20 ");
7767
+ const _hoisted_4$4 = /* @__PURE__ */ createTextVNode(" \u6A21\u677F\u4E0B\u8F7D ");
7768
+ const _hoisted_5$3 = { class: "file-type-tips ant-alert-info" };
7769
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
7595
7770
  __name: "upload",
7596
7771
  props: basicUploadProps,
7597
7772
  setup(__props, { expose }) {
@@ -7599,22 +7774,25 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7599
7774
  const { message } = useMessage();
7600
7775
  const filesRef = ref([]);
7601
7776
  const historyFilesRef = ref([]);
7602
- const allFilesRef = ref([]);
7777
+ const allFilesRef = computed(() => {
7778
+ return [...historyFilesRef.value, ...filesRef.value];
7779
+ });
7603
7780
  const imgVisable = ref(false);
7781
+ const imgSrcRef = ref();
7604
7782
  const setImgVisible = (value) => imgVisable.value = value;
7605
7783
  const { accept, helpText, maxNumber, maxSize } = toRefs(props);
7606
- const { getStringAccept } = useHelpers(accept);
7607
- const [registerTable, {}] = useTable({
7784
+ const {
7785
+ getStringAccept,
7786
+ getHelpText
7787
+ } = useHelpers(accept, helpText, maxNumber, maxSize);
7788
+ const isImage = (fileType) => ["pdf", "jpg", "jpeg", "png", "bmp", "gif"].includes(fileType);
7789
+ const [registerTable] = useTable({
7608
7790
  tableSetting: false,
7609
7791
  pagination: false,
7610
7792
  dataSource: allFilesRef,
7611
7793
  columns: [
7612
7794
  { title: "\u6587\u4EF6\u540D\u79F0", dataIndex: "fileName" },
7613
- { title: "\u4E0A\u4F20\u72B6\u6001", dataIndex: "fileStatue", render(row) {
7614
- return h("span", {
7615
- style: `color: ${row.status === 0 ? "orange" : "green"}`
7616
- }, row.fileStatue);
7617
- } }
7795
+ { title: "\u4E0A\u4F20\u72B6\u6001", dataIndex: "fileStatue", className: "orange" }
7618
7796
  ],
7619
7797
  operations: {
7620
7798
  expand: true,
@@ -7623,28 +7801,40 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7623
7801
  title: "\u9884\u89C8",
7624
7802
  icon: "ic:baseline-remove-red-eye",
7625
7803
  ifShow(row) {
7626
- const supportFileTypes = ["pdf", "jpg", "jpeg", "png", "bmp", "gif"];
7627
- return supportFileTypes.includes(row.fileName.split(".").pop());
7804
+ if (!props.showView)
7805
+ return false;
7806
+ return isImage(row.fileName.split(".").pop());
7628
7807
  },
7629
- action: () => {
7630
- setImgVisible(true);
7808
+ action: ({ row }) => {
7809
+ if (isImage(row.fileName.split(".").pop())) {
7810
+ setImgVisible(true);
7811
+ }
7631
7812
  }
7632
7813
  },
7633
- { title: "\u7F16\u8F91", icon: "mdi:text-box-edit-outline" },
7634
- { title: "\u5220\u9664", icon: "mdi:delete-outline" }
7814
+ { title: "\u5220\u9664", icon: "mdi:delete-outline", action: ({ row }) => {
7815
+ if (!row.status)
7816
+ historyFilesRef.value = historyFilesRef.value.filter((it) => it.fileId !== row.fileId);
7817
+ else {
7818
+ filesRef.value = filesRef.value.filter((it) => it.fileId !== row.fileId);
7819
+ }
7820
+ } }
7635
7821
  ]
7636
7822
  }
7637
7823
  });
7638
- watchEffect(() => {
7639
- historyFilesRef.value = props.defaultFiles.map((file) => {
7640
- return {
7641
- ...file,
7642
- fileName: file.fileName,
7643
- status: 0,
7644
- fileStatue: "\u5386\u53F2\u4E0A\u4F20"
7645
- };
7646
- });
7647
- allFilesRef.value = [...historyFilesRef.value, ...filesRef.value];
7824
+ watch(() => props.defaultFiles, (v) => {
7825
+ if (v) {
7826
+ historyFilesRef.value = props.defaultFiles.map((file, index) => {
7827
+ return {
7828
+ ...file,
7829
+ fileId: file.id || index,
7830
+ fileName: file.fileName,
7831
+ status: 0,
7832
+ fileStatue: "\u5386\u53F2\u4E0A\u4F20"
7833
+ };
7834
+ });
7835
+ }
7836
+ }, {
7837
+ immediate: true
7648
7838
  });
7649
7839
  function beforeUpload(file) {
7650
7840
  const { maxSize: maxSize2 } = props;
@@ -7664,13 +7854,19 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7664
7854
  if (currentChunk < chunks) {
7665
7855
  loadNext();
7666
7856
  } else {
7667
- filesRef.value.push({
7857
+ let fileObj = {
7668
7858
  fileName: file.name,
7669
7859
  fileId: spark.end(),
7670
7860
  file,
7671
7861
  status: 1,
7672
7862
  fileStatue: "\u5F85\u4E0A\u4F20"
7673
- });
7863
+ };
7864
+ if (props.multiple) {
7865
+ filesRef.value.push(fileObj);
7866
+ } else {
7867
+ historyFilesRef.value = [];
7868
+ filesRef.value = [fileObj];
7869
+ }
7674
7870
  }
7675
7871
  };
7676
7872
  function loadNext() {
@@ -7684,8 +7880,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7684
7880
  });
7685
7881
  return (_ctx, _cache) => {
7686
7882
  const _directive_icon = resolveDirective("icon");
7687
- return openBlock(), createElementBlock(Fragment, null, [
7688
- createElementVNode("div", _hoisted_1$k, [
7883
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
7884
+ createElementVNode("div", _hoisted_2$b, [
7689
7885
  createElementVNode("div", null, [
7690
7886
  createVNode(unref(Upload), {
7691
7887
  accept: unref(getStringAccept),
@@ -7699,7 +7895,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7699
7895
  withDirectives(createElementVNode("span", null, null, 512), [
7700
7896
  [_directive_icon, "ic:baseline-file-upload"]
7701
7897
  ]),
7702
- _hoisted_2$c
7898
+ _hoisted_3$6
7703
7899
  ]),
7704
7900
  _: 1
7705
7901
  })
@@ -7715,18 +7911,18 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7715
7911
  withDirectives(createElementVNode("span", null, null, 512), [
7716
7912
  [_directive_icon, "ic:baseline-file-download"]
7717
7913
  ]),
7718
- _hoisted_3$6
7914
+ _hoisted_4$4
7719
7915
  ]),
7720
7916
  _: 1
7721
7917
  }, 8, ["onClick"])) : createCommentVNode("", true)
7722
7918
  ]),
7723
7919
  renderSlot(_ctx.$slots, "default")
7724
7920
  ]),
7725
- createElementVNode("div", _hoisted_4$4, [
7921
+ createElementVNode("div", _hoisted_5$3, [
7726
7922
  withDirectives(createElementVNode("span", null, null, 512), [
7727
7923
  [_directive_icon, "ant-design:info-circle-outlined"]
7728
7924
  ]),
7729
- _hoisted_5$3
7925
+ createElementVNode("i", null, toDisplayString(unref(getHelpText)), 1)
7730
7926
  ]),
7731
7927
  createVNode(unref(DtTable), { onRegister: unref(registerTable) }, null, 8, ["onRegister"]),
7732
7928
  createVNode(unref(Image), {
@@ -7736,56 +7932,17 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7736
7932
  visible: imgVisable.value,
7737
7933
  onVisibleChange: setImgVisible
7738
7934
  },
7739
- src: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
7740
- }, null, 8, ["preview"])
7741
- ], 64);
7742
- };
7743
- }
7744
- });
7745
- const _hoisted_1$j = { class: "dt-upload-wrap" };
7746
- const _hoisted_2$b = /* @__PURE__ */ createTextVNode(" 111 ");
7747
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
7748
- __name: "index",
7749
- emits: ["register"],
7750
- setup(__props, { emit: emites }) {
7751
- const uploadRef = ref(null);
7752
- const [register] = useModal({
7753
- width: "700px",
7754
- title: "\u6587\u4EF6\u4E0A\u4F20",
7755
- maskClosable: false
7756
- });
7757
- const defaultFiles = [
7758
- { fileName: "\u53EE\u549A\u53D1\u7968667.09.pdf", fileId: "1" }
7759
- ];
7760
- function handleSave() {
7761
- console.log(uploadRef.value.allFilesRef);
7762
- alert("s-s-s-");
7763
- }
7764
- return (_ctx, _cache) => {
7765
- return openBlock(), createBlock(unref(_sfc_main$L), {
7766
- onSave: _cache[0] || (_cache[0] = ($event) => handleSave()),
7767
- onRegister: unref(register)
7768
- }, {
7769
- default: withCtx(() => [
7770
- createElementVNode("div", _hoisted_1$j, [
7771
- createVNode(_sfc_main$y, {
7772
- ref_key: "uploadRef",
7773
- ref: uploadRef,
7774
- defaultFiles
7775
- }, {
7776
- default: withCtx(() => [
7777
- _hoisted_2$b
7778
- ]),
7779
- _: 1
7780
- }, 512)
7781
- ])
7782
- ]),
7783
- _: 1
7784
- }, 8, ["onRegister"]);
7935
+ src: imgSrcRef.value
7936
+ }, null, 8, ["preview", "src"])
7937
+ ]);
7785
7938
  };
7786
7939
  }
7787
7940
  });
7788
7941
  const BasicProps = {
7942
+ showIcon: {
7943
+ type: Boolean,
7944
+ default: true
7945
+ },
7789
7946
  loading: {
7790
7947
  type: Boolean,
7791
7948
  default: false
@@ -7851,7 +8008,10 @@ const BasicProps = {
7851
8008
  default: ""
7852
8009
  },
7853
8010
  toolbar: Boolean,
7854
- search: Boolean
8011
+ search: {
8012
+ type: Boolean,
8013
+ default: true
8014
+ }
7855
8015
  };
7856
8016
  const searchProps = {
7857
8017
  title: {
@@ -8319,7 +8479,7 @@ var _sfc_main$v = /* @__PURE__ */ defineComponent({
8319
8479
  item[titleField] = createVNode("span", {
8320
8480
  "class": "tree-title",
8321
8481
  "onClick": handleClickNode.bind(null, item[keyField], item[childrenField], item)
8322
- }, [(slots == null ? void 0 : slots.title) ? getSlot(slots, "title", item) : createVNode(Fragment, null, [icon && createVNode("i", {
8482
+ }, [(slots == null ? void 0 : slots.title) ? getSlot(slots, "title", item) : createVNode(Fragment, null, [unref(getBindValues).showIcon && icon && createVNode("i", {
8323
8483
  "class": `i ${icon}`
8324
8484
  }, null), titleDom, createVNode("span", {
8325
8485
  "class": "tree-action"
@@ -8327,9 +8487,6 @@ var _sfc_main$v = /* @__PURE__ */ defineComponent({
8327
8487
  });
8328
8488
  return data;
8329
8489
  });
8330
- const showTitle = computed(() => {
8331
- return true;
8332
- });
8333
8490
  const getBindValues = computed(() => {
8334
8491
  let propsData = {
8335
8492
  blockNode: true,
@@ -8369,6 +8526,9 @@ var _sfc_main$v = /* @__PURE__ */ defineComponent({
8369
8526
  };
8370
8527
  return omit(propsData, "treeData", "class");
8371
8528
  });
8529
+ const showTitle = computed(() => {
8530
+ return unref(getBindValues).search;
8531
+ });
8372
8532
  function handleClickNode(key, children, node) {
8373
8533
  emit("clickNode", node);
8374
8534
  if (!props.clickRowToExpand || !children || children.length === 0)
@@ -8581,11 +8741,10 @@ var _sfc_main$v = /* @__PURE__ */ defineComponent({
8581
8741
  const dtComponents = [
8582
8742
  { name: "dt-base-router", component: DtBaseRouter },
8583
8743
  { name: "dt-icon", component: DtIcon },
8584
- { name: "dt-pick-icon", component: _sfc_main$X },
8585
- { name: "dt-modal", component: _sfc_main$L },
8744
+ { name: "dt-pick-icon", component: _sfc_main$W },
8745
+ { name: "dt-modal", component: _sfc_main$K },
8586
8746
  { name: "dt-form", component: DtForm },
8587
- { name: "dt-upload", component: _sfc_main$y },
8588
- { name: "dt-upload-modal", component: _sfc_main$x },
8747
+ { name: "dt-upload", component: _sfc_main$x },
8589
8748
  { name: "dt-tree", component: _sfc_main$v }
8590
8749
  ];
8591
8750
  function initComponents() {
@@ -9874,7 +10033,7 @@ var _sfc_main$b = defineComponent({
9874
10033
  }), null);
9875
10034
  }
9876
10035
  return () => {
9877
- return createVNode(Fragment, null, [renderHeader(), unref(getUseScroll) ? createVNode(_sfc_main$V, null, {
10036
+ return createVNode(Fragment, null, [renderHeader(), unref(getUseScroll) ? createVNode(_sfc_main$U, null, {
9878
10037
  default: () => renderMenu()
9879
10038
  }) : renderMenu()]);
9880
10039
  };
@@ -10718,7 +10877,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10718
10877
  }, {
10719
10878
  default: withCtx(() => [
10720
10879
  unref(getShowSidebar) ? (openBlock(), createBlock(_sfc_main$7, { key: 0 })) : createCommentVNode("", true),
10721
- createVNode(unref(_sfc_main$V), {
10880
+ createVNode(unref(_sfc_main$U), {
10722
10881
  ref_key: "wrapperRef",
10723
10882
  ref: wrapperRef,
10724
10883
  class: normalizeClass({ "fixedWrap": unref(getFixed) })
@@ -10751,4 +10910,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10751
10910
  };
10752
10911
  }
10753
10912
  });
10754
- export { DtBaseRouter, DtForm, DtIcon, _sfc_main$z as DtIframe, _sfc_main$L as DtModal, _sfc_main$X 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 };
10913
+ export { DtBaseRouter, DtForm, DtIcon, _sfc_main$y as DtIframe, _sfc_main$K as DtModal, _sfc_main$W as DtPickIcon, DtTable, _sfc_main as DtTheme, _sfc_main$v as DtTree, _sfc_main$x as DtUpload, FormButtons, authMounted, export2Excel, iconMounted, initComponents, initDirectives, useCurd, useForm, useModal, useModalOut, useSource, useTable };