@dazhicheng/ui 1.5.199 → 1.5.202

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 (257) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/api/dataTypeContext.js +17 -0
  3. package/dist/assets/img/empty_images/no_data.png.js +4 -0
  4. package/dist/assets/img/empty_images/search.png.js +4 -0
  5. package/dist/assets/img/image_status/develop.png.js +4 -0
  6. package/dist/assets/img/image_status/loading.gif.js +4 -0
  7. package/dist/assets/img/image_status/loading_fail.png.js +4 -0
  8. package/dist/assets/img/image_status/no_network.png.js +4 -0
  9. package/dist/assets/img/image_status/no_permission.png.js +4 -0
  10. package/dist/assets/svg/RiRefreshLine.svg.js +4 -0
  11. package/dist/assets/svg/action_more.svg.js +4 -0
  12. package/dist/assets/svg/add.svg.js +4 -0
  13. package/dist/assets/svg/addCircleLine.svg.js +4 -0
  14. package/dist/assets/svg/arrowDown.svg.js +4 -0
  15. package/dist/assets/svg/arrowLineDown.svg.js +5 -0
  16. package/dist/assets/svg/arrowSUp.svg.js +4 -0
  17. package/dist/assets/svg/arrowUp.svg.js +4 -0
  18. package/dist/assets/svg/close.svg.js +4 -0
  19. package/dist/assets/svg/columnSet.svg.js +4 -0
  20. package/dist/assets/svg/determinateCircleLine.svg.js +5 -0
  21. package/dist/assets/svg/drag.svg.js +5 -0
  22. package/dist/assets/svg/exportSvg.svg.js +4 -0
  23. package/dist/assets/svg/fileSvg.svg.js +4 -0
  24. package/dist/assets/svg/help.svg.js +4 -0
  25. package/dist/assets/svg/item_error.svg.js +4 -0
  26. package/dist/assets/svg/paixu-jiangxu.svg.js +4 -0
  27. package/dist/assets/svg/paixu-moren.svg.js +4 -0
  28. package/dist/assets/svg/paixu-shengxu.svg.js +4 -0
  29. package/dist/assets/svg/quanping.svg.js +4 -0
  30. package/dist/assets/svg/suoxiao.svg.js +4 -0
  31. package/dist/components/tt-api-component/index.js +7 -0
  32. package/dist/components/tt-api-component/index.vue.js +7 -0
  33. package/dist/components/tt-api-component/index.vue2.js +199 -0
  34. package/dist/components/tt-area/TtArea.vue.js +7 -0
  35. package/dist/components/tt-area/TtArea.vue3.js +36 -0
  36. package/dist/components/tt-button/components/AddButton.vue.js +24 -0
  37. package/dist/components/tt-button/components/AddButton.vue2.js +4 -0
  38. package/dist/components/tt-button/index.js +9 -0
  39. package/dist/components/tt-button/index.vue.js +7 -0
  40. package/dist/components/tt-button/index.vue2.js +68 -0
  41. package/dist/components/tt-checkbox/index.js +7 -0
  42. package/dist/components/tt-checkbox/index.vue.js +77 -0
  43. package/dist/components/tt-checkbox/index.vue2.js +4 -0
  44. package/dist/components/tt-drawer/index.js +14 -0
  45. package/dist/components/tt-drawer/src/RenderDrawer.vue.js +157 -0
  46. package/dist/components/tt-drawer/src/RenderDrawer.vue3.js +5 -0
  47. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +56 -0
  48. package/dist/components/tt-drawer/src/components/DrawerFooter.vue3.js +5 -0
  49. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +7 -0
  50. package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +21 -0
  51. package/dist/components/tt-drawer/src/hooks/useDrawerRender.js +124 -0
  52. package/dist/components/tt-drawer/src/hooks/useResizable.js +98 -0
  53. package/dist/components/tt-drawer/src/index.js +17 -0
  54. package/dist/components/tt-drawer/src/props.js +72 -0
  55. package/dist/components/tt-drawer/src/utils/drawer-api.js +191 -0
  56. package/dist/components/tt-empty/index.js +34 -0
  57. package/dist/components/tt-form/index.js +59 -0
  58. package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +38 -0
  59. package/dist/components/tt-form/src/components/ExpandableArrow.vue3.js +5 -0
  60. package/dist/components/tt-form/src/components/FormActions.vue2.js +177 -0
  61. package/dist/components/tt-form/src/components/FormActions.vue3.js +5 -0
  62. package/dist/components/tt-form/src/components/FormElInput.vue.js +80 -0
  63. package/dist/components/tt-form/src/components/FormElInput.vue2.js +4 -0
  64. package/dist/components/tt-form/src/components/Slot.js +28 -0
  65. package/dist/components/tt-form/src/config.js +57 -0
  66. package/dist/components/tt-form/src/form/FormControl.vue.js +16 -0
  67. package/dist/components/tt-form/src/form/FormControl.vue2.js +4 -0
  68. package/dist/components/tt-form/src/form/FormDescription.vue.js +21 -0
  69. package/dist/components/tt-form/src/form/FormDescription.vue2.js +4 -0
  70. package/dist/components/tt-form/src/form/FormItem.vue.js +20 -0
  71. package/dist/components/tt-form/src/form/FormItem.vue2.js +4 -0
  72. package/dist/components/tt-form/src/form/FormLabel.vue.js +19 -0
  73. package/dist/components/tt-form/src/form/FormLabel.vue2.js +4 -0
  74. package/dist/components/tt-form/src/form/FormMessage.vue.js +18 -0
  75. package/dist/components/tt-form/src/form/FormMessage.vue2.js +4 -0
  76. package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +30 -0
  77. package/dist/components/tt-form/src/form/FormMessageToolTip.vue2.js +4 -0
  78. package/dist/components/tt-form/src/form/RenderContent.vue.js +31 -0
  79. package/dist/components/tt-form/src/form/RenderContent.vue2.js +4 -0
  80. package/dist/components/tt-form/src/form/injectionKeys.js +4 -0
  81. package/dist/components/tt-form/src/form/useFormField.js +24 -0
  82. package/dist/components/tt-form/src/form-render/FormField.vue.js +4 -0
  83. package/dist/components/tt-form/src/form-render/FormField.vue2.js +345 -0
  84. package/dist/components/tt-form/src/form-render/FormFieldContact.js +54 -0
  85. package/dist/components/tt-form/src/form-render/FormLabel.vue.js +4 -0
  86. package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +101 -0
  87. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +195 -0
  88. package/dist/components/tt-form/src/form-render/array-register/props.js +47 -0
  89. package/dist/components/tt-form/src/form-render/array-register/utils.js +12 -0
  90. package/dist/components/tt-form/src/form-render/context.js +15 -0
  91. package/dist/components/tt-form/src/form-render/dependencies.js +51 -0
  92. package/dist/components/tt-form/src/form-render/expandable.js +46 -0
  93. package/dist/components/tt-form/src/form-render/form.vue2.js +196 -0
  94. package/dist/components/tt-form/src/form-render/form.vue3.js +5 -0
  95. package/dist/components/tt-form/src/form-render/helper.js +22 -0
  96. package/dist/components/tt-form/src/form-render/rootWrapperClass.js +10 -0
  97. package/dist/components/tt-form/src/formApi.js +790 -0
  98. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +223 -0
  99. package/dist/components/tt-form/src/group-form/GroupForm.vue3.js +5 -0
  100. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +277 -0
  101. package/dist/components/tt-form/src/group-form/GroupSection.vue3.js +5 -0
  102. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +153 -0
  103. package/dist/components/tt-form/src/group-form/LazyFormField.vue3.js +5 -0
  104. package/dist/components/tt-form/src/group-form/groupFormApi.js +700 -0
  105. package/dist/components/tt-form/src/group-form/lazyContext.js +38 -0
  106. package/dist/components/tt-form/src/group-form/useGroupForm.js +83 -0
  107. package/dist/components/tt-form/src/group-form/utils.js +106 -0
  108. package/dist/components/tt-form/src/hooks/useArrayRegistry.js +22 -0
  109. package/dist/components/tt-form/src/hooks/useFieldArray.js +137 -0
  110. package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +33 -0
  111. package/dist/components/tt-form/src/hooks/useSelectCollapse.js +81 -0
  112. package/dist/components/tt-form/src/index.vue2.js +147 -0
  113. package/dist/components/tt-form/src/index.vue3.js +5 -0
  114. package/dist/components/tt-form/src/shared/createContext.js +14 -0
  115. package/dist/components/tt-form/src/shared/global-state.js +22 -0
  116. package/dist/components/tt-form/src/shared/zod-defaults.js +47 -0
  117. package/dist/components/tt-form/src/types/forms.js +6 -0
  118. package/dist/components/tt-form/src/useForm.js +28 -0
  119. package/dist/components/tt-form/src/useFormContext.js +320 -0
  120. package/dist/components/tt-form/src/utils/array-path.js +18 -0
  121. package/dist/components/tt-form-item-error-tooltip/index.js +9 -0
  122. package/dist/components/tt-form-item-error-tooltip/index.vue.js +183 -0
  123. package/dist/components/tt-form-item-error-tooltip/index.vue3.js +5 -0
  124. package/dist/components/tt-icon/components/AddIcon.vue.js +28 -0
  125. package/dist/components/tt-icon/components/AddIcon.vue2.js +4 -0
  126. package/dist/components/tt-icon/components/SubIcon.vue.js +28 -0
  127. package/dist/components/tt-icon/components/SubIcon.vue2.js +4 -0
  128. package/dist/components/tt-icon/index.js +11 -0
  129. package/dist/components/tt-icon/index.vue.js +8 -0
  130. package/dist/components/tt-icon/index.vue2.js +115 -0
  131. package/dist/components/tt-image/index.js +9 -0
  132. package/dist/components/tt-image/src/components/ImageViewer.js +41 -0
  133. package/dist/components/tt-image/tt-image.js +55 -0
  134. package/dist/components/tt-loading/index.js +8 -0
  135. package/dist/components/tt-loading/src/directive.js +51 -0
  136. package/dist/components/tt-loading/src/loading.vue.js +7 -0
  137. package/dist/components/tt-loading/src/loading.vue2.js +75 -0
  138. package/dist/components/tt-loading/src/service.js +79 -0
  139. package/dist/components/tt-log/index.js +7 -0
  140. package/dist/components/tt-log/index.vue.js +31 -0
  141. package/dist/components/tt-log/index.vue2.js +4 -0
  142. package/dist/components/tt-modal/index.js +14 -0
  143. package/dist/components/tt-modal/src/RenderModal.vue.js +310 -0
  144. package/dist/components/tt-modal/src/RenderModal.vue3.js +5 -0
  145. package/dist/components/tt-modal/src/components/ModalFooter.vue.js +7 -0
  146. package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +74 -0
  147. package/dist/components/tt-modal/src/components/ModalHeader.vue.js +7 -0
  148. package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +22 -0
  149. package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +48 -0
  150. package/dist/components/tt-modal/src/components/ModalWrapper.vue2.js +4 -0
  151. package/dist/components/tt-modal/src/hooks/useModalRender.js +131 -0
  152. package/dist/components/tt-modal/src/index.js +17 -0
  153. package/dist/components/tt-modal/src/props.js +75 -0
  154. package/dist/components/tt-modal/src/utils/modal-api.js +200 -0
  155. package/dist/components/tt-modal/src/utils/modal-stack.js +28 -0
  156. package/dist/components/tt-modal-form/hooks/useModalFormSlot.js +22 -0
  157. package/dist/components/tt-modal-form/index.vue.js +201 -0
  158. package/dist/components/tt-modal-form/index.vue2.js +4 -0
  159. package/dist/components/tt-modal-form/useModalForm.js +30 -0
  160. package/dist/components/tt-nav-anchor/index.js +8 -0
  161. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +234 -0
  162. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue3.js +5 -0
  163. package/dist/components/tt-nav-anchor/src/constants.js +4 -0
  164. package/dist/components/tt-panel-select/index.js +7 -0
  165. package/dist/components/tt-panel-select/src/common.js +4 -0
  166. package/dist/components/tt-panel-select/src/components/PanelLeft.vue.js +56 -0
  167. package/dist/components/tt-panel-select/src/components/PanelLeft.vue2.js +4 -0
  168. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +277 -0
  169. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue2.js +4 -0
  170. package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +108 -0
  171. package/dist/components/tt-panel-select/src/components/PanelRight.vue2.js +4 -0
  172. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +184 -0
  173. package/dist/components/tt-panel-select/src/hooks/usePanelSelection.js +91 -0
  174. package/dist/components/tt-panel-select/src/index.vue.js +386 -0
  175. package/dist/components/tt-panel-select/src/index.vue2.js +4 -0
  176. package/dist/components/tt-select/index.js +8 -0
  177. package/dist/components/tt-select/src/Select.vue.js +315 -0
  178. package/dist/components/tt-select/src/Select.vue3.js +5 -0
  179. package/dist/components/tt-select/src/components/SelectTable.vue.js +86 -0
  180. package/dist/components/tt-select/src/components/SelectTable.vue3.js +5 -0
  181. package/dist/components/tt-select/src/components/Table.vue.js +307 -0
  182. package/dist/components/tt-select/src/components/Table.vue3.js +5 -0
  183. package/dist/components/tt-select/src/const.js +19 -0
  184. package/dist/components/tt-select/src/hooks/useDataSource.js +196 -0
  185. package/dist/components/tt-select/src/hooks/useGrid.js +97 -0
  186. package/dist/components/tt-select/src/hooks/useKeyboard.js +63 -0
  187. package/dist/components/tt-select/src/hooks/usePagination.js +45 -0
  188. package/dist/components/tt-select/src/hooks/useSelect.js +100 -0
  189. package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +1 -1
  190. package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +345 -0
  191. package/dist/components/tt-select/src/props.js +201 -0
  192. package/dist/components/tt-select/src/utils/index.js +16 -0
  193. package/dist/components/tt-table/index.js +63 -0
  194. package/dist/components/tt-table/src/Table.vue.js +623 -0
  195. package/dist/components/tt-table/src/Table.vue3.js +5 -0
  196. package/dist/components/tt-table/src/TableForm.vue.js +356 -0
  197. package/dist/components/tt-table/src/TableForm.vue2.js +4 -0
  198. package/dist/components/tt-table/src/componentMap.js +4 -0
  199. package/dist/components/tt-table/src/components/RowContext.js +24 -0
  200. package/dist/components/tt-table/src/components/TableAction.vue.js +222 -0
  201. package/dist/components/tt-table/src/components/TableAction.vue2.js +4 -0
  202. package/dist/components/tt-table/src/components/TableButtons.js +117 -0
  203. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +234 -0
  204. package/dist/components/tt-table/src/components/TableColumnModal.vue3.js +5 -0
  205. package/dist/components/tt-table/src/components/TableToobalTools.vue.js +87 -0
  206. package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +4 -0
  207. package/dist/components/tt-table/src/emits.js +15 -0
  208. package/dist/components/tt-table/src/hooks/useCellArea.js +15 -0
  209. package/dist/components/tt-table/src/hooks/useColumns.js +275 -0
  210. package/dist/components/tt-table/src/hooks/useCustomColumns.js +53 -0
  211. package/dist/components/tt-table/src/hooks/useDataSource.js +224 -0
  212. package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +64 -0
  213. package/dist/components/tt-table/src/hooks/usePagination.js +44 -0
  214. package/dist/components/tt-table/src/hooks/useRowSelection.js +84 -0
  215. package/dist/components/tt-table/src/hooks/useTableContext.js +20 -0
  216. package/dist/components/tt-table/src/hooks/useTableEvent.js +197 -0
  217. package/dist/components/tt-table/src/hooks/useTableForm.js +60 -0
  218. package/dist/components/tt-table/src/hooks/useTableRender.js +33 -0
  219. package/dist/components/tt-table/src/hooks/useTableSlot.js +17 -0
  220. package/dist/components/tt-table/src/props.js +482 -0
  221. package/dist/components/tt-table/src/toolProps.js +30 -0
  222. package/dist/components/tt-table/src/utils/context.js +17 -0
  223. package/dist/components/tt-table/src/utils/table-api.js +386 -0
  224. package/dist/components/tt-table/src/utils/table-form-api.js +122 -0
  225. package/dist/components/tt-text/index.js +7 -0
  226. package/dist/components/tt-text/index.vue.js +7 -0
  227. package/dist/components/tt-text/index.vue2.js +73 -0
  228. package/dist/components/tt-upload/index.js +9 -0
  229. package/dist/components/tt-upload/src/TtUpload.vue.js +306 -0
  230. package/dist/components/tt-upload/src/TtUpload.vue2.js +4 -0
  231. package/dist/components/tt-upload/src/typing.js +107 -0
  232. package/dist/directives/auto-tip/index.js +62 -0
  233. package/dist/directives/dialog-resize/index.js +49 -0
  234. package/dist/directives/dialog-resize/use-css-variable.js +44 -0
  235. package/dist/directives/dialog-resize/use-draggable.js +35 -0
  236. package/dist/directives/dialog-resize/use-fullscreen.js +38 -0
  237. package/dist/directives/dialog-resize/use-parse-translate.js +9 -0
  238. package/dist/directives/dialog-resize/use-resizer.js +37 -0
  239. package/dist/directives/disabled-tip/index.js +78 -0
  240. package/dist/directives/index.js +8 -0
  241. package/dist/hooks/useDataPermissionOptions.js +142 -0
  242. package/dist/hooks/useFormSchemasLink.js +261 -0
  243. package/dist/hooks/useFormat.js +44 -0
  244. package/dist/hooks/useLoading.js +22 -0
  245. package/dist/hooks/useScreenshotOss.js +69 -0
  246. package/dist/hooks/useSetup.js +59 -0
  247. package/dist/hooks/useTable.js +13 -0
  248. package/dist/hooks/useTemplateSlot.js +13 -0
  249. package/dist/index.js +142 -60274
  250. package/dist/plugins/default/renderCellContent.js +58 -0
  251. package/dist/plugins/vxeTable/switchStatus.js +91 -0
  252. package/dist/plugins.js +4 -146
  253. package/dist/style.css +1 -1
  254. package/dist/utils/xhr.js +8 -0
  255. package/package.json +5 -3
  256. package/dist/index-NG5FNCLD.js +0 -3430
  257. package/dist/index.modern-4Cf3dcJP.js +0 -3069
