@dt-frames/ui 1.0.11 → 1.0.15

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 (219) hide show
  1. package/es/components/curd/src/components/dialog.d.ts +34 -25
  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/components/formInputUseDialog.d.ts +903 -0
  8. package/es/components/forms/src/hooks/useFormActions.d.ts +2 -2
  9. package/es/components/forms/src/index.d.ts +2 -2
  10. package/es/components/forms/src/types/form.type.d.ts +6 -18
  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/modal/src/types/modal.type.d.ts +4 -1
  17. package/es/components/source/src/hooks/useFetch.d.ts +1 -1
  18. package/es/components/table/src/hooks/useCustomRow.d.ts +19 -0
  19. package/es/components/table/src/hooks/useTable.d.ts +2 -2
  20. package/es/components/table/src/index.d.ts +24 -5
  21. package/es/components/table/src/props.d.ts +5 -2
  22. package/es/components/table/src/types/table.type.d.ts +2 -2
  23. package/es/components/tree/src/props.d.ts +8 -1
  24. package/es/components/upload/index.d.ts +1 -2
  25. package/es/components/upload/src/helper.d.ts +1 -0
  26. package/es/components/upload/src/index.d.ts +34 -11
  27. package/es/components/upload/src/props.d.ts +4 -1
  28. package/es/components/upload/src/upload.d.ts +42 -11
  29. package/es/index.js +356 -200
  30. package/es/style/components/forms/index.less +23 -0
  31. package/es/style/components/icons/index.less +1 -1
  32. package/es/style/components/upload/index.less +3 -11
  33. package/package.json +1 -10
  34. package/vite.config.js +10 -0
  35. package/src/assets/data/icons/actions.ts +0 -427
  36. package/src/assets/data/icons/code.ts +0 -10
  37. package/src/assets/data/icons/commuticate.ts +0 -190
  38. package/src/assets/data/icons/currency.ts +0 -46
  39. package/src/assets/data/icons/devices.ts +0 -128
  40. package/src/assets/data/icons/edit.ts +0 -165
  41. package/src/assets/data/icons/file.ts +0 -104
  42. package/src/assets/data/icons/math.ts +0 -53
  43. package/src/assets/data/icons/message.ts +0 -75
  44. package/src/assets/data/icons/navigate.ts +0 -181
  45. package/src/assets/data/icons/other.ts +0 -333
  46. package/src/assets/data/icons.ts +0 -58
  47. package/src/assets/imgs/header/avatar.png +0 -0
  48. package/src/assets/imgs/logo/logo.png +0 -0
  49. package/src/assets/locales/en_US.json +0 -3
  50. package/src/assets/locales/zh_CN.json +0 -3
  51. package/src/assets/style/index.less +0 -10
  52. package/src/assets/style/reset.less +0 -17
  53. package/src/components/container/index.less +0 -85
  54. package/src/components/container/index.ts +0 -8
  55. package/src/components/container/src/bar.ts +0 -107
  56. package/src/components/container/src/lazy-container.vue +0 -9
  57. package/src/components/container/src/scroll-bar.vue +0 -117
  58. package/src/components/container/src/scroll-container.vue +0 -61
  59. package/src/components/curd/index.ts +0 -5
  60. package/src/components/curd/src/components/dialog.vue +0 -73
  61. package/src/components/curd/src/components/props.ts +0 -32
  62. package/src/components/curd/src/hooks/useCurd.tsx +0 -87
  63. package/src/components/curd/src/types/curd.type.ts +0 -31
  64. package/src/components/excel/index.ts +0 -6
  65. package/src/components/excel/src/export2Excel.ts +0 -44
  66. package/src/components/forms/index.less +0 -84
  67. package/src/components/forms/index.ts +0 -11
  68. package/src/components/forms/src/componentMap.ts +0 -44
  69. package/src/components/forms/src/components/formButton.vue +0 -150
  70. package/src/components/forms/src/components/formIcon.vue +0 -51
  71. package/src/components/forms/src/components/formItem.vue +0 -420
  72. package/src/components/forms/src/components/radioButton.vue +0 -58
  73. package/src/components/forms/src/const/form.const.ts +0 -7
  74. package/src/components/forms/src/hooks/helper.ts +0 -70
  75. package/src/components/forms/src/hooks/useForm.ts +0 -130
  76. package/src/components/forms/src/hooks/useFormActions.ts +0 -63
  77. package/src/components/forms/src/hooks/useFormEvents.ts +0 -248
  78. package/src/components/forms/src/hooks/useFormValue.ts +0 -49
  79. package/src/components/forms/src/hooks/useFormValues.ts +0 -131
  80. package/src/components/forms/src/hooks/useLabelWidth.ts +0 -57
  81. package/src/components/forms/src/index.vue +0 -310
  82. package/src/components/forms/src/prop.ts +0 -80
  83. package/src/components/forms/src/types/form.type.ts +0 -269
  84. package/src/components/icons/index.less +0 -101
  85. package/src/components/icons/index.ts +0 -7
  86. package/src/components/icons/src/pick-icon.vue +0 -119
  87. package/src/components/icons/src/svg-icon.vue +0 -117
  88. package/src/components/iframe/index.less +0 -3
  89. package/src/components/iframe/index.ts +0 -5
  90. package/src/components/iframe/src/index.less +0 -3
  91. package/src/components/iframe/src/index.vue +0 -38
  92. package/src/components/index.ts +0 -54
  93. package/src/components/modal/index.less +0 -60
  94. package/src/components/modal/index.ts +0 -8
  95. package/src/components/modal/src/components/close-icon.vue +0 -46
  96. package/src/components/modal/src/components/modal-wrap.vue +0 -128
  97. package/src/components/modal/src/components/modal.tsx +0 -30
  98. package/src/components/modal/src/components/modalFooter.vue +0 -38
  99. package/src/components/modal/src/hooks/useDrag.ts +0 -107
  100. package/src/components/modal/src/hooks/useFullScreen.ts +0 -29
  101. package/src/components/modal/src/hooks/useModal.ts +0 -194
  102. package/src/components/modal/src/index.vue +0 -173
  103. package/src/components/modal/src/props.ts +0 -43
  104. package/src/components/modal/src/types/modal.type.ts +0 -27
  105. package/src/components/router/base-router.vue +0 -11
  106. package/src/components/router/index.ts +0 -3
  107. package/src/components/source/index.ts +0 -1
  108. package/src/components/source/src/hooks/useFetch.ts +0 -42
  109. package/src/components/source/src/hooks/usePage.ts +0 -3
  110. package/src/components/source/src/hooks/useSource.ts +0 -214
  111. package/src/components/source/src/index.ts +0 -5
  112. package/src/components/source/src/types/source.type.ts +0 -58
  113. package/src/components/source/src/types/table.type.ts +0 -8
  114. package/src/components/table/index.less +0 -179
  115. package/src/components/table/index.ts +0 -7
  116. package/src/components/table/src/components/TableActions.vue +0 -108
  117. package/src/components/table/src/components/TableHeader.vue +0 -78
  118. package/src/components/table/src/components/TableRender.vue +0 -76
  119. package/src/components/table/src/components/editable/CellComponent.ts +0 -57
  120. package/src/components/table/src/components/editable/EditTableCell.vue +0 -181
  121. package/src/components/table/src/components/editable/componentMap.ts +0 -18
  122. package/src/components/table/src/components/editable/index.ts +0 -58
  123. package/src/components/table/src/components/setting/Column.vue +0 -354
  124. package/src/components/table/src/components/setting/Download.vue +0 -55
  125. package/src/components/table/src/components/setting/Fullscreen.vue +0 -43
  126. package/src/components/table/src/components/setting/Size.vue +0 -42
  127. package/src/components/table/src/components/setting/index.vue +0 -64
  128. package/src/components/table/src/const.ts +0 -13
  129. package/src/components/table/src/hooks/useColumns.ts +0 -326
  130. package/src/components/table/src/hooks/useCustomRow.ts +0 -0
  131. package/src/components/table/src/hooks/useDataSource.ts +0 -97
  132. package/src/components/table/src/hooks/useHeaderCode.ts +0 -89
  133. package/src/components/table/src/hooks/useLoading.ts +0 -29
  134. package/src/components/table/src/hooks/usePagination.ts +0 -76
  135. package/src/components/table/src/hooks/useRowSelection.ts +0 -145
  136. package/src/components/table/src/hooks/useRows.ts +0 -30
  137. package/src/components/table/src/hooks/useTable.ts +0 -90
  138. package/src/components/table/src/hooks/useTableHeader.ts +0 -48
  139. package/src/components/table/src/hooks/useTableInstance.ts +0 -29
  140. package/src/components/table/src/hooks/useTableScroll.ts +0 -229
  141. package/src/components/table/src/index.vue +0 -200
  142. package/src/components/table/src/props.ts +0 -157
  143. package/src/components/table/src/types/table.type.ts +0 -160
  144. package/src/components/table/src/types/tableHeader.type.ts +0 -27
  145. package/src/components/tree/index.less +0 -41
  146. package/src/components/tree/index.ts +0 -5
  147. package/src/components/tree/src/components/TreeHeader.vue +0 -97
  148. package/src/components/tree/src/hooks/useTree.ts +0 -239
  149. package/src/components/tree/src/index.vue +0 -392
  150. package/src/components/tree/src/props.ts +0 -133
  151. package/src/components/tree/src/type/tree.ts +0 -105
  152. package/src/components/tree/src/utils/tree.ts +0 -73
  153. package/src/components/type.ts +0 -0
  154. package/src/components/upload/index.less +0 -43
  155. package/src/components/upload/index.ts +0 -7
  156. package/src/components/upload/src/helper.ts +0 -32
  157. package/src/components/upload/src/index.vue +0 -38
  158. package/src/components/upload/src/props.ts +0 -48
  159. package/src/components/upload/src/upload.vue +0 -166
  160. package/src/directives/icon.ts +0 -36
  161. package/src/directives/index.ts +0 -26
  162. package/src/directives/permission.ts +0 -20
  163. package/src/global.d.ts +0 -8
  164. package/src/index.ts +0 -4
  165. package/src/theme/content/index.vue +0 -37
  166. package/src/theme/feature/back-top.vue +0 -11
  167. package/src/theme/feature/index.vue +0 -7
  168. package/src/theme/footer/index.less +0 -16
  169. package/src/theme/footer/index.vue +0 -24
  170. package/src/theme/header/components/bread-crumb.vue +0 -26
  171. package/src/theme/header/components/fullscreen.vue +0 -12
  172. package/src/theme/header/components/handler.ts +0 -81
  173. package/src/theme/header/components/index.ts +0 -21
  174. package/src/theme/header/components/lang-picker.vue +0 -36
  175. package/src/theme/header/components/logo.vue +0 -35
  176. package/src/theme/header/components/menu-search.vue +0 -62
  177. package/src/theme/header/components/notify.vue +0 -22
  178. package/src/theme/header/components/setting-theme.vue +0 -123
  179. package/src/theme/header/components/theme-drawer/enum.ts +0 -12
  180. package/src/theme/header/components/theme-drawer/feature.vue +0 -75
  181. package/src/theme/header/components/theme-drawer/index.ts +0 -7
  182. package/src/theme/header/components/theme-drawer/menu-type.vue +0 -40
  183. package/src/theme/header/components/theme-drawer/select-item.vue +0 -46
  184. package/src/theme/header/components/theme-drawer/switch-item.vue +0 -39
  185. package/src/theme/header/components/theme-drawer/theme-color.vue +0 -26
  186. package/src/theme/header/components/trigger.vue +0 -14
  187. package/src/theme/header/components/user-info.vue +0 -60
  188. package/src/theme/header/const/index.ts +0 -40
  189. package/src/theme/header/helper/menu-tree.ts +0 -64
  190. package/src/theme/header/index.less +0 -442
  191. package/src/theme/header/index.ts +0 -0
  192. package/src/theme/header/index.vue +0 -96
  193. package/src/theme/header/multiple-header.vue +0 -67
  194. package/src/theme/header/set-theme.less +0 -68
  195. package/src/theme/index.ts +0 -3
  196. package/src/theme/sider/components/basic-menu/basic-menu-item.vue +0 -14
  197. package/src/theme/sider/components/basic-menu/basic-menu.vue +0 -122
  198. package/src/theme/sider/components/basic-menu/basic-sub-menu-item.vue +0 -46
  199. package/src/theme/sider/components/basic-menu/menu-item-content.vue +0 -13
  200. package/src/theme/sider/components/drag-bar.vue +0 -26
  201. package/src/theme/sider/components/layout-menu.vue +0 -132
  202. package/src/theme/sider/components/props.ts +0 -97
  203. package/src/theme/sider/components/sider-trigger.vue +0 -24
  204. package/src/theme/sider/helper/sider.ts +0 -52
  205. package/src/theme/sider/helper/split-menu.ts +0 -146
  206. package/src/theme/sider/hooks/useDragLine.ts +0 -86
  207. package/src/theme/sider/hooks/useOpenKeys.ts +0 -57
  208. package/src/theme/sider/index.less +0 -203
  209. package/src/theme/sider/index.vue +0 -88
  210. package/src/theme/tabs/components/TabContent.vue +0 -36
  211. package/src/theme/tabs/components/TabRedo.vue +0 -18
  212. package/src/theme/tabs/hooks/useMultifyTabs.ts +0 -96
  213. package/src/theme/tabs/hooks/useTabDropdown.ts +0 -89
  214. package/src/theme/tabs/index.less +0 -165
  215. package/src/theme/tabs/index.vue +0 -98
  216. package/src/theme/tabs/types/tabs.type.ts +0 -8
  217. package/src/theme/theme.less +0 -67
  218. package/src/theme/theme.vue +0 -90
  219. package/src/theme/transition.less +0 -99
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, useSlots as useSlots$1, withModifiers, vShow, toRef, Transition } from "vue";
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, useAttrs as useAttrs$1, normalizeProps, guardReactiveProps, withDirectives, resolveDirective, render, createSlots, useSlots as useSlots$1, withModifiers, vShow, toRef, Transition } from "vue";
2
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
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, Popover, Spin, Dropdown, Menu, MenuItem, CheckboxGroup, Table, 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";
4
+ import { isEqual, omit, cloneDeep, upperFirst, set, uniqBy, 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";
@@ -1875,7 +1875,7 @@ const Icons = [
1875
1875
  }
1876
1876
  ];
1877
1877
  const _hoisted_1$v = ["onClick"];
1878
- const _hoisted_2$l = ["onClick"];
1878
+ const _hoisted_2$k = ["onClick"];
1879
1879
  const _sfc_main$W = /* @__PURE__ */ defineComponent({
1880
1880
  __name: "pick-icon",
1881
1881
  emits: ["chooseIcon"],
@@ -1980,7 +1980,7 @@ const _sfc_main$W = /* @__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))
@@ -2798,7 +2798,7 @@ const _sfc_main$R = /* @__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
2803
  createVNode(unref(_sfc_main$W), {
2804
2804
  onChooseIcon: _cache[2] || (_cache[2] = ($event) => chooseIcon($event))
@@ -2810,8 +2810,49 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2810
2810
  };
2811
2811
  }
2812
2812
  });
2813
+ const _hoisted_1$t = { class: "input-with-dialog" };
2814
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2815
+ __name: "formInputUseDialog",
2816
+ setup(__props) {
2817
+ const attrs = useAttrs$1();
2818
+ const bindProps = computed(() => {
2819
+ return {
2820
+ ...omit(attrs, [
2821
+ "formValues"
2822
+ ]),
2823
+ disabled: true
2824
+ };
2825
+ });
2826
+ function onClickInput() {
2827
+ const { model, schema = {} } = attrs.formValues;
2828
+ if (!schema.openDialog || !isFunction(schema.openDialog)) {
2829
+ error("openDialog\u5FC5\u987B\u662F\u51FD\u6570");
2830
+ return;
2831
+ }
2832
+ schema.openDialog(model);
2833
+ }
2834
+ function clearProps() {
2835
+ const { model, schema = {} } = attrs.formValues;
2836
+ [...schema.linkProps, schema.name].forEach((it) => model[it] = null);
2837
+ }
2838
+ return (_ctx, _cache) => {
2839
+ var _a, _b, _c;
2840
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
2841
+ createElementVNode("div", { onClick: onClickInput }, [
2842
+ createVNode(unref(Input), normalizeProps(guardReactiveProps(unref(bindProps))), null, 16)
2843
+ ]),
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,
2846
+ class: "i mdi:close-circle",
2847
+ onClick: clearProps
2848
+ })) : createCommentVNode("", true)
2849
+ ]);
2850
+ };
2851
+ }
2852
+ });
2813
2853
  const components = {
2814
2854
  Input,
2855
+ InputWithDialog: _sfc_main$Q,
2815
2856
  InputTextArea: Input.TextArea,
2816
2857
  InputSearch: Input.Search,
2817
2858
  InputGroup: Input.Group,
@@ -2943,7 +2984,7 @@ const FormItemProps = {
2943
2984
  function _isSlot(s) {
2944
2985
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
2945
2986
  }
2946
- var _sfc_main$Q = defineComponent({
2987
+ var _sfc_main$P = defineComponent({
2947
2988
  name: "FormItem",
2948
2989
  inheritAttrs: false,
2949
2990
  props: FormItemProps,
@@ -3180,7 +3221,7 @@ var _sfc_main$Q = defineComponent({
3180
3221
  const bindValue = {
3181
3222
  [valueField || (isCheck ? "checked" : "value")]: props.formModel[name]
3182
3223
  };
3183
- const compAttr = {
3224
+ let compAttr = {
3184
3225
  ...itemProps,
3185
3226
  ...bindValue,
3186
3227
  ...on2
@@ -3271,7 +3312,7 @@ var _sfc_main$Q = defineComponent({
3271
3312
  }
3272
3313
  return createVNode(Col, {
3273
3314
  "span": 24
3274
- }, _isSlot(_slot2 = render2()) ? _slot2 : {
3315
+ }, _isSlot(_slot2 = render2(values)) ? _slot2 : {
3275
3316
  default: () => [_slot2]
3276
3317
  });
3277
3318
  }
@@ -3330,7 +3371,7 @@ function initDirectives() {
3330
3371
  }
3331
3372
  };
3332
3373
  }
3333
- const _sfc_main$P = defineComponent({
3374
+ const _sfc_main$O = defineComponent({
3334
3375
  name: "form-buttons",
3335
3376
  props: {
3336
3377
  mode: {
@@ -3417,11 +3458,11 @@ const _sfc_main$P = defineComponent({
3417
3458
  };
3418
3459
  }
3419
3460
  });
3420
- const _hoisted_1$t = {
3461
+ const _hoisted_1$s = {
3421
3462
  key: 0,
3422
3463
  className: "preIcon"
3423
3464
  };
3424
- const _hoisted_2$k = {
3465
+ const _hoisted_2$j = {
3425
3466
  key: 0,
3426
3467
  className: "preIcon"
3427
3468
  };
@@ -3453,13 +3494,13 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3453
3494
  onClick: ($event) => _ctx.handleBtnClick(button)
3454
3495
  }, {
3455
3496
  icon: withCtx(() => [
3456
- button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$t, null, 512)), [
3497
+ button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$s, null, 512)), [
3457
3498
  [_directive_icon, button.preIcon]
3458
3499
  ]) : createCommentVNode("", true)
3459
3500
  ]),
3460
3501
  default: withCtx(() => [
3461
3502
  createTextVNode(" " + toDisplayString(button.name) + " ", 1),
3462
- button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$k, null, 512)), [
3503
+ button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$j, null, 512)), [
3463
3504
  [_directive_icon, button.postIcon]
3464
3505
  ]) : createCommentVNode("", true)
3465
3506
  ]),
@@ -3493,7 +3534,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3493
3534
  _: 1
3494
3535
  }, 16)) : createCommentVNode("", true);
3495
3536
  }
3496
- var FormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$5]]);
3537
+ var FormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$5]]);
3497
3538
  const isArray = Array.isArray;
3498
3539
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3499
3540
  var dayjs_min = { exports: {} };
@@ -3966,12 +4007,12 @@ function useFormActions(opt) {
3966
4007
  }
3967
4008
  return [handleMethod];
3968
4009
  }
3969
- const _sfc_main$O = defineComponent({
4010
+ const _sfc_main$N = defineComponent({
3970
4011
  name: "dt-form",
3971
4012
  components: {
3972
4013
  Form,
3973
4014
  Row,
3974
- FormItem: _sfc_main$Q,
4015
+ FormItem: _sfc_main$P,
3975
4016
  FormButtons
3976
4017
  },
3977
4018
  props: BasicProps$1,
@@ -4200,7 +4241,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
4200
4241
  _: 3
4201
4242
  }, 16, ["class", "model", "layout"]);
4202
4243
  }
4203
- var DtForm = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$4]]);
4244
+ var DtForm = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$4]]);
4204
4245
  function useForm(props) {
4205
4246
  const formRef = ref(null);
4206
4247
  const loadedRef = ref(false);
@@ -4273,9 +4314,10 @@ function useForm(props) {
4273
4314
  };
4274
4315
  return [registerForm, methods];
4275
4316
  }
4276
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
4317
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4277
4318
  __name: "modalFooter",
4278
4319
  props: {
4320
+ buttons: Object,
4279
4321
  showSave: {
4280
4322
  type: Boolean,
4281
4323
  default: true
@@ -4286,10 +4328,16 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
4286
4328
  "handleCancel"
4287
4329
  ],
4288
4330
  setup(__props, { emit: emits }) {
4331
+ const props = __props;
4289
4332
  const buttonActions = [
4290
4333
  { name: "\u4FDD\u5B58", preIcon: "mdi:content-save", type: "primary", flag: "OK" },
4291
4334
  { name: "\u5173\u95ED", preIcon: "mdi:close", flag: "CANCEL" }
4292
4335
  ];
4336
+ const buttonList = computed(() => {
4337
+ if (props.buttons && props.buttons.length)
4338
+ return props.buttons;
4339
+ return buttonActions;
4340
+ });
4293
4341
  function handleMethod(item) {
4294
4342
  switch (item.flag) {
4295
4343
  case "OK":
@@ -4305,14 +4353,14 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
4305
4353
  renderSlot(_ctx.$slots, "appendFooter"),
4306
4354
  createVNode(unref(FormButtons), {
4307
4355
  mode: "dialog",
4308
- buttonList: buttonActions,
4356
+ buttonList: unref(buttonList),
4309
4357
  onHandleMethod: _cache[0] || (_cache[0] = ($event) => handleMethod($event))
4310
- })
4358
+ }, null, 8, ["buttonList"])
4311
4359
  ], 64);
4312
4360
  };
4313
4361
  }
4314
4362
  });
4315
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
4363
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4316
4364
  __name: "close-icon",
4317
4365
  props: {
4318
4366
  canFullscreen: { type: Boolean, default: true },
@@ -4377,7 +4425,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4377
4425
  };
4378
4426
  }
4379
4427
  });
4380
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
4428
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
4381
4429
  __name: "index",
4382
4430
  props: basicProps$1,
4383
4431
  emits: ["visible-change", "height-change", "cancel", "save", "register", "update:visible"],
@@ -4387,6 +4435,12 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4387
4435
  const propsRef = ref();
4388
4436
  const modalWrapperRef = ref(null);
4389
4437
  const extHeightRef = ref(0);
4438
+ const modalFooterHeight = computed(() => {
4439
+ if (isArray$1(props.footer)) {
4440
+ return unref(propsRef).footer.length ? 0 : void 0;
4441
+ }
4442
+ return props.footer !== void 0 && !props.footer ? 0 : void 0;
4443
+ });
4390
4444
  const modalMethods = {
4391
4445
  setModalProps,
4392
4446
  emitVisible: void 0,
@@ -4419,7 +4473,11 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4419
4473
  visible: unref(visibleRef),
4420
4474
  wrapClassName: unref(getWrapClassName)
4421
4475
  };
4422
- return omit(bindValue, unref(fullScreenRef) ? ["height", "title"] : "title");
4476
+ let omitArr = unref(fullScreenRef) ? ["height", "title"] : ["title"];
4477
+ if (isArray$1(unref(propsRef).footer)) {
4478
+ omitArr.push("footer");
4479
+ }
4480
+ return omit(bindValue, omitArr);
4423
4481
  });
4424
4482
  const getWrapperHeight = computed(() => {
4425
4483
  if (unref(fullScreenRef))
@@ -4490,7 +4548,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4490
4548
  minHeight: unref(getBindValue).minHeight,
4491
4549
  height: unref(getWrapperHeight),
4492
4550
  visible: visibleRef.value,
4493
- modalFooterHeight: _ctx.footer !== void 0 && !_ctx.footer ? 0 : void 0
4551
+ modalFooterHeight: unref(modalFooterHeight)
4494
4552
  }, unref(omit)(unref(getBindValue).wrapperProps, "visible", "height", "modalFooterHeight"), {
4495
4553
  onExtHeight: handleExtHeight,
4496
4554
  onHeightChange: handleHeightChange
@@ -4506,7 +4564,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4506
4564
  !_ctx.$slots.closeIcon ? {
4507
4565
  name: "closeIcon",
4508
4566
  fn: withCtx(() => [
4509
- createVNode(_sfc_main$M, {
4567
+ createVNode(_sfc_main$L, {
4510
4568
  canFullscreen: unref(getBindValue).canFullscreen,
4511
4569
  fullScreen: unref(fullScreenRef),
4512
4570
  onCancel: handleCancel,
@@ -4523,7 +4581,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4523
4581
  !_ctx.$slots.footer ? {
4524
4582
  name: "footer",
4525
4583
  fn: withCtx(() => [
4526
- createVNode(_sfc_main$N, {
4584
+ createVNode(_sfc_main$M, {
4585
+ buttons: propsRef.value.footer,
4527
4586
  showSave: unref(getBindValue).showSave,
4528
4587
  onHandleSave: handleSave,
4529
4588
  onHandleCancel: handleCancel
@@ -4536,7 +4595,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4536
4595
  ])
4537
4596
  };
4538
4597
  })
4539
- ]), 1032, ["showSave"])
4598
+ ]), 1032, ["buttons", "showSave"])
4540
4599
  ])
4541
4600
  } : void 0,
4542
4601
  renderList(Object.keys(unref(omit)(_ctx.$slots, "default")), (item) => {
@@ -4685,6 +4744,7 @@ const TABLE_SIZE_HEIGHT = {
4685
4744
  const TableProps = {
4686
4745
  clickRowSelect: { type: Boolean, default: false },
4687
4746
  tableSetting: { type: Object, default: () => ({}) },
4747
+ clickToRowSelect: { type: Boolean, default: false },
4688
4748
  striped: { type: Boolean, default: true },
4689
4749
  canColDrag: { type: Boolean, default: true },
4690
4750
  resizable: { type: Boolean, default: true },
@@ -4988,7 +5048,7 @@ function useRowSelection(propsRef, emit) {
4988
5048
  setSelectedRowKeys
4989
5049
  };
4990
5050
  }
4991
- var _sfc_main$K = defineComponent({
5051
+ var _sfc_main$J = defineComponent({
4992
5052
  name: "TableFormat",
4993
5053
  props: {
4994
5054
  column: {
@@ -5089,7 +5149,7 @@ const CellComponent = ({
5089
5149
  content: () => ruleMessage
5090
5150
  });
5091
5151
  };
5092
- var _sfc_main$J = defineComponent({
5152
+ var _sfc_main$I = defineComponent({
5093
5153
  name: "EditableCell",
5094
5154
  components: {
5095
5155
  Spin,
@@ -5235,11 +5295,11 @@ var _sfc_main$J = defineComponent({
5235
5295
  };
5236
5296
  }
5237
5297
  });
5238
- const _hoisted_1$s = { class: "editable-cell" };
5298
+ const _hoisted_1$r = { class: "editable-cell" };
5239
5299
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
5240
5300
  var _a;
5241
5301
  const _component_CellComponent = resolveComponent("CellComponent");
5242
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
5302
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
5243
5303
  createVNode(_component_CellComponent, mergeProps({ ref: "elRef" }, _ctx.getComponentProps, {
5244
5304
  component: (_a = _ctx.column) == null ? void 0 : _a.editComponent,
5245
5305
  popoverVisible: _ctx.getRuleVisible,
@@ -5251,7 +5311,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
5251
5311
  }), null, 16, ["component", "popoverVisible", "rule", "ruleMessage", "class", "onChange", "onOptionsChange"])
5252
5312
  ]);
5253
5313
  }
5254
- var EditableCell = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$3]]);
5314
+ var EditableCell = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$3]]);
5255
5315
  function renderEditCell(column) {
5256
5316
  return ({ text: value, record, index }) => {
5257
5317
  record.onValid = async () => {
@@ -5290,9 +5350,9 @@ function renderEditCell(column) {
5290
5350
  });
5291
5351
  };
5292
5352
  }
5293
- const _hoisted_1$r = { class: "dt-table-action-btn" };
5294
- const _hoisted_2$j = ["color", "onClick"];
5295
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
5353
+ const _hoisted_1$q = { class: "dt-table-action-btn" };
5354
+ const _hoisted_2$i = ["color", "onClick"];
5355
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5296
5356
  __name: "TableActions",
5297
5357
  props: {
5298
5358
  fixed: {
@@ -5348,7 +5408,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5348
5408
  return (_ctx, _cache) => {
5349
5409
  const _directive_icon = resolveDirective("icon");
5350
5410
  return props.expand ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.btns, (item) => {
5351
- return openBlock(), createElementBlock("span", _hoisted_1$r, [
5411
+ return openBlock(), createElementBlock("span", _hoisted_1$q, [
5352
5412
  item.ifShow ? (openBlock(), createBlock(unref(Tooltip), {
5353
5413
  key: 0,
5354
5414
  placement: "bottom"
@@ -5360,7 +5420,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5360
5420
  withDirectives(createElementVNode("span", {
5361
5421
  color: item.color,
5362
5422
  onClick: ($event) => handleAction(item)
5363
- }, null, 8, _hoisted_2$j), [
5423
+ }, null, 8, _hoisted_2$i), [
5364
5424
  [_directive_icon, item.icon]
5365
5425
  ])
5366
5426
  ]),
@@ -5518,7 +5578,7 @@ function handleActionColumn(propsRef, columns) {
5518
5578
  columns.push({
5519
5579
  ...columnObj,
5520
5580
  customRender: ({ record, index }) => {
5521
- return h(_sfc_main$I, omit({
5581
+ return h(_sfc_main$H, omit({
5522
5582
  ...columnObj,
5523
5583
  record,
5524
5584
  index
@@ -5632,8 +5692,8 @@ function useColumns(propsRef, getPaginationRef) {
5632
5692
  getCacheColumns
5633
5693
  };
5634
5694
  }
5635
- const _hoisted_1$q = /* @__PURE__ */ createElementVNode("span", null, "\u5217\u63A7\u5236", -1);
5636
- const _hoisted_2$i = /* @__PURE__ */ createTextVNode(" \u5217\u5C55\u793A ");
5695
+ const _hoisted_1$p = /* @__PURE__ */ createElementVNode("span", null, "\u5217\u63A7\u5236", -1);
5696
+ const _hoisted_2$h = /* @__PURE__ */ createTextVNode(" \u5217\u5C55\u793A ");
5637
5697
  const _hoisted_3$b = /* @__PURE__ */ createTextVNode(" \u5E8F\u5217\u53F7 ");
5638
5698
  const _hoisted_4$8 = /* @__PURE__ */ createTextVNode(" \u590D\u9009\u6846 ");
5639
5699
  const _hoisted_5$5 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
@@ -5643,7 +5703,7 @@ const _hoisted_6$2 = {
5643
5703
  };
5644
5704
  const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("\u56FA\u5B9A\u5230\u5DE6\u4FA7");
5645
5705
  const _hoisted_8$1 = /* @__PURE__ */ createTextVNode("\u56FA\u5B9A\u5230\u53F3\u4FA7");
5646
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
5706
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5647
5707
  __name: "Column",
5648
5708
  emits: [
5649
5709
  "columns-change"
@@ -5822,7 +5882,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5822
5882
  const _directive_icon = resolveDirective("icon");
5823
5883
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
5824
5884
  title: withCtx(() => [
5825
- _hoisted_1$q
5885
+ _hoisted_1$p
5826
5886
  ]),
5827
5887
  default: withCtx(() => [
5828
5888
  createVNode(unref(Popover), {
@@ -5843,7 +5903,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5843
5903
  onChange: onCheckAllChange
5844
5904
  }, {
5845
5905
  default: withCtx(() => [
5846
- _hoisted_2$i
5906
+ _hoisted_2$h
5847
5907
  ]),
5848
5908
  _: 1
5849
5909
  }, 8, ["indeterminate", "checked"]),
@@ -5975,10 +6035,10 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5975
6035
  };
5976
6036
  }
5977
6037
  });
5978
- const _hoisted_1$p = { key: 0 };
5979
- const _hoisted_2$h = { key: 0 };
6038
+ const _hoisted_1$o = { key: 0 };
6039
+ const _hoisted_2$g = { key: 0 };
5980
6040
  const _hoisted_3$a = { key: 1 };
5981
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
6041
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
5982
6042
  __name: "Fullscreen",
5983
6043
  setup(__props) {
5984
6044
  const table = getTableInstance();
@@ -6001,13 +6061,13 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
6001
6061
  const _directive_icon = resolveDirective("icon");
6002
6062
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
6003
6063
  title: withCtx(() => [
6004
- !unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$p, "\u5168\u5C4F")) : createCommentVNode("", true)
6064
+ !unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$o, "\u5168\u5C4F")) : createCommentVNode("", true)
6005
6065
  ]),