@@ -0,0 +1,386 @@
1
+ var K = Object.defineProperty;
2
+ var A = (a, e, t) => e in a ? K(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var s = (a, e, t) => A(a, typeof e != "symbol" ? e + "" : e, t);
4
+ import { mergeWithArrayOverride as r, StateHandler as H, bindMethods as I, isFunction as k } from "@dazhicheng/utils";
5
+ import { GlobalConfig as o } from "../../../../hooks/useSetup.js";
6
+ import { Store as z } from "@tanstack/vue-store";
7
+ import { reactive as n, computed as l } from "vue";
8
+ function M() {
9
+ var a, e, t, i, d, h, m, u, c, g, w, p, b, f, y, S, C, x, R, T, v, E, P, D, F;
10
+ return {
11
+ showPager: !0,
12
+ total: 0,
13
+ showCheckbox: !1,
14
+ showExpand: !1,
15
+ showRadio: !1,
16
+ showIndex: !1,
17
+ isCellResize: !1,
18
+ isColumnsDrag: !1,
19
+ isCellSort: !1,
20
+ showAction: !1,
21
+ actionWidth: 0,
22
+ actionTitle: "",
23
+ actionProps: {},
24
+ indexColumnProps: {},
25
+ checkboxColumnProps: {},
26
+ expandColumnProps: {},
27
+ radioColumnProps: {},
28
+ searchInfo: {},
29
+ immediate: !0,
30
+ loading: !1,
31
+ showToolbar: !1,
32
+ columnsFieldSort: [],
33
+ columnsFieldNoSort: [],
34
+ notSetColumnField: [],
35
+ filterNoVisibleField: [],
36
+ showTableAlert: !1,
37
+ modelValue: [],
38
+ title: "",
39
+ showTitle: !1,
40
+ autoHeight: !1,
41
+ leftSlotWidth: 0,
42
+ rightSlotWidth: 0,
43
+ emptyImageStyle: {},
44
+ isHanderSubmit: !1,
45
+ treeNode: !1,
46
+ clearTreeExpand: !0,
47
+ isI18n: !0,
48
+ isDataCloneDeep: !0,
49
+ showOverflow: !0,
50
+ height: void 0,
51
+ showHeaderOverflow: !0,
52
+ isScrollFetch: !1,
53
+ showScrollFetchLoading: !0,
54
+ toolbarConfig: void 0,
55
+ zoomConfig: void 0,
56
+ formApi: void 0,
57
+ useHttpCache: (a = o.table) == null ? void 0 : a.useHttpCache,
58
+ defaultDisplayFields: (e = o.table) == null ? void 0 : e.defaultDisplayFields,
59
+ loadingText: (t = o.table) == null ? void 0 : t.loadingText,
60
+ emptyText: (i = o.table) == null ? void 0 : i.emptyText,
61
+ emptyImageStatus: "no-data",
62
+ noSearchText: (d = o.table) == null ? void 0 : d.noSearchText,
63
+ showSetColumn: (h = o.table) == null ? void 0 : h.showSetColumn,
64
+ showSetting: (m = o.table) == null ? void 0 : m.showSetting,
65
+ showRefresh: (u = o.table) == null ? void 0 : u.showRefresh,
66
+ tableRowId: (c = o.table) == null ? void 0 : c.tableRowId,
67
+ currentPageField: (g = o.table) == null ? void 0 : g.currentPageField,
68
+ pageSizeField: (w = o.table) == null ? void 0 : w.pageSizeField,
69
+ totalField: (p = o.table) == null ? void 0 : p.totalField,
70
+ dataField: (b = o.table) == null ? void 0 : b.dataField,
71
+ pagerConfig: (f = o.table) == null ? void 0 : f.pagerConfig,
72
+ size: (y = o.table) == null ? void 0 : y.size,
73
+ keyboardConfig: (S = o.table) == null ? void 0 : S.keyboardConfig,
74
+ menuConfig: {},
75
+ mouseConfig: (C = o.table) == null ? void 0 : C.mouseConfig,
76
+ checkboxConfig: (x = o.table) == null ? void 0 : x.checkboxConfig,
77
+ radioConfig: (R = o.table) == null ? void 0 : R.radioConfig,
78
+ stripe: (T = o.table) == null ? void 0 : T.stripe,
79
+ border: (v = o.table) == null ? void 0 : v.border,
80
+ updateColumnsApi: (E = o.table) == null ? void 0 : E.updateColumnsApi,
81
+ getColumnsApi: (P = o.table) == null ? void 0 : P.getColumnsApi,
82
+ setColumnsApi: (D = o.table) == null ? void 0 : D.setColumnsApi,
83
+ columnsKey: (F = o.table) == null ? void 0 : F.columnsKey
84
+ };
85
+ }
86
+ class V {
87
+ /**
88
+ * 构造函数,初始化 store、状态等
89
+ * @param options 表格配置项
90
+ */
91
+ constructor(e = {}) {
92
+ /** vxe-grid 表格实例 */
93
+ s(this, "grid", n({}));
94
+ /** 表格操作方法集合(TtTableMethods) */
95
+ s(this, "methods", n({}));
96
+ /** 当前表格的 props 状态 */
97
+ s(this, "state", null);
98
+ /** 响应式 store,存储表格的状态 */
99
+ s(this, "store");
100
+ /** 响应式代理状态(loading、selectedKeys) */
101
+ s(this, "proxyState", n({
102
+ loading: !1,
103
+ selectedKeys: [],
104
+ isTableEvent: !1,
105
+ selectedRows: []
106
+ }));
107
+ s(this, "isMounted", !1);
108
+ s(this, "stateHandler");
109
+ /**
110
+ * @description: 获取表格选中数据
111
+ * @return {DT[]}
112
+ */
113
+ s(this, "selectedKeys", l(() => this.proxyState.selectedKeys));
114
+ /**
115
+ * @description: 获取表格选中数据
116
+ * @return {DT[]}
117
+ */
118
+ s(this, "selectedRows", l(() => this.proxyState.selectedRows));
119
+ /**
120
+ * 获取表格 loading 状态(响应式)
121
+ */
122
+ s(this, "getLoading", l(() => this.proxyState.loading));
123
+ /**
124
+ * 是否使用表格的event
125
+ */
126
+ s(this, "getIsTableEvent", l(() => this.proxyState.isTableEvent));
127
+ const t = { ...e }, i = M();
128
+ this.store = new z(r(t, i), {
129
+ onUpdate: () => {
130
+ this.state = this.store.state;
131
+ }
132
+ }), this.state = this.store.state, this.stateHandler = new H(), I(this);
133
+ }
134
+ /**
135
+ * 组件挂载时调用,注入表格实例和方法
136
+ * @param instance vxe-grid 实例
137
+ * @param methods 表格操作方法
138
+ */
139
+ mount(e, t) {
140
+ !this.isMounted && e && (Object.setPrototypeOf(this.grid, e), Object.setPrototypeOf(this.methods, t), this.stateHandler.setConditionTrue(), this.isMounted = !0);
141
+ }
142
+ /**
143
+ * 更新表格的状态
144
+ * @param stateOrFn 新状态或返回新状态的函数
145
+ */
146
+ setState(e) {
147
+ k(e) ? this.store.setState((t) => {
148
+ const i = e(t);
149
+ return r(i, t, ["searchInfo"]);
150
+ }) : this.store.setState((t) => r(e, t, ["searchInfo"]));
151
+ }
152
+ /**
153
+ * 组件卸载时调用,重置挂载状态
154
+ */
155
+ unmount() {
156
+ this.isMounted = !1, this.stateHandler.reset();
157
+ }
158
+ /**
159
+ * @description: 表格重载数据
160
+ * @param {FetchParams | undefined} data 加载的params
161
+ * @return {*}
162
+ */
163
+ async reload(e) {
164
+ try {
165
+ this.methods.reload(e);
166
+ } catch {
167
+ }
168
+ }
169
+ /**
170
+ * @description: 设置表格props
171
+ * @param {Partial<TtTableProps>} props 表格props
172
+ */
173
+ setProps(e) {
174
+ this.methods.setProps(e);
175
+ }
176
+ /**
177
+ * @description: 重新计算高度
178
+ * @return {*}
179
+ */
180
+ redoHeight() {
181
+ this.methods.redoHeight();
182
+ }
183
+ /**
184
+ * @description: 设置表格columns
185
+ * @param {VxeGridPropTypes.Columns<DT>} columns columns
186
+ * @return {*}
187
+ */
188
+ setTableColumns(e) {
189
+ this.methods.setTableColumns(e);
190
+ }
191
+ /**
192
+ * @description: 获取表格columns
193
+ * @return {VxeGridPropTypes.Columns<DT> | undefined}
194
+ */
195
+ getTableColumns() {
196
+ return this.methods.getTableColumns();
197
+ }
198
+ /**
199
+ * @description: 获取表格数据
200
+ * @return {DT[]}
201
+ */
202
+ getDataSource() {
203
+ return this.methods.getDataSource();
204
+ }
205
+ /**
206
+ * @description: 设置表格loading
207
+ * @param {boolean} loading
208
+ */
209
+ setLoading(e) {
210
+ this.methods.setLoading(e);
211
+ }
212
+ /**
213
+ * @description: 获取表格pagination
214
+ * @return {VxeGridPropTypes.PagerConfig | undefined}
215
+ */
216
+ getPagination() {
217
+ return this.methods.getPagination();
218
+ }
219
+ /**
220
+ * @description: 设置表格pagination
221
+ * @param {Partial<VxeGridPropTypes.PagerConfig>} props 表格pagination
222
+ */
223
+ setPagination(e) {
224
+ this.methods.setPagination(e);
225
+ }
226
+ /**
227
+ * @description: 获取选中数据的keys集合
228
+ * @return {Array<string>}
229
+ */
230
+ getSelectRowKeys() {
231
+ return this.methods.getSelectRowKeys();
232
+ }
233
+ /**
234
+ * @description: 获取选中数据
235
+ * @return {Array<string>}
236
+ */
237
+ getSelectRows() {
238
+ return this.methods.getSelectRows();
239
+ }
240
+ /**
241
+ * @description: 设置表格选中数据
242
+ * @param {TtSelectRowsType[]} rows 选中的数据
243
+ * @param {TtSelectRowKeysType[]} keys 选中的数据keys
244
+ */
245
+ setSelectedRowKeys(e, t) {
246
+ this.methods.setSelectedRowKeys(e, t);
247
+ }
248
+ /**
249
+ * @description: 清除全部行选择
250
+ */
251
+ clearSelectedRowKeys() {
252
+ this.methods.clearSelectedRowKeys();
253
+ }
254
+ /**
255
+ * 往表格插入临时数据,从第一行新增一行或多行新数据
256
+ * @param records 新数据
257
+ */
258
+ async insert(e) {
259
+ return await this.methods.insert(e);
260
+ }
261
+ /**
262
+ * 往表格指定行中插入临时数据
263
+ * 如果 row 为空则从插入到顶部,如果为树结构,则插入到目标节点顶部
264
+ * 如果 row 为 -1 则从插入到底部,如果为树结构,则插入到目标节点底部
265
+ * 如果 row 为有效行则插入到该行的位置,如果为树结构,则有插入到效的目标节点该行的位置
266
+ * @param {Object/Array} records 新的数据
267
+ * @param {Row} row 指定行
268
+ */
269
+ async insertAt(e, t) {
270
+ return await this.methods.insertAt(e, t);
271
+ }
272
+ /**
273
+ * 删除指定行数据,指定 row 或 [row, ...] 删除多条数据,如果为空则删除所有数据
274
+ * @param rows 指定行
275
+ */
276
+ async remove(e) {
277
+ return await this.methods.remove(e);
278
+ }
279
+ /**
280
+ * 删除复选框选中的行数据
281
+ */
282
+ async removeCheckboxRow() {
283
+ return await this.methods.removeCheckboxRow();
284
+ }
285
+ /**
286
+ * 删除单选框选中的行数据
287
+ */
288
+ async removeRadioRow() {
289
+ return await this.methods.removeRadioRow();
290
+ }
291
+ /**
292
+ * 删除当前行选中的行数据
293
+ */
294
+ async removeCurrentRow() {
295
+ return await this.methods.removeCurrentRow();
296
+ }
297
+ /**
298
+ * 清除编辑状态并重置数据
299
+ */
300
+ clearEditRevertData(e) {
301
+ this.methods.clearEditRevertData(e);
302
+ }
303
+ /**
304
+ * 指定行激活编辑
305
+ * @param {VxeTablePropTypes.Row} row 行数据
306
+ * @param {string | VxeTableDefines.ColumnInfo} fieldOrColumn 列配置可以时field
307
+ */
308
+ setEditRow(e, t) {
309
+ this.methods.setEditRow(e, t);
310
+ }
311
+ /**
312
+ * 指定单元格激活编辑
313
+ * @param {VxeTablePropTypes.Row} row 当前行数据
314
+ * @param {string | VxeTableDefines.ColumnInfo} fieldOrColumn 列配置可以时field
315
+ */
316
+ setEditCell(e, t) {
317
+ this.methods.setEditCell(e, t);
318
+ }
319
+ /**
320
+ * 加载数据
321
+ * @param data 数据
322
+ */
323
+ async loadData(e) {
324
+ return await this.methods.loadData(e);
325
+ }
326
+ /**
327
+ * 加载数据并恢复到初始状态
328
+ * @param data 数据
329
+ */
330
+ async reloadData(e) {
331
+ return await this.methods.reloadData(e);
332
+ }
333
+ /**
334
+ * 重新加载列
335
+ * @param columns 列对象
336
+ */
337
+ async reloadColumn(e) {
338
+ return await this.methods.reloadColumn(e);
339
+ }
340
+ /**
341
+ * 局部加载行数据并恢复到初始状态
342
+ * @param rows 行对象
343
+ * @param record 新数据
344
+ * @param field 指定字段名
345
+ */
346
+ async reloadRow(e, t, i) {
347
+ return await this.methods.reloadRow(e, t, i);
348
+ }
349
+ /**
350
+ * 手动清空单元格内容,如果不传参数,则清空整个表格内容,如果传了行则清空指定行内容,如果传了指定字段,则清空该字段内容
351
+ * @param data 指定行
352
+ * @param field 字段名
353
+ */
354
+ async clearData(e, t) {
355
+ return await this.methods.clearData(e, t);
356
+ }
357
+ /**
358
+ * 重新懒加载展开行,并展开内容
359
+ * @param row 指定行
360
+ */
361
+ reloadRowExpand(e) {
362
+ this.methods.reloadRowExpand(e);
363
+ }
364
+ /**
365
+ * 重新懒加载树节点,并展开该节点
366
+ * @param row 指定行
367
+ */
368
+ reloadTreeExpand(e) {
369
+ this.methods.reloadRowExpand(e);
370
+ }
371
+ /** 获取表格实例 */
372
+ getTableInstance() {
373
+ return this.grid;
374
+ }
375
+ /**
376
+ * 设置代理状态(loading、selectedKeys)
377
+ * @param state 代理状态对象
378
+ */
379
+ setProxyState(e) {
380
+ this.proxyState.selectedKeys = e.selectedKeys ?? this.proxyState.selectedKeys, this.proxyState.loading = e.loading ?? this.proxyState.loading, this.proxyState.isTableEvent = e.isTableEvent ?? this.proxyState.isTableEvent, this.proxyState.selectedRows = e.selectedRows ?? this.proxyState.selectedRows;
381
+ }
382
+ }
383
+ export {
384
+ V as TableApi,
385
+ M as getDefaultState
386
+ };
@@ -0,0 +1,122 @@
1
+ var d = Object.defineProperty;
2
+ var p = (r, t, e) => t in r ? d(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var s = (r, t, e) => p(r, typeof t != "symbol" ? t + "" : t, e);
4
+ import { mergeWithArrayOverride as a, StateHandler as u, bindMethods as b, isFunction as m } from "@dazhicheng/utils";
5
+ import { Store as c, useStore as f } from "@tanstack/vue-store";
6
+ import { reactive as o, computed as S, toValue as A } from "vue";
7
+ import { getDefaultState as y, TableApi as O } from "./table-api.js";
8
+ class I {
9
+ /**
10
+ * 构造函数,初始化 store、tableApi、状态等
11
+ * @param options 表单+表格配置项
12
+ */
13
+ constructor(t = {}) {
14
+ /** form 表单实例(FormApi) */
15
+ s(this, "formApi", o({}));
16
+ /** 表格 API 实例(TableApi) */
17
+ s(this, "tableApi", o({}));
18
+ /** vxe-grid 表格实例 */
19
+ s(this, "grid", o({}));
20
+ /** 当前表单+表格的 props 状态 */
21
+ s(this, "state", null);
22
+ /** 表单操作方法集合(TableFormActionType) */
23
+ s(this, "tableForm", o({}));
24
+ /** 响应式 store,存储表单+表格的状态 */
25
+ s(this, "store");
26
+ s(this, "isMounted", !1);
27
+ s(this, "stateHandler");
28
+ /**
29
+ * 当前选中的行 key 数组(响应式)
30
+ */
31
+ s(this, "selectedKeys", S(() => A(this.tableApi.selectedKeys) ?? []));
32
+ const e = { ...t }, i = y();
33
+ this.store = new c(
34
+ a(e, {
35
+ useSearchForm: !0,
36
+ table: i,
37
+ tableRowId: i.tableRowId || "id"
38
+ }),
39
+ {
40
+ onUpdate: () => {
41
+ this.state = this.store.state;
42
+ }
43
+ }
44
+ ), this.state = this.store.state, this.stateHandler = new u();
45
+ const l = new O({
46
+ ...this.state.table,
47
+ useSearchForm: this.state.useSearchForm || !1
48
+ }), n = l;
49
+ n.useStore = (h) => f(l.store, h), Object.setPrototypeOf(this.tableApi, n), b(this);
50
+ }
51
+ /**
52
+ * 组件挂载时调用,注入表单和表格实例
53
+ * @param instance 表单操作方法实例
54
+ * @param formApi 表单实例
55
+ */
56
+ mount(t, e) {
57
+ var i;
58
+ !this.isMounted && t && (Object.setPrototypeOf(this.grid, this.tableApi.grid), Object.setPrototypeOf(this.formApi, e), Object.setPrototypeOf(this.tableForm, t), (i = this.tableApi) == null || i.setState({ formApi: e }), this.stateHandler.setConditionTrue(), this.isMounted = !0);
59
+ }
60
+ /**
61
+ * 更新表单+表格的数据
62
+ * @param stateOrFn 新状态或返回新状态的函数
63
+ */
64
+ setState(t) {
65
+ m(t) ? this.store.setState((e) => a(t(e), e)) : this.store.setState((e) => a(t, e));
66
+ }
67
+ /**
68
+ * 重新加载表格数据
69
+ * @param data 可选的查询参数
70
+ */
71
+ async reload(t) {
72
+ this.tableForm.reload(t);
73
+ }
74
+ /**
75
+ * 获取表单实例
76
+ */
77
+ formInstance() {
78
+ return this.formApi;
79
+ }
80
+ /**
81
+ * 获取 vxe-grid 表格实例
82
+ */
83
+ vxeGridInstance() {
84
+ return this.tableApi.grid;
85
+ }
86
+ /**
87
+ * 获取表格 API 实例
88
+ */
89
+ tableInstance() {
90
+ return this.tableApi;
91
+ }
92
+ /**
93
+ * 设置表格属性
94
+ * @param props 表格属性
95
+ */
96
+ setTableProps(t) {
97
+ this.tableApi.setState(t);
98
+ }
99
+ /**
100
+ * 设置表单属性
101
+ * @param props 表单属性
102
+ */
103
+ setFormProps(t) {
104
+ this.formApi.setState(t);
105
+ }
106
+ /**
107
+ * 设置表单+表格属性
108
+ * @param props 属性
109
+ */
110
+ setProps(t) {
111
+ this.setState(t);
112
+ }
113
+ /**
114
+ * 组件卸载时调用,重置挂载状态
115
+ */
116
+ unmount() {
117
+ this.isMounted = !1, this.stateHandler.reset();
118
+ }
119
+ }
120
+ export {
121
+ I as TableFormApi
122
+ };
@@ -0,0 +1,7 @@
1
+ import { withInstall as t } from "@dazhicheng/utils";
2
+ import o from "./index.vue.js";
3
+ const m = t(o);
4
+ export {
5
+ m as TtText,
6
+ m as default
7
+ };
@@ -0,0 +1,7 @@
1
+ import t from "./index.vue2.js";
2
+ /* empty css */
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-d6305864"]]);
5
+ export {
6
+ s as default
7
+ };
@@ -0,0 +1,73 @@
1
+ import { defineComponent as c, computed as s, withDirectives as u, createCommentVNode as d, createElementBlock as m, openBlock as f, normalizeStyle as y, renderSlot as T, createTextVNode as h, toDisplayString as b, unref as k } from "vue";
2
+ import x from "../../directives/auto-tip/index.js";
3
+ import { ElMessage as C } from "element-plus";
4
+ const V = /* @__PURE__ */ c({
5
+ name: "TtText",
6
+ __name: "index",
7
+ props: {
8
+ modelValue: {},
9
+ toolTip: { type: Boolean, default: !0 },
10
+ placement: { default: "top" },
11
+ toolTipLine: { default: 1 },
12
+ toolTipMaxWidth: { default: 400 },
13
+ toolTipMaxHeight: { default: 600 },
14
+ lineHeight: {},
15
+ visible: { type: Boolean, default: !0 },
16
+ copy: { type: Boolean, default: !1 }
17
+ },
18
+ setup(n) {
19
+ const i = n, p = s(() => i.visible);
20
+ let o = 0, l = null;
21
+ function r() {
22
+ if (i.copy)
23
+ if (o++, l && clearTimeout(l), o === 3) {
24
+ const e = i.modelValue || "--";
25
+ navigator.clipboard ? navigator.clipboard.writeText(e).then(() => {
26
+ C({
27
+ message: "复制成功",
28
+ type: "success",
29
+ plain: !0
30
+ });
31
+ }).catch(() => {
32
+ a(e);
33
+ }) : a(e), o = 0;
34
+ } else
35
+ l = setTimeout(() => {
36
+ o = 0, l = null;
37
+ }, 300);
38
+ }
39
+ function a(e) {
40
+ try {
41
+ const t = document.createElement("textarea");
42
+ t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t);
43
+ } catch {
44
+ }
45
+ }
46
+ return (e, t) => p.value ? u((f(), m("span", {
47
+ key: 0,
48
+ class: "tool-tip-text",
49
+ style: y({
50
+ whiteSpace: "pre-line",
51
+ "-webkit-line-clamp": e.toolTipLine,
52
+ "word-break": "break-all"
53
+ }),
54
+ onClick: r
55
+ }, [
56
+ T(e.$slots, "default", {}, () => [
57
+ h(b(e.modelValue || "--"), 1)
58
+ ], !0)
59
+ ], 4)), [
60
+ [
61
+ k(x),
62
+ e.toolTip ? {
63
+ placement: e.placement,
64
+ toolTipMaxWidth: e.toolTipMaxWidth,
65
+ toolTipMaxHeight: e.toolTipMaxHeight
66
+ } : !1
67
+ ]
68
+ ]) : d("", !0);
69
+ }
70
+ });
71
+ export {
72
+ V as default
73
+ };
@@ -0,0 +1,9 @@
1
+ import { withInstall as o } from "@dazhicheng/utils";
2
+ import t from "./src/TtUpload.vue.js";
3
+ import { ttUploadProps as l } from "./src/typing.js";
4
+ const a = o(t);
5
+ export {
6
+ a as TtUpload,
7
+ a as default,
8
+ l as ttUploadProps
9
+ };