6006
6066
  default: withCtx(() => [
6007
6067
  createElementVNode("span", {
6008
6068
  onClick: _cache[0] || (_cache[0] = (...args) => unref(toggle) && unref(toggle)(...args))
6009
6069
  }, [
6010
- !unref(isFullscreen) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$h, null, 512)), [
6070
+ !unref(isFullscreen) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$g, null, 512)), [
6011
6071
  [_directive_icon, "ic:baseline-fullscreen"]
6012
6072
  ]) : withDirectives((openBlock(), createElementBlock("span", _hoisted_3$a, null, 512)), [
6013
6073
  [_directive_icon, "ic:baseline-fullscreen-exit"]
@@ -6019,11 +6079,11 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
6019
6079
  };
6020
6080
  }
6021
6081
  });
6022
- const _hoisted_1$o = /* @__PURE__ */ createTextVNode("\u5BC6\u5EA6");
6023
- const _hoisted_2$g = /* @__PURE__ */ createElementVNode("span", null, "\u9ED8\u8BA4", -1);
6082
+ const _hoisted_1$n = /* @__PURE__ */ createTextVNode("\u5BC6\u5EA6");
6083
+ const _hoisted_2$f = /* @__PURE__ */ createElementVNode("span", null, "\u9ED8\u8BA4", -1);
6024
6084
  const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("span", null, "\u4E2D\u7B49", -1);
6025
6085
  const _hoisted_4$7 = /* @__PURE__ */ createElementVNode("span", null, "\u7D27\u51D1", -1);
6026
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
6086
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6027
6087
  __name: "Size",
6028
6088
  setup(__props) {
6029
6089
  const table = getTableInstance();
@@ -6036,7 +6096,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
6036
6096
  const _directive_icon = resolveDirective("icon");
6037
6097
  return openBlock(), createBlock(unref(Tooltip), null, {
6038
6098
  title: withCtx(() => [
6039
- _hoisted_1$o
6099
+ _hoisted_1$n
6040
6100
  ]),
6041
6101
  default: withCtx(() => [
6042
6102
  createVNode(unref(Dropdown), {
@@ -6054,7 +6114,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
6054
6114
  default: withCtx(() => [
6055
6115
  createVNode(unref(MenuItem), { key: "default" }, {
6056
6116
  default: withCtx(() => [
6057
- _hoisted_2$g
6117
+ _hoisted_2$f
6058
6118
  ]),
6059
6119
  _: 1
6060
6120
  }),
@@ -6087,11 +6147,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
6087
6147
  };
6088
6148
  }
6089
6149
  });
6090
- const _hoisted_1$n = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA", -1);
6091
- const _hoisted_2$f = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u5F53\u524D\u9875", -1);
6150
+ const _hoisted_1$m = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA", -1);
6151
+ const _hoisted_2$e = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u5F53\u524D\u9875", -1);
6092
6152
  const _hoisted_3$8 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u9009\u4E2D\u5217", -1);
6093
6153
  const _hoisted_4$6 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u51FA\u6240\u6709\u5217", -1);
6094
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
6154
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6095
6155
  __name: "Download",
6096
6156
  setup(__props) {
6097
6157
  const table = getTableInstance();
@@ -6109,7 +6169,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6109
6169
  const _directive_icon = resolveDirective("icon");
6110
6170
  return openBlock(), createBlock(unref(Tooltip), { placement: "top" }, {
6111
6171
  title: withCtx(() => [
6112
- _hoisted_1$n
6172
+ _hoisted_1$m
6113
6173
  ]),
6114
6174
  default: withCtx(() => [
6115
6175
  createVNode(unref(Dropdown), {
@@ -6122,7 +6182,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6122
6182
  default: withCtx(() => [
6123
6183
  createVNode(unref(MenuItem), { key: "current" }, {
6124
6184
  default: withCtx(() => [
6125
- _hoisted_2$f
6185
+ _hoisted_2$e
6126
6186
  ]),
6127
6187
  _: 1
6128
6188
  }),
@@ -6155,13 +6215,13 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6155
6215
  };
6156
6216
  }
6157
6217
  });
6158
- const _sfc_main$D = defineComponent({
6218
+ const _sfc_main$C = defineComponent({
6159
6219
  name: "table-setting",
6160
6220
  components: {
6161
- ColumnSetting: _sfc_main$H,
6162
- FullscreenSetting: _sfc_main$G,
6163
- SizeSetting: _sfc_main$F,
6164
- Download: _sfc_main$E
6221
+ ColumnSetting: _sfc_main$G,
6222
+ FullscreenSetting: _sfc_main$F,
6223
+ SizeSetting: _sfc_main$E,
6224
+ Download: _sfc_main$D
6165
6225
  },
6166
6226
  props: {
6167
6227
  setting: {
@@ -6204,8 +6264,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6204
6264
  _ctx.getSetting.fullscreen ? (openBlock(), createBlock(_component_FullscreenSetting, { key: 3 })) : createCommentVNode("", true)
6205
6265
  ], 64);
6206
6266
  }
6207
- var TableSettinCom = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$2]]);
6208
- const _sfc_main$C = defineComponent({
6267
+ var TableSettinCom = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$2]]);
6268
+ const _sfc_main$B = defineComponent({
6209
6269
  name: "table-header",
6210
6270
  components: {
6211
6271
  TableSettinCom,
@@ -6215,7 +6275,7 @@ const _sfc_main$C = defineComponent({
6215
6275
  },
6216
6276
  props: {
6217
6277
  tableTools: {
6218
- type: Object
6278
+ type: [Object, Boolean]
6219
6279
  },
6220
6280
  toolbar: {
6221
6281
  type: Array,
@@ -6245,8 +6305,8 @@ const _sfc_main$C = defineComponent({
6245
6305
  };
6246
6306
  }
6247
6307
  });
6248
- const _hoisted_1$m = { class: "dt-table-header" };
6249
- const _hoisted_2$e = { class: "dt-table-header-actions" };
6308
+ const _hoisted_1$l = { class: "dt-table-header" };
6309
+ const _hoisted_2$d = { class: "dt-table-header-actions" };
6250
6310
  const _hoisted_3$7 = { class: "dt-table-header-actions__left" };
6251
6311
  const _hoisted_4$5 = {
6252
6312
  key: 0,
@@ -6259,8 +6319,8 @@ const _hoisted_5$4 = {
6259
6319
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6260
6320
  const _component_FormButtons = resolveComponent("FormButtons");
6261
6321
  const _component_TableSettinCom = resolveComponent("TableSettinCom");
6262
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
6263
- createElementVNode("div", _hoisted_2$e, [
6322
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
6323
+ createElementVNode("div", _hoisted_2$d, [
6264
6324
  createElementVNode("div", _hoisted_3$7, [
6265
6325
  createVNode(_component_FormButtons, mergeProps(_ctx.getActionsProps, { onHandleMethod: _ctx.handleMethod }), null, 16, ["onHandleMethod"]),
6266
6326
  renderSlot(_ctx.$slots, "toolbar")
@@ -6277,12 +6337,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6277
6337
  ])) : createCommentVNode("", true)
6278
6338
  ]);
6279
6339
  }
6280
- var TableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$1]]);
6340
+ var TableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$1]]);
6281
6341
  function useTableHeader(propsRef, slots, handlers) {
6282
6342
  const getHeaderProps = computed(() => {
6283
- const { tableSetting, toolbar = [] } = unref(propsRef);
6343
+ const { tableSetting, toolbar } = unref(propsRef);
6284
6344
  const { getSlot } = useSlots();
6285
- const hideTitle = !toolbar.length && !slots.toolbar && !slots.headerTop && !tableSetting;
6345
+ const hideTitle = !toolbar && !slots.toolbar && !slots.headerTop && !tableSetting;
6286
6346
  return {
6287
6347
  title: hideTitle ? null : () => h(TableHeader, {
6288
6348
  tableTools: tableSetting,
@@ -6457,12 +6517,76 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
6457
6517
  filterSource
6458
6518
  };
6459
6519
  }
6460
- const _sfc_main$B = defineComponent({
6520
+ function useCustomRow(propsRef, { setSelectedRowKeys, getSelectRowKeys, clearSelectedRowKeys, emit }) {
6521
+ const customRow = (record, index) => {
6522
+ return {
6523
+ onClick: (e) => {
6524
+ e == null ? void 0 : e.stopPropagation();
6525
+ function handleClick() {
6526
+ var _a;
6527
+ const { rowSelection, rowKey, clickToRowSelect } = unref(propsRef);
6528
+ if (!rowSelection || !clickToRowSelect)
6529
+ return;
6530
+ const keys = getSelectRowKeys();
6531
+ const key = record[rowKey];
6532
+ if (!key)
6533
+ return;
6534
+ const isCheckbox = rowSelection.type === "checkbox";
6535
+ if (isCheckbox) {
6536
+ const tr = (_a = e.composedPath) == null ? void 0 : _a.call(e).find((dom) => dom.tagName === "TR");
6537
+ if (!tr)
6538
+ return;
6539
+ const checkBox = tr.querySelector("input[type=checkbox]");
6540
+ if (!checkBox || checkBox.hasAttribute("disabled"))
6541
+ return;
6542
+ if (!keys.includes(key)) {
6543
+ setSelectedRowKeys([...keys, key]);
6544
+ return;
6545
+ }
6546
+ const keyIndex = keys.findIndex((item) => item === key);
6547
+ keys.splice(keyIndex, 1);
6548
+ setSelectedRowKeys(keys);
6549
+ return;
6550
+ }
6551
+ const isRadio = rowSelection.type === "radio";
6552
+ if (isRadio) {
6553
+ if (!keys.includes(key)) {
6554
+ if (keys.length) {
6555
+ clearSelectedRowKeys();
6556
+ }
6557
+ setSelectedRowKeys([key]);
6558
+ return;
6559
+ }
6560
+ clearSelectedRowKeys();
6561
+ }
6562
+ }
6563
+ handleClick();
6564
+ emit("row-click", record, index, e);
6565
+ },
6566
+ onDblclick: (event) => {
6567
+ emit("row-dbClick", record, index, event);
6568
+ },
6569
+ onContextmenu: (event) => {
6570
+ emit("row-contextmenu", record, index, event);
6571
+ },
6572
+ onMouseenter: (event) => {
6573
+ emit("row-mouseenter", record, index, event);
6574
+ },
6575
+ onMouseleave: (event) => {
6576
+ emit("row-mouseleave", record, index, event);
6577
+ }
6578
+ };
6579
+ };
6580
+ return {
6581
+ customRow
6582
+ };
6583
+ }
6584
+ const _sfc_main$A = defineComponent({
6461
6585
  name: "dt-table",
6462
6586
  props: TableProps,
6463
6587
  components: {
6464
6588
  Table,
6465
- TableRender: _sfc_main$K
6589
+ TableRender: _sfc_main$J
6466
6590
  },
6467
6591
  emits: [
6468
6592
  "register",
@@ -6470,6 +6594,9 @@ const _sfc_main$B = defineComponent({
6470
6594
  "selection-change",
6471
6595
  "row-click",
6472
6596
  "row-dbClick",
6597
+ "row-contextmenu",
6598
+ "row-mouseenter",
6599
+ "row-mouseleave",
6473
6600
  "expanded-rows-change",
6474
6601
  "edit-change"
6475
6602
  ],
@@ -6495,7 +6622,8 @@ const _sfc_main$B = defineComponent({
6495
6622
  clearSelectedRowKeys,
6496
6623
  getRowSelection,
6497
6624
  getSelectRows,
6498
- getSelectRowKeys
6625
+ getSelectRowKeys,
6626
+ setSelectedRowKeys
6499
6627
  } = useRowSelection(getProps, emit);
6500
6628
  const { getScrollRef, filterSource } = useTableScroll(getProps, tableElRef, getColumnsRef, getRowSelectionRef);
6501
6629
  function setProps(props2) {
@@ -6526,6 +6654,12 @@ const _sfc_main$B = defineComponent({
6526
6654
  setPagination,
6527
6655
  clearSelectedRowKeys
6528
6656
  });
6657
+ const { customRow } = useCustomRow(getProps, {
6658
+ setSelectedRowKeys,
6659
+ getSelectRowKeys,
6660
+ clearSelectedRowKeys,
6661
+ emit
6662
+ });
6529
6663
  const getBind = computed(() => {
6530
6664
  return {
6531
6665
  ...attrs,
@@ -6538,7 +6672,8 @@ const _sfc_main$B = defineComponent({
6538
6672
  rowSelection: unref(getRowSelectionRef),
6539
6673
  rowKey: unref(getProps).rowKey,
6540
6674
  columns: unref(getViewColumns),
6541
- tableLayout: "fixed"
6675
+ tableLayout: "fixed",
6676
+ customRow
6542
6677
  };
6543
6678
  });
6544
6679
  createTableInstance({ ...tableAction, tableElRef, getBind });
@@ -6595,9 +6730,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6595
6730
  })
6596
6731
  ]), 1040, ["rowClassName", "onChange", "onResizeColumn"]);
6597
6732
  }
6598
- var DtTable = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render]]);
6733
+ var DtTable = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render]]);
6599
6734
  function useFetch(api, baseUrl = "") {
6600
- function fetch(params) {
6735
+ function fetch(params, onlyData = true) {
6601
6736
  let type, header = {}, model = {};
6602
6737
  if (isString(api)) {
6603
6738
  api = baseUrl + api;
@@ -6615,7 +6750,7 @@ function useFetch(api, baseUrl = "") {
6615
6750
  ...header,
6616
6751
  ...{ onlyData: false }
6617
6752
  }).then((data) => {
6618
- resolve(data == null ? void 0 : data.data);
6753
+ resolve(onlyData ? data == null ? void 0 : data.data : data);
6619
6754
  }, (error2) => {
6620
6755
  reject(error2);
6621
6756
  });
@@ -6669,7 +6804,7 @@ function useSource(opt) {
6669
6804
  api: baseUrl + api[it].api
6670
6805
  };
6671
6806
  }
6672
- apiPath[it] = baseUrl + (isString(api[it]) ? api[it] : api[it].api);
6807
+ apiPath[it] = isString(api[it]) ? api[it] : api[it].api;
6673
6808
  }
6674
6809
  const { appConf } = useAppStore();
6675
6810
  const pagination = ref({
@@ -6721,6 +6856,10 @@ function useSource(opt) {
6721
6856
  loading.onQuerypage.value = true;
6722
6857
  fetch(toRaw(baseData)).then((rsp) => {
6723
6858
  var _a2, _b2, _c2;
6859
+ if (isArray$1(rsp)) {
6860
+ dataSource.value.splice(0, dataSource.value.length, ...rsp);
6861
+ return;
6862
+ }
6724
6863
  const { records, pageDTO } = rsp;
6725
6864
  dataSource.value.splice(0, dataSource.value.length, ...records);
6726
6865
  pagination.value = {
@@ -6736,8 +6875,9 @@ function useSource(opt) {
6736
6875
  }
6737
6876
  function onAdd(model) {
6738
6877
  const { fetch } = useFetch(add, baseUrl);
6739
- return fetch(model).then((rsp) => {
6740
- message.success("\u65B0\u589E\u6210\u529F");
6878
+ return fetch(model, false).then((rsp) => {
6879
+ if ((rsp == null ? void 0 : rsp.code) === 0)
6880
+ message.success("\u65B0\u589E\u6210\u529F");
6741
6881
  search();
6742
6882
  });
6743
6883
  }
@@ -6747,15 +6887,17 @@ function useSource(opt) {
6747
6887
  }
6748
6888
  function onUpdate(model) {
6749
6889
  const { fetch } = useFetch(update, baseUrl);
6750
- return fetch(model).then((rsp) => {
6751
- message.success("\u66F4\u65B0\u6570\u636E\u6210\u529F");
6890
+ return fetch(model, false).then((rsp) => {
6891
+ if ((rsp == null ? void 0 : rsp.code) === 0)
6892
+ message.success("\u66F4\u65B0\u6570\u636E\u6210\u529F");
6752
6893
  search();
6753
6894
  });
6754
6895
  }
6755
6896
  function onDeletes(ids) {
6756
6897
  const { fetch } = useFetch(deletes, baseUrl);
6757
- fetch(toRaw(ids)).then((rsp) => {
6758
- message.success(`${ids.length > 1 ? "\u6279\u91CF" : ""} \u5220\u9664\u6210\u529F\uFF01`);
6898
+ fetch(toRaw(ids), false).then((rsp) => {
6899
+ if ((rsp == null ? void 0 : rsp.code) === 0)
6900
+ message.success(`${ids.length > 1 ? "\u6279\u91CF" : ""} \u5220\u9664\u6210\u529F\uFF01`);
6759
6901
  search();
6760
6902
  });
6761
6903
  }
@@ -6809,9 +6951,9 @@ const basicProps = {
6809
6951
  type: Array,
6810
6952
  default: []
6811
6953
  },
6812
- actions: {
6954
+ footer: {
6813
6955
  type: Array,
6814
- default: []
6956
+ default: void 0
6815
6957
  },
6816
6958
  canFullscreen: {
6817
6959
  type: Boolean,
@@ -6825,14 +6967,15 @@ const basicProps = {
6825
6967
  type: Object
6826
6968
  }
6827
6969
  };
6828
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
6970
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
6829
6971
  __name: "dialog",
6830
6972
  props: {
6831
6973
  ...basicProps,
6832
6974
  ...{
6833
6975
  onRegister: { type: Function },
6834
6976
  formProps: {
6835
- type: Object
6977
+ type: Object,
6978
+ default: () => ({})
6836
6979
  },
6837
6980
  formsVal: {
6838
6981
  type: Object
@@ -6843,7 +6986,6 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6843
6986
  const props = __props;
6844
6987
  const [registerDialog, { closeModal }] = useModal({
6845
6988
  ...omit(toRaw(props), [
6846
- "actions",
6847
6989
  "curd",
6848
6990
  "formProps",
6849
6991
  "formsVal",
@@ -6853,7 +6995,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6853
6995
  destroyOnClose: true
6854
6996
  });
6855
6997
  const [registerForm, { getFormValues, setFormValues }] = useForm({
6856
- ...props.formProps.value || {},
6998
+ ...props.formProps || {},
6857
6999
  schemas: props.schemas,
6858
7000
  mode: "dialog"
6859
7001
  });
@@ -6867,11 +7009,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6867
7009
  if (props.curd && isFunction((_a = props.curd) == null ? void 0 : _a.onAdd)) {
6868
7010
  let obj = Object.assign({}, props.formsVal.value || {}, getFormValues());
6869
7011
  let pro = obj.id ? props.curd.onUpdate(obj) : props.curd.onAdd(obj);
6870
- pro.then((rsp) => closeModal());
7012
+ pro == null ? void 0 : pro.then((rsp) => closeModal());
6871
7013
  }
6872
7014
  }
6873
7015
  return (_ctx, _cache) => {
6874
- return openBlock(), createBlock(unref(_sfc_main$L), {
7016
+ return openBlock(), createBlock(unref(_sfc_main$K), {
6875
7017
  onRegister: unref(registerDialog),
6876
7018
  onSave: handleSave
6877
7019
  }, {
@@ -6886,8 +7028,6 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6886
7028
  function useCurd(curdOpt) {
6887
7029
  const formsVal = ref();
6888
7030
  const [register, {
6889
- closeModal,
6890
- setModalProps,
6891
7031
  openModal
6892
7032
  }] = useModalOut();
6893
7033
  const {
@@ -6896,13 +7036,14 @@ function useCurd(curdOpt) {
6896
7036
  const DtCurdModal = () => {
6897
7037
  return h(createVNode("div", {
6898
7038
  "class": "curdModal"
6899
- }, [createVNode(_sfc_main$A, mergeProps(curdOpt, {
7039
+ }, [createVNode(_sfc_main$z, mergeProps(curdOpt, {
6900
7040
  "formsVal": formsVal,
6901
7041
  "formProps": curdOpt.formProps,
6902
7042
  "onRegister": register
6903
7043
  }), null)]));
6904
7044
  };
6905
7045
  function add() {
7046
+ formsVal.value = null;
6906
7047
  openModal();
6907
7048
  }
6908
7049
  function del({
@@ -6954,17 +7095,24 @@ function useCurd(curdOpt) {
6954
7095
  error(`\u7F3A\u5C11curd\u51FD\u6570\u914D\u7F6E, \u8BF7\u5C06useSource\u4E2D\u8FD4\u56DE\u7684curd\u53C2\u6570\u4F20\u5165useCurd\u914D\u7F6E\u9879\u4E2D!`);
6955
7096
  }
6956
7097
  }
7098
+ function setFormValues(params) {
7099
+ formsVal.value = {
7100
+ ...formsVal.value,
7101
+ ...params
7102
+ };
7103
+ }
6957
7104
  return {
6958
7105
  DtCurdModal,
6959
7106
  add,
6960
7107
  del,
6961
7108
  dels,
6962
- update
7109
+ update,
7110
+ setFormValues
6963
7111
  };
6964
7112
  }
6965
- const _hoisted_1$l = { class: "iframe-page" };
6966
- const _hoisted_2$d = ["src"];
6967
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
7113
+ const _hoisted_1$k = { class: "iframe-page" };
7114
+ const _hoisted_2$c = ["src"];
7115
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
6968
7116
  __name: "index",
6969
7117
  props: {
6970
7118
  showLoading: {
@@ -6986,7 +7134,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
6986
7134
  iframeWin.postMessage(props.postMsg, props.src);
6987
7135
  }
6988
7136
  return (_ctx, _cache) => {
6989
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
7137
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
6990
7138
  createVNode(unref(Spin), {
6991
7139
  spinning: loading.value,
6992
7140
  size: "large"
@@ -6998,7 +7146,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
6998
7146
  ref_key: "frameRef",
6999
7147
  ref: frameRef,
7000
7148
  onLoad: _cache[0] || (_cache[0] = ($event) => afterLoaded())
7001
- }, null, 40, _hoisted_2$d)
7149
+ }, null, 40, _hoisted_2$c)
7002
7150
  ]),
7003
7151
  _: 1
7004
7152
  }, 8, ["spinning"])
@@ -7029,8 +7177,7 @@ const basicUploadProps = {
7029
7177
  default: () => []
7030
7178
  },
7031
7179
  maxSize: {
7032
- type: Number,
7033
- default: 2
7180
+ type: Number
7034
7181
  },
7035
7182
  maxNumber: {
7036
7183
  type: Number,
@@ -7039,6 +7186,10 @@ const basicUploadProps = {
7039
7186
  defaultFiles: {
7040
7187
  type: Array,
7041
7188
  default: []
7189
+ },
7190
+ showView: {
7191
+ type: Boolean,
7192
+ default: false
7042
7193
  }
7043
7194
  };
7044
7195
  function useHelpers(acceptRef, helpTextRef, maxNumberRef, maxSizeRef) {
@@ -7057,8 +7208,29 @@ function useHelpers(acceptRef, helpTextRef, maxNumberRef, maxSizeRef) {
7057
7208
  return `.${item}`;
7058
7209
  }).join(",");
7059
7210
  });
7211
+ const getHelpText = computed(() => {
7212
+ const helpText = unref(helpTextRef);
7213
+ if (helpText) {
7214
+ return helpText;
7215
+ }
7216
+ const helpTexts = [];
7217
+ const accept = unref(acceptRef);
7218
+ if (accept.length > 0) {
7219
+ helpTexts.push(`\u652F\u6301${accept.join(",")}\u683C\u5F0F`);
7220
+ }
7221
+ const maxSize = unref(maxSizeRef);
7222
+ if (maxSize) {
7223
+ helpTexts.push(`\u4E0D\u8D85\u8FC7${maxSize}M`);
7224
+ }
7225
+ const maxNumber = unref(maxNumberRef);
7226
+ if (maxNumber && maxNumber !== Infinity) {
7227
+ helpTexts.push(`\u6700\u591A\u53EF\u9009\u62E9${maxNumber}\u4E2A\u6587\u4EF6`);
7228
+ }
7229
+ return helpTexts.join(",") || "\u8BF7\u4E0A\u4F20pptx\u3001doc\u3001jpg\u3001jpeg\u3001png\u3001bmp\u3001gif\u3001xls\u3001xlsx\u3001txt\u3001rar\u3001zip\u30017z\u3001tar\u3001gz\u683C\u5F0F\u6587\u4EF6";
7230
+ });
7060
7231
  return {
7061
- getStringAccept
7232
+ getStringAccept,
7233
+ getHelpText
7062
7234
  };
7063
7235
  }
7064
7236
  var sparkMd5 = { exports: {} };
@@ -7470,12 +7642,12 @@ var sparkMd5 = { exports: {} };
7470
7642
  return SparkMD5;
7471
7643
  });
7472
7644
  })(sparkMd5);
7473
- const _hoisted_1$k = { class: "file-header" };
7474
- const _hoisted_2$c = /* @__PURE__ */ createTextVNode(" \u6587\u4EF6\u4E0A\u4F20 ");
7475
- const _hoisted_3$6 = /* @__PURE__ */ createTextVNode(" \u6A21\u677F\u4E0B\u8F7D ");
7476
- const _hoisted_4$4 = { class: "file-type-tips ant-alert-info" };
7477
- 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);
7478
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
7645
+ const _hoisted_1$j = { class: "dt-file" };
7646
+ const _hoisted_2$b = { class: "file-header" };
7647
+ const _hoisted_3$6 = /* @__PURE__ */ createTextVNode(" \u6587\u4EF6\u4E0A\u4F20 ");
7648
+ const _hoisted_4$4 = /* @__PURE__ */ createTextVNode(" \u6A21\u677F\u4E0B\u8F7D ");
7649
+ const _hoisted_5$3 = { class: "file-type-tips ant-alert-info" };
7650
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
7479
7651
  __name: "upload",
7480
7652
  props: basicUploadProps,
7481
7653
  setup(__props, { expose }) {
@@ -7483,22 +7655,25 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7483
7655
  const { message } = useMessage();
7484
7656
  const filesRef = ref([]);
7485
7657
  const historyFilesRef = ref([]);
7486
- const allFilesRef = ref([]);
7658
+ const allFilesRef = computed(() => {
7659
+ return [...historyFilesRef.value, ...filesRef.value];
7660
+ });
7487
7661
  const imgVisable = ref(false);
7662
+ const imgSrcRef = ref();
7488
7663
  const setImgVisible = (value) => imgVisable.value = value;
7489
7664
  const { accept, helpText, maxNumber, maxSize } = toRefs(props);
7490
- const { getStringAccept } = useHelpers(accept);
7491
- const [registerTable, {}] = useTable({
7665
+ const {
7666
+ getStringAccept,
7667
+ getHelpText
7668
+ } = useHelpers(accept, helpText, maxNumber, maxSize);
7669
+ const isImage = (fileType) => ["pdf", "jpg", "jpeg", "png", "bmp", "gif"].includes(fileType);
7670
+ const [registerTable] = useTable({
7492
7671
  tableSetting: false,
7493
7672
  pagination: false,
7494
7673
  dataSource: allFilesRef,
7495
7674
  columns: [
7496
7675
  { title: "\u6587\u4EF6\u540D\u79F0", dataIndex: "fileName" },
7497
- { title: "\u4E0A\u4F20\u72B6\u6001", dataIndex: "fileStatue", render(row) {
7498
- return h("span", {
7499
- style: `color: ${row.status === 0 ? "orange" : "green"}`
7500
- }, row.fileStatue);
7501
- } }
7676
+ { title: "\u4E0A\u4F20\u72B6\u6001", dataIndex: "fileStatue", className: "orange" }
7502
7677
  ],
7503
7678
  operations: {
7504
7679
  expand: true,
@@ -7507,28 +7682,40 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7507
7682
  title: "\u9884\u89C8",
7508
7683
  icon: "ic:baseline-remove-red-eye",
7509
7684
  ifShow(row) {
7510
- const supportFileTypes = ["pdf", "jpg", "jpeg", "png", "bmp", "gif"];
7511
- return supportFileTypes.includes(row.fileName.split(".").pop());
7685
+ if (!props.showView)
7686
+ return false;
7687
+ return isImage(row.fileName.split(".").pop());
7512
7688
  },
7513
- action: () => {
7514
- setImgVisible(true);
7689
+ action: ({ row }) => {
7690
+ if (isImage(row.fileName.split(".").pop())) {
7691
+ setImgVisible(true);
7692
+ }
7515
7693
  }
7516
7694
  },
7517
- { title: "\u7F16\u8F91", icon: "mdi:text-box-edit-outline" },
7518
- { title: "\u5220\u9664", icon: "mdi:delete-outline" }
7695
+ { title: "\u5220\u9664", icon: "mdi:delete-outline", action: ({ row }) => {
7696
+ if (!row.status)
7697
+ historyFilesRef.value = historyFilesRef.value.filter((it) => it.fileId !== row.fileId);
7698
+ else {
7699
+ filesRef.value = filesRef.value.filter((it) => it.fileId !== row.fileId);
7700
+ }
7701
+ } }
7519
7702
  ]
7520
7703
  }
7521
7704
  });
7522
- watchEffect(() => {
7523
- historyFilesRef.value = props.defaultFiles.map((file) => {
7524
- return {
7525
- ...file,
7526
- fileName: file.fileName,
7527
- status: 0,
7528
- fileStatue: "\u5386\u53F2\u4E0A\u4F20"
7529
- };
7530
- });
7531
- allFilesRef.value = [...historyFilesRef.value, ...filesRef.value];
7705
+ watch(() => props.defaultFiles, (v) => {
7706
+ if (v) {
7707
+ historyFilesRef.value = props.defaultFiles.map((file, index) => {
7708
+ return {
7709
+ ...file,
7710
+ fileId: file.id || index,
7711
+ fileName: file.fileName,
7712
+ status: 0,
7713
+ fileStatue: "\u5386\u53F2\u4E0A\u4F20"
7714
+ };
7715
+ });
7716
+ }
7717
+ }, {
7718
+ immediate: true
7532
7719
  });
7533
7720
  function beforeUpload(file) {
7534
7721
  const { maxSize: maxSize2 } = props;
@@ -7548,13 +7735,19 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7548
7735
  if (currentChunk < chunks) {
7549
7736
  loadNext();
7550
7737
  } else {
7551
- filesRef.value.push({
7738
+ let fileObj = {
7552
7739
  fileName: file.name,
7553
7740
  fileId: spark.end(),
7554
7741
  file,
7555
7742
  status: 1,
7556
7743
  fileStatue: "\u5F85\u4E0A\u4F20"
7557
- });
7744
+ };
7745
+ if (props.multiple) {
7746
+ filesRef.value.push(fileObj);
7747
+ } else {
7748
+ historyFilesRef.value = [];
7749
+ filesRef.value = [fileObj];
7750
+ }
7558
7751
  }
7559
7752
  };
7560
7753
  function loadNext() {
@@ -7568,8 +7761,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7568
7761
  });
7569
7762
  return (_ctx, _cache) => {
7570
7763
  const _directive_icon = resolveDirective("icon");
7571
- return openBlock(), createElementBlock(Fragment, null, [
7572
- createElementVNode("div", _hoisted_1$k, [
7764
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
7765
+ createElementVNode("div", _hoisted_2$b, [
7573
7766
  createElementVNode("div", null, [
7574
7767
  createVNode(unref(Upload), {
7575
7768
  accept: unref(getStringAccept),
@@ -7583,7 +7776,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7583
7776
  withDirectives(createElementVNode("span", null, null, 512), [
7584
7777
  [_directive_icon, "ic:baseline-file-upload"]
7585
7778
  ]),
7586
- _hoisted_2$c
7779
+ _hoisted_3$6
7587
7780
  ]),
7588
7781
  _: 1
7589
7782
  })
@@ -7599,18 +7792,18 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7599
7792
  withDirectives(createElementVNode("span", null, null, 512), [
7600
7793
  [_directive_icon, "ic:baseline-file-download"]
7601
7794
  ]),
7602
- _hoisted_3$6
7795
+ _hoisted_4$4
7603
7796
  ]),
7604
7797
  _: 1
7605
7798
  }, 8, ["onClick"])) : createCommentVNode("", true)
7606
7799
  ]),
7607
7800
  renderSlot(_ctx.$slots, "default")
7608
7801
  ]),
7609
- createElementVNode("div", _hoisted_4$4, [
7802
+ createElementVNode("div", _hoisted_5$3, [
7610
7803
  withDirectives(createElementVNode("span", null, null, 512), [
7611
7804
  [_directive_icon, "ant-design:info-circle-outlined"]
7612
7805
  ]),
7613
- _hoisted_5$3
7806
+ createElementVNode("i", null, toDisplayString(unref(getHelpText)), 1)
7614
7807
  ]),
7615
7808
  createVNode(unref(DtTable), { onRegister: unref(registerTable) }, null, 8, ["onRegister"]),
7616
7809
  createVNode(unref(Image), {
@@ -7620,56 +7813,17 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7620
7813
  visible: imgVisable.value,
7621
7814
  onVisibleChange: setImgVisible
7622
7815
  },
7623
- src: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
7624
- }, null, 8, ["preview"])
7625
- ], 64);
7626
- };
7627
- }
7628
- });
7629
- const _hoisted_1$j = { class: "dt-upload-wrap" };
7630
- const _hoisted_2$b = /* @__PURE__ */ createTextVNode(" 111 ");
7631
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
7632
- __name: "index",
7633
- emits: ["register"],
7634
- setup(__props, { emit: emites }) {
7635
- const uploadRef = ref(null);
7636
- const [register] = useModal({
7637
- width: "700px",
7638
- title: "\u6587\u4EF6\u4E0A\u4F20",
7639
- maskClosable: false
7640
- });
7641
- const defaultFiles = [
7642
- { fileName: "\u53EE\u549A\u53D1\u7968667.09.pdf", fileId: "1" }
7643
- ];
7644
- function handleSave() {
7645
- console.log(uploadRef.value.allFilesRef);
7646
- alert("s-s-s-");
7647
- }
7648
- return (_ctx, _cache) => {
7649
- return openBlock(), createBlock(unref(_sfc_main$L), {
7650
- onSave: _cache[0] || (_cache[0] = ($event) => handleSave()),
7651
- onRegister: unref(register)
7652
- }, {
7653
- default: withCtx(() => [
7654
- createElementVNode("div", _hoisted_1$j, [
7655
- createVNode(_sfc_main$y, {
7656
- ref_key: "uploadRef",
7657
- ref: uploadRef,
7658
- defaultFiles
7659
- }, {
7660
- default: withCtx(() => [
7661
- _hoisted_2$b
7662
- ]),
7663
- _: 1
7664
- }, 512)
7665
- ])
7666
- ]),
7667
- _: 1
7668
- }, 8, ["onRegister"]);
7816
+ src: imgSrcRef.value
7817
+ }, null, 8, ["preview", "src"])
7818
+ ]);
7669
7819
  };
7670
7820
  }
7671
7821
  });
7672
7822
  const BasicProps = {
7823
+ showIcon: {
7824
+ type: Boolean,
7825
+ default: true
7826
+ },
7673
7827
  loading: {
7674
7828
  type: Boolean,
7675
7829
  default: false
@@ -7735,7 +7889,10 @@ const BasicProps = {
7735
7889
  default: ""
7736
7890
  },
7737
7891
  toolbar: Boolean,
7738
- search: Boolean
7892
+ search: {
7893
+ type: Boolean,
7894
+ default: true
7895
+ }
7739
7896
  };
7740
7897
  const searchProps = {
7741
7898
  title: {
@@ -8203,7 +8360,7 @@ var _sfc_main$v = /* @__PURE__ */ defineComponent({
8203
8360
  item[titleField] = createVNode("span", {
8204
8361
  "class": "tree-title",
8205
8362
  "onClick": handleClickNode.bind(null, item[keyField], item[childrenField], item)
8206
- }, [(slots == null ? void 0 : slots.title) ? getSlot(slots, "title", item) : createVNode(Fragment, null, [icon && createVNode("i", {
8363
+ }, [(slots == null ? void 0 : slots.title) ? getSlot(slots, "title", item) : createVNode(Fragment, null, [unref(getBindValues).showIcon && icon && createVNode("i", {
8207
8364
  "class": `i ${icon}`
8208
8365
  }, null), titleDom, createVNode("span", {
8209
8366
  "class": "tree-action"
@@ -8211,9 +8368,6 @@ var _sfc_main$v = /* @__PURE__ */ defineComponent({
8211
8368
  });
8212
8369
  return data;
8213
8370
  });
8214
- const showTitle = computed(() => {
8215
- return true;
8216
- });
8217
8371
  const getBindValues = computed(() => {
8218
8372
  let propsData = {
8219
8373
  blockNode: true,
@@ -8253,6 +8407,9 @@ var _sfc_main$v = /* @__PURE__ */ defineComponent({
8253
8407
  };
8254
8408
  return omit(propsData, "treeData", "class");
8255
8409
  });
8410
+ const showTitle = computed(() => {
8411
+ return unref(getBindValues).search;
8412
+ });
8256
8413
  function handleClickNode(key, children, node) {
8257
8414
  emit("clickNode", node);
8258
8415
  if (!props.clickRowToExpand || !children || children.length === 0)
@@ -8466,10 +8623,9 @@ const dtComponents = [
8466
8623
  { name: "dt-base-router", component: DtBaseRouter },
8467
8624
  { name: "dt-icon", component: DtIcon },
8468
8625
  { name: "dt-pick-icon", component: _sfc_main$W },
8469
- { name: "dt-modal", component: _sfc_main$L },
8626
+ { name: "dt-modal", component: _sfc_main$K },
8470
8627
  { name: "dt-form", component: DtForm },
8471
- { name: "dt-upload", component: _sfc_main$y },
8472
- { name: "dt-upload-modal", component: _sfc_main$x },
8628
+ { name: "dt-upload", component: _sfc_main$x },
8473
8629
  { name: "dt-tree", component: _sfc_main$v }
8474
8630
  ];
8475
8631
  function initComponents() {
@@ -10635,4 +10791,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10635
10791
  };
10636
10792
  }
10637
10793
  });
10638
- export { DtBaseRouter, DtForm, DtIcon, _sfc_main$z as DtIframe, _sfc_main$L as DtModal, _sfc_main$W 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 };
10794
+ 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 };