@mc20230601/keep-up 1.0.18 → 1.0.26

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 (255) hide show
  1. package/es/components/codeEditor/index.d.ts +11 -11
  2. package/es/{packages/components → components}/codeEditor/index.mjs +3 -3
  3. package/es/components/codeEditor/index.mjs.map +1 -0
  4. package/es/components/commonDrawer/index.d.ts +28 -15
  5. package/es/{packages/components → components}/commonDrawer/index.mjs +11 -4
  6. package/es/components/commonDrawer/index.mjs.map +1 -0
  7. package/es/components/commonEditor/constants.d.ts +17 -0
  8. package/es/components/commonEditor/constants.mjs +16 -0
  9. package/es/components/commonEditor/constants.mjs.map +1 -0
  10. package/es/components/commonEditor/index.d.ts +181 -0
  11. package/es/components/commonEditor/index.mjs +193 -0
  12. package/es/components/commonEditor/index.mjs.map +1 -0
  13. package/es/components/commonEditor/index.module.mjs +4 -0
  14. package/es/components/commonEditor/index.module.mjs.map +1 -0
  15. package/es/components/commonEditor/interfaces.d.ts +46 -0
  16. package/es/components/commonEditor/interfaces.mjs +2 -0
  17. package/es/components/commonEditor/interfaces.mjs.map +1 -0
  18. package/es/components/commonEditor/useModeMap.d.ts +4 -0
  19. package/es/components/commonEditor/useModeMap.mjs +17 -0
  20. package/es/components/commonEditor/useModeMap.mjs.map +1 -0
  21. package/es/components/commonFilter/constants.d.ts +2 -0
  22. package/es/components/commonFilter/constants.mjs +4 -0
  23. package/es/components/commonFilter/constants.mjs.map +1 -0
  24. package/es/components/commonFilter/index.d.ts +107 -0
  25. package/es/components/commonFilter/index.mjs +103 -0
  26. package/es/components/commonFilter/index.mjs.map +1 -0
  27. package/es/components/commonFilter/index.module.mjs +4 -0
  28. package/es/components/commonFilter/index.module.mjs.map +1 -0
  29. package/es/components/commonFilter/interfaces.d.ts +75 -0
  30. package/es/components/commonFilter/interfaces.mjs +2 -0
  31. package/es/components/commonFilter/interfaces.mjs.map +1 -0
  32. package/es/components/commonFilter/props.d.ts +31 -0
  33. package/es/components/commonFilter/props.mjs +30 -0
  34. package/es/components/commonFilter/props.mjs.map +1 -0
  35. package/es/components/commonFilter/useCollapse.d.ts +2 -0
  36. package/es/components/commonFilter/useCollapse.mjs +29 -0
  37. package/es/components/commonFilter/useCollapse.mjs.map +1 -0
  38. package/es/components/commonFilter/useFieldsParser.d.ts +5 -0
  39. package/es/components/commonFilter/useFieldsParser.mjs +34 -0
  40. package/es/components/commonFilter/useFieldsParser.mjs.map +1 -0
  41. package/es/components/commonFilter/useKeepFilter.d.ts +3 -0
  42. package/es/components/commonFilter/useKeepFilter.mjs +36 -0
  43. package/es/components/commonFilter/useKeepFilter.mjs.map +1 -0
  44. package/es/components/commonFilter/utils.d.ts +3 -0
  45. package/es/components/commonFilter/utils.mjs +14 -0
  46. package/es/components/commonFilter/utils.mjs.map +1 -0
  47. package/es/components/commonJsonPretty/index.d.ts +31 -0
  48. package/es/components/commonJsonPretty/index.mjs +26 -0
  49. package/es/components/commonJsonPretty/index.mjs.map +1 -0
  50. package/es/components/commonLocations/constants.d.ts +28 -0
  51. package/es/components/commonLocations/constants.mjs +18 -0
  52. package/es/components/commonLocations/constants.mjs.map +1 -0
  53. package/es/components/commonLocations/index.d.ts +40 -0
  54. package/es/components/commonLocations/index.mjs +94 -0
  55. package/es/components/commonLocations/index.mjs.map +1 -0
  56. package/es/components/commonLocations/index.module.mjs +4 -0
  57. package/es/components/commonLocations/index.module.mjs.map +1 -0
  58. package/es/components/commonLocations/interfaces.d.ts +100 -0
  59. package/es/components/commonLocations/interfaces.mjs +2 -0
  60. package/es/components/commonLocations/interfaces.mjs.map +1 -0
  61. package/es/components/commonLocations/useLocations.d.ts +2 -0
  62. package/es/components/commonLocations/useLocations.mjs +151 -0
  63. package/es/components/commonLocations/useLocations.mjs.map +1 -0
  64. package/es/components/commonLocations/utils.d.ts +14 -0
  65. package/es/components/commonLocations/utils.mjs +73 -0
  66. package/es/components/commonLocations/utils.mjs.map +1 -0
  67. package/es/components/commonModal/index.d.ts +30 -0
  68. package/es/components/commonModal/index.mjs +56 -0
  69. package/es/components/commonModal/index.mjs.map +1 -0
  70. package/es/components/commonModal/index.module.mjs +4 -0
  71. package/es/components/commonModal/index.module.mjs.map +1 -0
  72. package/es/components/commonModal/interfaces.d.ts +7 -0
  73. package/es/components/commonModal/interfaces.mjs +2 -0
  74. package/es/components/commonModal/interfaces.mjs.map +1 -0
  75. package/es/components/commonPage/constants.d.ts +18 -0
  76. package/es/components/commonPage/constants.mjs +16 -0
  77. package/es/components/commonPage/constants.mjs.map +1 -0
  78. package/es/components/commonPage/index.d.ts +256 -0
  79. package/es/components/commonPage/index.mjs +461 -0
  80. package/es/components/commonPage/index.mjs.map +1 -0
  81. package/es/components/commonPage/index.module.mjs +4 -0
  82. package/es/components/commonPage/index.module.mjs.map +1 -0
  83. package/es/components/commonPage/interfaces.d.ts +113 -0
  84. package/es/components/commonPage/interfaces.mjs +2 -0
  85. package/es/components/commonPage/interfaces.mjs.map +1 -0
  86. package/es/components/commonPage/useAsyncDataSource.d.ts +4 -0
  87. package/es/components/commonPage/useAsyncDataSource.mjs +39 -0
  88. package/es/components/commonPage/useAsyncDataSource.mjs.map +1 -0
  89. package/es/components/commonPage/useLayout.d.ts +6 -0
  90. package/es/components/commonPage/useLayout.mjs +37 -0
  91. package/es/components/commonPage/useLayout.mjs.map +1 -0
  92. package/es/components/commonPage/usePage.d.ts +4 -0
  93. package/es/components/commonPage/usePage.mjs +64 -0
  94. package/es/components/commonPage/usePage.mjs.map +1 -0
  95. package/es/components/commonPage/usePageActions.d.ts +2 -0
  96. package/es/components/commonPage/usePageActions.mjs +66 -0
  97. package/es/components/commonPage/usePageActions.mjs.map +1 -0
  98. package/es/components/commonPage/usePagePreferences.d.ts +3 -0
  99. package/es/components/commonPage/usePagePreferences.mjs +54 -0
  100. package/es/components/commonPage/usePagePreferences.mjs.map +1 -0
  101. package/es/components/commonPage/utils.d.ts +4 -0
  102. package/es/components/commonPage/utils.mjs +11 -0
  103. package/es/components/commonPage/utils.mjs.map +1 -0
  104. package/es/components/commonSetter/components/draggableList/index.d.ts +31 -0
  105. package/es/components/commonSetter/components/draggableList/index.mjs +113 -0
  106. package/es/components/commonSetter/components/draggableList/index.mjs.map +1 -0
  107. package/es/components/commonSetter/components/draggableList/index.module.mjs +4 -0
  108. package/es/components/commonSetter/components/draggableList/index.module.mjs.map +1 -0
  109. package/es/components/commonSetter/constants.d.ts +7 -0
  110. package/es/components/commonSetter/constants.mjs +10 -0
  111. package/es/components/commonSetter/constants.mjs.map +1 -0
  112. package/es/components/commonSetter/index.d.ts +31 -0
  113. package/es/components/commonSetter/index.mjs +108 -0
  114. package/es/components/commonSetter/index.mjs.map +1 -0
  115. package/es/components/commonSetter/index.module.mjs +4 -0
  116. package/es/components/commonSetter/index.module.mjs.map +1 -0
  117. package/es/components/commonTable/constants.d.ts +11 -0
  118. package/es/components/commonTable/constants.mjs +14 -0
  119. package/es/components/commonTable/constants.mjs.map +1 -0
  120. package/es/components/commonTable/index.d.ts +132 -0
  121. package/es/components/commonTable/index.mjs +140 -0
  122. package/es/components/commonTable/index.mjs.map +1 -0
  123. package/es/components/commonTable/index.module.mjs +4 -0
  124. package/es/components/commonTable/index.module.mjs.map +1 -0
  125. package/es/components/commonTable/interfaces.d.ts +54 -0
  126. package/es/components/commonTable/interfaces.mjs +2 -0
  127. package/es/components/commonTable/interfaces.mjs.map +1 -0
  128. package/es/components/commonTable/props.d.ts +71 -0
  129. package/es/components/commonTable/props.mjs +72 -0
  130. package/es/components/commonTable/props.mjs.map +1 -0
  131. package/es/components/commonTable/usePagination.d.ts +3 -0
  132. package/es/components/commonTable/usePagination.mjs +41 -0
  133. package/es/components/commonTable/usePagination.mjs.map +1 -0
  134. package/es/components/commonTable/utils.d.ts +3 -0
  135. package/es/components/commonTable/utils.mjs +17 -0
  136. package/es/components/commonTable/utils.mjs.map +1 -0
  137. package/es/components/elIconPlus/index.d.ts +15 -0
  138. package/es/components/elIconPlus/index.mjs +31 -0
  139. package/es/components/elIconPlus/index.mjs.map +1 -0
  140. package/es/components/formTabs/index.d.ts +35 -0
  141. package/es/components/formTabs/index.mjs +60 -0
  142. package/es/components/formTabs/index.mjs.map +1 -0
  143. package/es/components/formilyCmps/formTab/index.d.ts +83 -0
  144. package/es/components/formilyCmps/formTab/index.mjs +146 -0
  145. package/es/components/formilyCmps/formTab/index.mjs.map +1 -0
  146. package/es/components/formilyCmps/formilyForm/constants.d.ts +39 -0
  147. package/es/components/formilyCmps/formilyForm/constants.mjs +41 -0
  148. package/es/components/formilyCmps/formilyForm/constants.mjs.map +1 -0
  149. package/es/components/formilyCmps/formilyForm/index.d.ts +131 -0
  150. package/es/components/formilyCmps/formilyForm/index.mjs +148 -0
  151. package/es/components/formilyCmps/formilyForm/index.mjs.map +1 -0
  152. package/es/components/formilyCmps/formilyForm/index.module.mjs +4 -0
  153. package/es/components/formilyCmps/formilyForm/index.module.mjs.map +1 -0
  154. package/es/components/formilyCmps/formilyForm/interfaces.d.ts +28 -0
  155. package/es/components/formilyCmps/formilyForm/interfaces.mjs +2 -0
  156. package/es/components/formilyCmps/formilyForm/interfaces.mjs.map +1 -0
  157. package/es/components/formilyCmps/formilyForm/utils.d.ts +3 -0
  158. package/es/components/formilyCmps/formilyForm/utils.mjs +14 -0
  159. package/es/components/formilyCmps/formilyForm/utils.mjs.map +1 -0
  160. package/es/components/formilyCmps/index.d.ts +3 -0
  161. package/es/components/formilyCmps/index.mjs +3 -0
  162. package/es/components/formilyCmps/sectionTitle/index.d.ts +28 -0
  163. package/es/components/formilyCmps/sectionTitle/index.mjs +30 -0
  164. package/es/components/formilyCmps/sectionTitle/index.mjs.map +1 -0
  165. package/es/components/formilyCmps/sectionTitle/index.module.mjs +4 -0
  166. package/es/components/formilyCmps/sectionTitle/index.module.mjs.map +1 -0
  167. package/es/components/fragment/index.d.ts +4 -0
  168. package/es/components/fragment/index.mjs +16 -0
  169. package/es/components/fragment/index.mjs.map +1 -0
  170. package/es/components/iconFont/index.d.ts +36 -0
  171. package/es/components/iconFont/index.mjs +44 -0
  172. package/es/components/iconFont/index.mjs.map +1 -0
  173. package/es/components/index.d.ts +22 -0
  174. package/es/components/index.mjs +21 -0
  175. package/es/{packages/interfaces → components}/index.mjs.map +1 -1
  176. package/es/components/radioGroup/constants.d.ts +371 -0
  177. package/es/components/radioGroup/constants.mjs +11 -0
  178. package/es/components/radioGroup/constants.mjs.map +1 -0
  179. package/es/components/radioGroup/index.d.ts +203 -0
  180. package/es/components/radioGroup/index.mjs +60 -0
  181. package/es/components/radioGroup/index.mjs.map +1 -0
  182. package/es/components/radioGroup/interfaces.d.ts +7 -0
  183. package/es/components/radioGroup/interfaces.mjs +2 -0
  184. package/es/components/radioGroup/interfaces.mjs.map +1 -0
  185. package/es/components/space/index.d.ts +61 -0
  186. package/es/components/space/index.mjs +59 -0
  187. package/es/components/space/index.mjs.map +1 -0
  188. package/es/components/upload/formilyUpload.d.ts +73 -0
  189. package/es/components/upload/formilyUpload.mjs +90 -0
  190. package/es/components/upload/formilyUpload.mjs.map +1 -0
  191. package/es/components/upload/index.d.ts +271 -0
  192. package/es/components/upload/index.mjs +22 -0
  193. package/es/components/upload/index.mjs.map +1 -0
  194. package/es/components/upload/index.module.mjs +4 -0
  195. package/es/components/upload/index.module.mjs.map +1 -0
  196. package/es/components/upload/modalUpload.d.ts +36 -0
  197. package/es/components/upload/modalUpload.mjs +67 -0
  198. package/es/components/upload/modalUpload.mjs.map +1 -0
  199. package/es/components/upload/upload.d.ts +76 -0
  200. package/es/components/upload/upload.mjs +91 -0
  201. package/es/components/upload/upload.mjs.map +1 -0
  202. package/es/constants/common.d.ts +1 -1
  203. package/es/constants/common.mjs.map +1 -0
  204. package/es/index.d.ts +17 -1
  205. package/es/index.mjs +20 -2
  206. package/es/index.mjs.map +1 -1
  207. package/es/styles/index.css +298 -0
  208. package/es/utils/common.d.ts +1 -1
  209. package/es/utils/common.mjs.map +1 -0
  210. package/es/{packages/utils → utils}/emitter.mjs +1 -1
  211. package/es/utils/emitter.mjs.map +1 -0
  212. package/es/utils/shared.mjs.map +1 -0
  213. package/es/utils/storage.mjs.map +1 -0
  214. package/package.json +1 -2
  215. package/es/_virtual/ace.mjs +0 -4
  216. package/es/_virtual/ace.mjs.map +0 -1
  217. package/es/_virtual/mode-javascript.mjs +0 -4
  218. package/es/_virtual/mode-javascript.mjs.map +0 -1
  219. package/es/_virtual/theme-monokai.mjs +0 -4
  220. package/es/_virtual/theme-monokai.mjs.map +0 -1
  221. package/es/constants/index.d.ts +0 -0
  222. package/es/node_modules/.pnpm/ace-builds@1.43.5/node_modules/ace-builds/src-noconflict/ace.mjs +0 -21889
  223. package/es/node_modules/.pnpm/ace-builds@1.43.5/node_modules/ace-builds/src-noconflict/ace.mjs.map +0 -1
  224. package/es/node_modules/.pnpm/ace-builds@1.43.5/node_modules/ace-builds/src-noconflict/mode-javascript.mjs +0 -1186
  225. package/es/node_modules/.pnpm/ace-builds@1.43.5/node_modules/ace-builds/src-noconflict/mode-javascript.mjs.map +0 -1
  226. package/es/node_modules/.pnpm/ace-builds@1.43.5/node_modules/ace-builds/src-noconflict/theme-monokai.mjs +0 -22
  227. package/es/node_modules/.pnpm/ace-builds@1.43.5/node_modules/ace-builds/src-noconflict/theme-monokai.mjs.map +0 -1
  228. package/es/node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/dist/mitt.mjs +0 -4
  229. package/es/node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/dist/mitt.mjs.map +0 -1
  230. package/es/packages/components/codeEditor/index.mjs.map +0 -1
  231. package/es/packages/components/commonDrawer/index.mjs.map +0 -1
  232. package/es/packages/components/index.mjs +0 -3
  233. package/es/packages/constants/common.mjs.map +0 -1
  234. package/es/packages/interfaces/index.mjs +0 -2
  235. package/es/packages/utils/common.mjs.map +0 -1
  236. package/es/packages/utils/emitter.mjs.map +0 -1
  237. package/es/packages/utils/shared.mjs.map +0 -1
  238. package/es/packages/utils/storage.mjs.map +0 -1
  239. /package/es/{packages/components → components}/commonDrawer/index.module.mjs +0 -0
  240. /package/es/{packages/components → components}/commonDrawer/index.module.mjs.map +0 -0
  241. /package/es/{packages/components → components}/commonDrawer/interfaces.mjs +0 -0
  242. /package/es/{packages/components → components}/commonDrawer/interfaces.mjs.map +0 -0
  243. /package/es/{packages/components → components/formilyCmps}/index.mjs.map +0 -0
  244. /package/es/{packages/constants → constants}/common.mjs +0 -0
  245. /package/es/{packages/interfaces → interfaces}/common.mjs +0 -0
  246. /package/es/{packages/interfaces → interfaces}/common.mjs.map +0 -0
  247. /package/es/{packages/interfaces → interfaces}/commonPage.mjs +0 -0
  248. /package/es/{packages/interfaces → interfaces}/commonPage.mjs.map +0 -0
  249. /package/es/{packages/constants → interfaces}/index.mjs +0 -0
  250. /package/es/{packages/constants → interfaces}/index.mjs.map +0 -0
  251. /package/es/{packages/utils → utils}/common.mjs +0 -0
  252. /package/es/{packages/utils → utils}/index.mjs +0 -0
  253. /package/es/{packages/utils → utils}/index.mjs.map +0 -0
  254. /package/es/{packages/utils → utils}/shared.mjs +0 -0
  255. /package/es/{packages/utils → utils}/storage.mjs +0 -0
@@ -0,0 +1,72 @@
1
+ import { ref } from 'vue';
2
+
3
+ const props = {
4
+ /** 行标识 */
5
+ rowKey: {
6
+ type: String,
7
+ default: "id"
8
+ },
9
+ /** columns */
10
+ columns: {
11
+ type: Object,
12
+ default: () => ref([])
13
+ },
14
+ /** 获取列表 */
15
+ listApi: {
16
+ type: Function,
17
+ default: void 0
18
+ },
19
+ /** 格式化列表接口入参 */
20
+ formatListParams: {
21
+ type: Function,
22
+ default: void 0
23
+ },
24
+ /** getList前置钩子 */
25
+ beforeFetch: {
26
+ type: Function,
27
+ default: void 0
28
+ },
29
+ /** 可选择 */
30
+ selectable: {
31
+ type: Boolean,
32
+ default: false
33
+ },
34
+ /** 选择配置 */
35
+ selectOptions: {
36
+ type: Function,
37
+ default: () => true
38
+ },
39
+ /** 选中值 */
40
+ selected: {
41
+ type: Array,
42
+ default: () => []
43
+ },
44
+ /** 表格展开区域渲染器 */
45
+ expandedRowRender: {
46
+ type: Function,
47
+ default: void 0
48
+ },
49
+ /** 分页配置 */
50
+ paginationConfig: {
51
+ type: Object,
52
+ default: () => ({})
53
+ },
54
+ /** 需要分页 */
55
+ needPagination: {
56
+ type: Boolean,
57
+ default: false
58
+ },
59
+ /** class */
60
+ class: {
61
+ type: String,
62
+ default: void 0
63
+ },
64
+ /** style */
65
+ style: {
66
+ type: Object,
67
+ default: () => ({})
68
+ }
69
+ };
70
+
71
+ export { props };
72
+ //# sourceMappingURL=props.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.mjs","sources":["../../../../../packages/components/commonTable/props.ts"],"sourcesContent":["import { ref } from 'vue'\n\nimport type { PropType, Ref, VNode } from 'vue'\nimport type { Column } from 'element-plus'\nimport type { IExpandedRowRenderParams } from '../commonPage/interfaces'\nimport type { IListApi, ICommonObj } from '../../interfaces'\n\nexport const props = {\n /** 行标识 */\n rowKey: {\n type: String,\n default: 'id',\n },\n /** columns */\n columns: {\n type: Object as PropType<Ref<Column[]>>,\n default: () => (ref([])),\n },\n /** 获取列表 */\n listApi: {\n type: Function as PropType<IListApi>,\n default: undefined,\n },\n /** 格式化列表接口入参 */\n formatListParams: {\n type: Function as PropType<(p: any) => any>,\n default: undefined,\n },\n /** getList前置钩子 */\n beforeFetch: {\n type: Function as PropType<(p: Record<'formData' | 'pagination', ICommonObj | undefined>) => Promise<void> | void>,\n default: undefined,\n },\n /** 可选择 */\n selectable: {\n type: Boolean,\n default: false,\n },\n /** 选择配置 */\n selectOptions: {\n type: Function as PropType<(row?: any, index?: number) => boolean>,\n default: () => true,\n },\n /** 选中值 */\n selected: {\n type: Array,\n default: () => ([]),\n },\n /** 表格展开区域渲染器 */\n expandedRowRender: {\n type: Function as PropType<(p: IExpandedRowRenderParams) => VNode>,\n default: undefined,\n },\n /** 分页配置 */\n paginationConfig: {\n type: Object,\n default: () => ({}),\n },\n /** 需要分页 */\n needPagination: {\n type: Boolean,\n default: false,\n },\n /** class */\n class: {\n type: String,\n default: undefined,\n },\n /** style */\n style: {\n type: Object,\n default: () => ({}),\n },\n}\n"],"names":[],"mappings":";;AAOO,MAAM,KAAQ,GAAA;AAAA;AAAA,EAEnB,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA;AAAA,EAEA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAO,GAAI,CAAA,EAAE,CAAA;AAAA,GACxB;AAAA;AAAA,EAEA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,QAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA;AAAA,EAEA,gBAAkB,EAAA;AAAA,IAChB,IAAM,EAAA,QAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA;AAAA,EAEA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,QAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA;AAAA,EAEA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;AAAA,EAEA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA,QAAA;AAAA,IACN,SAAS,MAAM,IAAA;AAAA,GACjB;AAAA;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAO,EAAC;AAAA,GACnB;AAAA;AAAA,EAEA,iBAAmB,EAAA;AAAA,IACjB,IAAM,EAAA,QAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA;AAAA,EAEA,gBAAkB,EAAA;AAAA,IAChB,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA,EAEA,cAAgB,EAAA;AAAA,IACd,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;AAAA,EAEA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA;AAAA,EAEA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AACF;;;;"}
@@ -0,0 +1,3 @@
1
+ import type { IUsePaginationParams, IUsePaginationRes } from './interfaces';
2
+ declare const usePagination: ({ currentPage, commonFilterRef, setSelected, props, }: IUsePaginationParams) => IUsePaginationRes;
3
+ export default usePagination;
@@ -0,0 +1,41 @@
1
+ import { toRefs, ref, reactive, nextTick } from 'vue';
2
+ import { defaultPageSize, key } from './constants.mjs';
3
+
4
+ const usePagination = ({
5
+ currentPage,
6
+ commonFilterRef,
7
+ setSelected,
8
+ props
9
+ }) => {
10
+ const { listApi, formatListParams, beforeFetch, needPagination } = toRefs(props);
11
+ const data = ref([]);
12
+ const pagination = reactive(
13
+ needPagination.value ? { page: 0, pageSize: defaultPageSize, total: 0 } : null
14
+ );
15
+ const getList = async (curPage = 1, pageSize = defaultPageSize, text) => {
16
+ var _a, _b, _c, _d;
17
+ try {
18
+ const fromRef = (_a = commonFilterRef.value) == null ? void 0 : _a.getForm();
19
+ const isFunction = typeof formatListParams.value === "function";
20
+ if (needPagination.value) {
21
+ pagination.page = curPage;
22
+ pagination.pageSize = pageSize;
23
+ }
24
+ const rawParams = { ...(fromRef == null ? void 0 : fromRef.values) || {}, ...pagination || {} };
25
+ const params = isFunction ? await ((_b = formatListParams.value) == null ? void 0 : _b.call(formatListParams, rawParams)) : rawParams;
26
+ (_c = beforeFetch.value) == null ? void 0 : _c.call(beforeFetch, { formData: fromRef == null ? void 0 : fromRef.values, pagination });
27
+ const res = await listApi.value(params || {});
28
+ currentPage.value = curPage;
29
+ data.value = res == null ? void 0 : res[key];
30
+ needPagination.value && (pagination.total = (_d = res == null ? void 0 : res.pagination) == null ? void 0 : _d.total);
31
+ await nextTick();
32
+ setSelected(data.value);
33
+ } catch (error) {
34
+ console.error(`\u83B7\u53D6\u5217\u8868\u6570\u636E\u5931\u8D25\uFF0C\u5931\u8D25\u539F\u56E0:${error}`);
35
+ }
36
+ };
37
+ return { data, pagination, getList };
38
+ };
39
+
40
+ export { usePagination as default };
41
+ //# sourceMappingURL=usePagination.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePagination.mjs","sources":["../../../../../packages/components/commonTable/usePagination.ts"],"sourcesContent":["import { ref, reactive, nextTick, toRefs } from 'vue'\nimport { ElMessage } from 'element-plus'\nimport { key, defaultPageSize } from './constants'\n\nimport type { IUsePaginationParams, IUsePaginationRes, IPagination } from './interfaces'\n\nconst usePagination = ({\n currentPage,\n commonFilterRef,\n setSelected,\n props,\n}: IUsePaginationParams): IUsePaginationRes => {\n const { listApi, formatListParams, beforeFetch, needPagination } = toRefs(props)\n const data = ref([])\n const pagination = reactive<IPagination>(\n needPagination.value ? { page: 0, pageSize: defaultPageSize, total: 0 } : null,\n )\n const getList = async (\n curPage: number = 1,\n pageSize: number = defaultPageSize,\n text?: string,\n ) => {\n try {\n const fromRef = commonFilterRef.value?.getForm()\n const isFunction = typeof formatListParams.value === 'function'\n if (needPagination.value) {\n pagination.page = curPage\n pagination.pageSize = pageSize\n }\n const rawParams = { ...(fromRef?.values || {}), ...(pagination || {}) }\n const params = isFunction ? await formatListParams.value?.(rawParams) : rawParams\n beforeFetch.value?.({ formData: fromRef?.values, pagination })\n const res = await listApi.value(params || {})\n currentPage.value = curPage\n data.value = res?.[key]\n needPagination.value && (pagination.total = res?.pagination?.total)\n // ElMessage({\n // message: `${text || '查询'}成功`,\n // type: 'success',\n // })\n await nextTick()\n setSelected(data.value)\n } catch (error: any) {\n console.error(`获取列表数据失败,失败原因:${error}`)\n }\n }\n return { data, pagination, getList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BAAA,CAAA,KAAA,KAAjB,0CAAyB,SAAa,CAAA,CAAA,GAAA,SAAA,CAAA;AACxE,MAAA,CAAA,EAAA,GAAA,WAAA,CAAY,UAAZ,IAAoB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,WAAA,EAAA,EAAE,QAAU,EAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAS,QAAQ,UAAW,EAAA,CAAA,CAAA;AAC5D,MAAA,MAAM,MAAM,MAAM,OAAA,CAAQ,KAAM,CAAA,MAAA,IAAU,EAAE,CAAA,CAAA;AAC5C,MAAA,WAAA,CAAY,KAAQ,GAAA,OAAA,CAAA;AACpB,MAAA,IAAA,CAAK,QAAQ,GAAM,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,GAAA,CAAA,CAAA;AACnB,MAAA,cAAA,CAAe,KAAU,KAAA,UAAA,CAAW,KAAQ,GAAA,CAAA,EAAA,GAAA,GAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAK,eAAL,IAAiB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAK7D,MAAA,MAAM,QAAS,EAAA,CAAA;AACf,MAAA,WAAA,CAAY,KAAK,KAAK,CAAA,CAAA;AAAA,aACf,KAAY,EAAA;AACnB,MAAQ,OAAA,CAAA,KAAA,CAAM,CAAiB,+EAAA,EAAA,KAAK,CAAE,CAAA,CAAA,CAAA;AAAA,KACxC;AAAA,GACF,CAAA;AACA,EAAO,OAAA,EAAE,IAAM,EAAA,UAAA,EAAY,OAAQ,EAAA,CAAA;AACrC;;;;"}
@@ -0,0 +1,3 @@
1
+ import type { ISetSelectedParams } from './interfaces';
2
+ /** 设置选中值 */
3
+ export declare const setSelected: ({ tableRef, selected, rowKey, data, }: ISetSelectedParams) => void;
@@ -0,0 +1,17 @@
1
+ const setSelected = ({
2
+ tableRef,
3
+ selected = [],
4
+ rowKey,
5
+ data
6
+ }) => {
7
+ selected.map((v) => {
8
+ var _a;
9
+ const matched = data.find((v1) => v1[rowKey] === v[rowKey]);
10
+ if (matched) {
11
+ (_a = tableRef.value) == null ? void 0 : _a.toggleRowSelection(matched, true);
12
+ }
13
+ });
14
+ };
15
+
16
+ export { setSelected };
17
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.mjs","sources":["../../../../../packages/components/commonTable/utils.ts"],"sourcesContent":["import type { ISetSelectedParams } from './interfaces'\n\n/** 设置选中值 */\nexport const setSelected = ({\n tableRef,\n selected = [],\n rowKey,\n data,\n}: ISetSelectedParams) => {\n selected.map(v => {\n const matched = data.find(v1 => v1[rowKey] === v[rowKey])\n if (matched) {\n tableRef.value?.toggleRowSelection(matched, true)\n }\n })\n}\n"],"names":[],"mappings":"AAGO,MAAM,cAAc,CAAC;AAAA,EAC1B,QAAA;AAAA,EACA,WAAW,EAAC;AAAA,EACZ,MAAA;AAAA,EACA,IAAA;AACF,CAA0B,KAAA;AACxB,EAAA,QAAA,CAAS,IAAI,CAAK,CAAA,KAAA;AATpB,IAAA,IAAA,EAAA,CAAA;AAUI,IAAM,MAAA,OAAA,GAAU,KAAK,IAAK,CAAA,CAAA,EAAA,KAAM,GAAG,MAAM,CAAA,KAAM,CAAE,CAAA,MAAM,CAAC,CAAA,CAAA;AACxD,IAAA,IAAI,OAAS,EAAA;AACX,MAAS,CAAA,EAAA,GAAA,QAAA,CAAA,KAAA,KAAT,IAAgB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,kBAAA,CAAmB,OAAS,EAAA,IAAA,CAAA,CAAA;AAAA,KAC9C;AAAA,GACD,CAAA,CAAA;AACH;;;;"}
@@ -0,0 +1,15 @@
1
+ import type { Component, PropType, VNode } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ icon: {
4
+ type: PropType<VNode | Component>;
5
+ default: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ };
7
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
+ icon: {
9
+ type: PropType<VNode | Component>;
10
+ default: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ };
12
+ }>> & Readonly<{}>, {
13
+ icon: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { defineComponent, createVNode, h, isVNode } from 'vue';
2
+ import { ElIcon } from 'element-plus';
3
+ import { StarFilled } from '@element-plus/icons-vue';
4
+
5
+ function _isSlot(s) {
6
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
7
+ }
8
+ const props = {
9
+ icon: {
10
+ type: Object,
11
+ default: StarFilled
12
+ }
13
+ };
14
+ var ElIconPlus = defineComponent({
15
+ name: "ElIconPlus",
16
+ inheritAttrs: false,
17
+ props,
18
+ setup(props2, {
19
+ attrs
20
+ }) {
21
+ return () => {
22
+ let _slot;
23
+ return createVNode(ElIcon, attrs, _isSlot(_slot = h(props2.icon)) ? _slot : {
24
+ default: () => [_slot]
25
+ });
26
+ };
27
+ }
28
+ });
29
+
30
+ export { ElIconPlus as default };
31
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/components/elIconPlus/index.tsx"],"sourcesContent":["import { defineComponent, h } from 'vue'\nimport { ElIcon } from 'element-plus'\nimport { StarFilled } from '@element-plus/icons-vue'\n\nimport type { Component, PropType, VNode } from 'vue'\n\nconst props = {\n icon: {\n type: Object as PropType<VNode | Component>,\n default: StarFilled,\n }\n}\n\nexport default defineComponent({\n name: 'ElIconPlus',\n inheritAttrs: false,\n props,\n setup(props, { attrs }) {\n return () => (\n <ElIcon {...attrs}>{h(props.icon)}</ElIcon>\n )\n }\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","props","icon","type","default","StarFilled","defineComponent","name","inheritAttrs","setup","attrs","_slot","_createVNode","ElIcon","h"],"mappings":";;;;AAEoD,SAAAA,QAAAC,CAAA,EAAA;AAAA,EAAA,OAAA,OAAAA,CAAAA,KAAA,UAAAC,IAAAA,MAAAA,CAAAC,SAAAC,CAAAA,QAAAA,CAAAC,IAAAJ,CAAAA,CAAA,CAAAK,KAAAA,iBAAAA,IAAAA,CAAAA,OAAAA,CAAAL,CAAA,CAAA,CAAA;AAAA,CAAA;AAIpD,MAAMM,KAAQ,GAAA;AAAA,EACZC,IAAM,EAAA;AAAA,IACJC,IAAMP,EAAAA,MAAAA;AAAAA,IACNQ,OAASC,EAAAA,UAAAA;AAAAA,GACX;AACF,CAAA,CAAA;AAEA,iBAAeC,eAAgB,CAAA;AAAA,EAC7BC,IAAM,EAAA,YAAA;AAAA,EACNC,YAAc,EAAA,KAAA;AAAA,EACdP,KAAAA;AAAAA,EACAQ,MAAMR,MAAO,EAAA;AAAA,IAAES,KAAAA;AAAAA,GAAS,EAAA;AACtB,IAAA,OAAO,MAAA;AAAA,MAAAC,IAAAA,KAAAA,CAAAA;AAAA,MAAAC,OAAAA,WAAAA,CAAAC,MACOH,EAAAA,KAAAA,EAAKhB,OAAAiB,CAAAA,KAAAA,GAAGG,EAAEb,MAAMC,CAAAA,IAAI,CAAC,CAAA,GAAAS,KAAA,GAAA;AAAA,QAAAP,OAAAA,EAAAA,MAAA,CAAAO,KAAA,CAAA;AAAA,OAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAErC;AACF,CAAC,CAAA;;;;"}
@@ -0,0 +1,35 @@
1
+ import type { PropType } from 'vue';
2
+ import type { ISchema } from '@formily/json-schema';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ /**
5
+ * formTabs的结构模型
6
+ * @description 注意:ElTabPane的name就是当前ISchema['properties']的key
7
+ */
8
+ schema: {
9
+ type: PropType<ISchema["properties"]>;
10
+ default: () => {};
11
+ };
12
+ /** ElTabPane的组件的data,可以为任意类型 */
13
+ tabPaneData: {
14
+ type: (ObjectConstructor | ArrayConstructor)[];
15
+ default: any;
16
+ };
17
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
+ /**
19
+ * formTabs的结构模型
20
+ * @description 注意:ElTabPane的name就是当前ISchema['properties']的key
21
+ */
22
+ schema: {
23
+ type: PropType<ISchema["properties"]>;
24
+ default: () => {};
25
+ };
26
+ /** ElTabPane的组件的data,可以为任意类型 */
27
+ tabPaneData: {
28
+ type: (ObjectConstructor | ArrayConstructor)[];
29
+ default: any;
30
+ };
31
+ }>> & Readonly<{}>, {
32
+ schema: (string & {}) | import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
33
+ tabPaneData: Record<string, any> | unknown[];
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
35
+ export default _default;
@@ -0,0 +1,60 @@
1
+ import { defineComponent, computed, ref, createVNode, h, isVNode } from 'vue';
2
+ import { ElTabs } from 'element-plus';
3
+
4
+ function _isSlot(s) {
5
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
6
+ }
7
+ const props = {
8
+ /**
9
+ * formTabs的结构模型
10
+ * @description 注意:ElTabPane的name就是当前ISchema['properties']的key
11
+ */
12
+ schema: {
13
+ type: Object,
14
+ default: () => ({})
15
+ },
16
+ /** ElTabPane的组件的data,可以为任意类型 */
17
+ tabPaneData: {
18
+ type: [Object, Array],
19
+ default: void 0
20
+ }
21
+ };
22
+ var index = defineComponent({
23
+ name: "FormTabs",
24
+ props,
25
+ setup(props2) {
26
+ var _a, _b;
27
+ const formattedSchema = computed(() => Object.entries(props2.schema));
28
+ const activeName = ref((_b = (_a = formattedSchema.value) == null ? void 0 : _a[0]) == null ? void 0 : _b[0]);
29
+ console.log("props.schema", props2.schema);
30
+ return () => {
31
+ let _slot;
32
+ return createVNode(ElTabs, {
33
+ "style": {
34
+ width: "100%"
35
+ },
36
+ "modelValue": activeName.value
37
+ }, _isSlot(_slot = Object.entries(props2.schema).map(([_, v]) => h(v["x-decorator"], v["x-decorator-props"], h(v["x-component"], v["x-component-props"], (props2.tabPaneData || []).map((v1, index1) => {
38
+ var _a2, _b2, _c;
39
+ return h((_a2 = v.items) == null ? void 0 : _a2["x-component"], {
40
+ ...((_b2 = v.items) == null ? void 0 : _b2["x-component-props"]) || {},
41
+ name: index1
42
+ }, {
43
+ ...Object.fromEntries(Object.entries((_c = v.items) == null ? void 0 : _c["x-content"]).map(([k2, v2]) => [k2, h(v2, v1)])),
44
+ default: () => {
45
+ var _a3, _b3, _c2, _d;
46
+ return h((_b3 = (_a3 = v.items) == null ? void 0 : _a3.items) == null ? void 0 : _b3["x-component"], {
47
+ ...(_d = (_c2 = v.items) == null ? void 0 : _c2.items) == null ? void 0 : _d["x-component-props"],
48
+ data: v1
49
+ });
50
+ }
51
+ });
52
+ }))))) ? _slot : {
53
+ default: () => [_slot]
54
+ });
55
+ };
56
+ }
57
+ });
58
+
59
+ export { index as default };
60
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/components/formTabs/index.tsx"],"sourcesContent":["import { defineComponent, h, ref, computed } from 'vue'\nimport { ElTabs } from 'element-plus'\n\nimport type { PropType } from 'vue'\nimport type { ISchema } from '@formily/json-schema'\nimport type { ICommonObj } from '@mc20230601/keep-up/interfaces'\n\nconst props = {\n /** \n * formTabs的结构模型\n * @description 注意:ElTabPane的name就是当前ISchema['properties']的key\n */\n schema: {\n type: Object as PropType<ISchema['properties']>,\n default: () => ({}),\n },\n /** ElTabPane的组件的data,可以为任意类型 */\n tabPaneData: {\n type: [Object, Array],\n default: undefined,\n },\n}\n\nexport default defineComponent({\n name: 'FormTabs',\n props,\n setup(props) {\n const formattedSchema = computed(() => Object.entries(props.schema))\n const activeName = ref(formattedSchema.value?.[0]?.[0])\n // TODO: 这个抽象成一个转换方法,用来转换普通vue组件\n console.log('props.schema', props.schema)\n return () => (\n <ElTabs style={{ width: '100%' }} modelValue={activeName.value}>\n {\n Object.entries(props.schema).map(([_, v]) => (\n h(\n v['x-decorator'],\n v['x-decorator-props'],\n h(\n v['x-component'],\n v['x-component-props'],\n (props.tabPaneData || []).map((v1: ICommonObj, index1: string) => (\n h(\n v.items?.['x-component'],\n {\n ...(v.items?.['x-component-props'] || {}),\n name: index1,\n },\n {\n ...Object.fromEntries(\n Object.entries(v.items?.['x-content'])\n .map(([k2, v2]) => (\n [k2, h(v2, v1)]\n ))\n ),\n default: () => h(\n v.items?.items?.['x-component'],\n {\n ...v.items?.items?.['x-component-props'],\n data: v1,\n },\n ),\n },\n )\n ))\n ),\n )\n ))\n }\n </ElTabs>\n )\n }\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","props","schema","type","default","tabPaneData","Array","undefined","defineComponent","name","setup","formattedSchema","computed","entries","activeName","ref","value","console","log","_slot","_createVNode","ElTabs","width","map","_","v","h","v1","index1","_a","_b","items","fromEntries","k2","v2","_c","data"],"mappings":";;;AACqC,SAAAA,QAAAC,CAAA,EAAA;AAAA,EAAA,OAAA,O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T,YACbD,OAAAA,CAAAA,CAAAA,CAAAA,GAAAA,GAAAA,CAAAA,MAAAA,CAAEM,CAAAA,KAAAA,KAAFN,gBAAAA,GAASM,CAAAA,KAAAA,KAATN,IAAAA,GAAAA,KAAAA,CAAAA,GAAAA,GAAAA,CAAiB,aACjB,CAAA,EAAA;AAAA,cACE,GAAA,CAAGA,MAAAA,GAAAA,GAAAA,CAAAA,CAAEM,UAAFN,IAAAA,GAAAA,KAAAA,CAAAA,GAAAA,GAAAA,CAASM,UAATN,IAAiB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,mBAAA,CAAA;AAAA,cACpBW,IAAMT,EAAAA,EAAAA;AAAAA,aAEV,CAAA,CAAA;AAAA,WAAA;AAAA,SAEJ,CAAA,CAAA;AAAA,OACD,CACH,CACF,CACD,CAAC,IAAAR,KAAA,GAAA;AAAA,QAAAf,OAAAA,EAAAA,MAAA,CAAAe,KAAA,CAAA;AAAA,OAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAIV;AACF,CAAC,CAAA;;;;"}
@@ -0,0 +1,83 @@
1
+ import type { PropType } from 'vue';
2
+ export interface IFormTab {
3
+ activeKey: string;
4
+ setActiveKey(key: string): void;
5
+ }
6
+ export interface IFormTabProps {
7
+ formTab?: IFormTab;
8
+ }
9
+ export interface IFormTabPaneProps {
10
+ key: string | number;
11
+ }
12
+ export declare const composeFormTab: {
13
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
14
+ formTab: {
15
+ type: PropType<IFormTab>;
16
+ };
17
+ value: {
18
+ type: StringConstructor;
19
+ };
20
+ customValue: {
21
+ type: StringConstructor;
22
+ };
23
+ disabled: {
24
+ type: BooleanConstructor;
25
+ };
26
+ }>> & Readonly<{
27
+ onInput?: (...args: any[]) => any;
28
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "input"[], import("vue").PublicProps, {
29
+ disabled: boolean;
30
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
31
+ P: {};
32
+ B: {};
33
+ D: {};
34
+ C: {};
35
+ M: {};
36
+ Defaults: {};
37
+ }, Readonly<import("vue").ExtractPropTypes<{
38
+ formTab: {
39
+ type: PropType<IFormTab>;
40
+ };
41
+ value: {
42
+ type: StringConstructor;
43
+ };
44
+ customValue: {
45
+ type: StringConstructor;
46
+ };
47
+ disabled: {
48
+ type: BooleanConstructor;
49
+ };
50
+ }>> & Readonly<{
51
+ onInput?: (...args: any[]) => any;
52
+ }>, () => any, {}, {}, {}, {
53
+ disabled: boolean;
54
+ }>;
55
+ __isFragment?: never;
56
+ __isTeleport?: never;
57
+ __isSuspense?: never;
58
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
59
+ formTab: {
60
+ type: PropType<IFormTab>;
61
+ };
62
+ value: {
63
+ type: StringConstructor;
64
+ };
65
+ customValue: {
66
+ type: StringConstructor;
67
+ };
68
+ disabled: {
69
+ type: BooleanConstructor;
70
+ };
71
+ }>> & Readonly<{
72
+ onInput?: (...args: any[]) => any;
73
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "input"[], "input", {
74
+ disabled: boolean;
75
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
76
+ TabPane: import("vue").DefineComponent<IFormTabPaneProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IFormTabPaneProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
77
+ createFormTab: (defaultActiveKey?: string) => {
78
+ activeKey: string;
79
+ setActiveKey(key: string): void;
80
+ };
81
+ };
82
+ export { composeFormTab as FormTab };
83
+ export default composeFormTab;
@@ -0,0 +1,146 @@
1
+ import { defineComponent, computed, reactive } from 'vue';
2
+ import { observer } from '@formily/reactive-vue';
3
+ import { model } from '@formily/reactive';
4
+ import { useField, h, RecursionField, Fragment, useFieldSchema } from '@formily/vue';
5
+ import { ElTabs, ElTabPane, ElBadge } from 'element-plus';
6
+
7
+ const stylePrefix = "formily-element-plus";
8
+ function composeExport(s0, s1) {
9
+ return Object.assign(s0, s1);
10
+ }
11
+ const useTabs = () => {
12
+ const tabsField = useField();
13
+ const schema = useFieldSchema();
14
+ const tabs = reactive([]);
15
+ schema.value.mapProperties((schema2, name) => {
16
+ var _a, _b;
17
+ const field = tabsField.value.query(tabsField.value.address.concat(name)).take();
18
+ if ((field == null ? void 0 : field.display) === "none" || (field == null ? void 0 : field.display) === "hidden") return;
19
+ if (((_a = schema2["x-component"]) == null ? void 0 : _a.indexOf("TabPane")) > -1) {
20
+ tabs.push({
21
+ name,
22
+ props: {
23
+ name: ((_b = schema2 == null ? void 0 : schema2["x-component-props"]) == null ? void 0 : _b.name) || name,
24
+ ...schema2 == null ? void 0 : schema2["x-component-props"]
25
+ },
26
+ schema: schema2
27
+ });
28
+ }
29
+ });
30
+ return tabs;
31
+ };
32
+ const createFormTab = (defaultActiveKey) => {
33
+ const formTab = model({
34
+ activeKey: defaultActiveKey,
35
+ setActiveKey(key) {
36
+ formTab.activeKey = key;
37
+ }
38
+ });
39
+ return formTab;
40
+ };
41
+ const FormTab = observer(
42
+ defineComponent({
43
+ inheritAttrs: false,
44
+ props: {
45
+ formTab: { type: Object },
46
+ value: {
47
+ type: String
48
+ },
49
+ customValue: {
50
+ type: String
51
+ },
52
+ disabled: {
53
+ type: Boolean
54
+ }
55
+ },
56
+ emits: ["input"],
57
+ setup(props, { attrs, emit }) {
58
+ const field = useField();
59
+ const prefixCls = `${stylePrefix}-form-tab`;
60
+ const formTabRef = computed(() => {
61
+ var _a;
62
+ return (_a = props.formTab) != null ? _a : createFormTab();
63
+ });
64
+ const takeActiveKey = (tabs) => {
65
+ var _a, _b;
66
+ return (props == null ? void 0 : props.value) || (props == null ? void 0 : props.customValue) || ((_a = formTabRef.value) == null ? void 0 : _a.activeKey) || ((_b = tabs == null ? void 0 : tabs[0]) == null ? void 0 : _b.name);
67
+ };
68
+ const badgedHeader = (key, props2) => {
69
+ const errors = field.value.form.queryFeedbacks({
70
+ type: "error",
71
+ address: `${field.value.address.concat(key)}.*`
72
+ });
73
+ if (errors == null ? void 0 : errors.length) {
74
+ return h(
75
+ ElBadge,
76
+ {
77
+ class: [`${prefixCls}-errors-badge`],
78
+ value: errors == null ? void 0 : errors.length
79
+ },
80
+ { default: () => props2.label }
81
+ );
82
+ }
83
+ return props2.label;
84
+ };
85
+ const innerDisabled = props.disabled;
86
+ return () => {
87
+ const tabs = useTabs();
88
+ const activeKey = takeActiveKey(tabs);
89
+ field.value.setData({
90
+ setActiveKey: (activeKey2) => {
91
+ var _a, _b;
92
+ (_b = (_a = formTabRef.value).setActiveKey) == null ? void 0 : _b.call(_a, activeKey2);
93
+ }
94
+ });
95
+ return h(
96
+ ElTabs,
97
+ {
98
+ ...attrs,
99
+ class: [prefixCls],
100
+ modelValue: activeKey,
101
+ onTabChange: (key) => {
102
+ var _a, _b;
103
+ if (typeof key !== "string") return;
104
+ emit("input", key);
105
+ (_b = (_a = formTabRef.value).setActiveKey) == null ? void 0 : _b.call(_a, key);
106
+ }
107
+ },
108
+ {
109
+ default: () => tabs.map(({ props: props2, schema, name }, key) => {
110
+ return h(
111
+ ElTabPane,
112
+ {
113
+ key,
114
+ ...props2,
115
+ disabled: innerDisabled
116
+ },
117
+ {
118
+ default: () => h(RecursionField, { schema, name }, {}),
119
+ label: () => h(
120
+ "div",
121
+ {},
122
+ { default: () => [badgedHeader(name, props2)] }
123
+ )
124
+ }
125
+ );
126
+ })
127
+ }
128
+ );
129
+ };
130
+ }
131
+ })
132
+ );
133
+ const FormTabPane = defineComponent({
134
+ name: "FFormTabPane",
135
+ inheritAttrs: false,
136
+ setup(_props, { slots }) {
137
+ return () => h(Fragment, {}, slots);
138
+ }
139
+ });
140
+ const composeFormTab = composeExport(FormTab, {
141
+ TabPane: FormTabPane,
142
+ createFormTab
143
+ });
144
+
145
+ export { composeFormTab as FormTab, composeFormTab, composeFormTab as default };
146
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/formilyCmps/formTab/index.ts"],"sourcesContent":["import { defineComponent, reactive, computed } from 'vue'\nimport { observer } from '@formily/reactive-vue'\nimport { model } from '@formily/reactive'\nimport {\n h,\n useField,\n useFieldSchema,\n RecursionField,\n Fragment,\n} from '@formily/vue'\nimport { Schema } from '@formily/json-schema'\nimport { ElTabs, ElTabPane, ElBadge } from 'element-plus'\n\nimport type { PropType } from 'vue'\nimport type { SchemaKey } from '@formily/json-schema'\n\nconst stylePrefix = 'formily-element-plus'\nfunction composeExport<T0 extends {}, T1 extends {}>(\n s0: T0,\n s1: T1\n): T0 & T1 {\n return Object.assign(s0, s1)\n}\n\nexport interface IFormTab {\n activeKey: string\n setActiveKey(key: string): void\n}\n\nexport interface IFormTabProps {\n formTab?: IFormTab\n}\n\nexport interface IFormTabPaneProps {\n key: string | number\n}\n\ntype Tabs = { name: SchemaKey; props: any; schema: Schema }[]\n\nconst useTabs = () => {\n const tabsField = useField()\n const schema = useFieldSchema()\n const tabs: Tabs = reactive([])\n schema.value.mapProperties((schema, name) => {\n const field = tabsField.value\n .query(tabsField.value.address.concat(name))\n .take()\n if (field?.display === 'none' || field?.display === 'hidden') return\n\n if (schema['x-component']?.indexOf('TabPane') > -1) {\n tabs.push({\n name,\n props: {\n name: schema?.['x-component-props']?.name || name,\n ...schema?.['x-component-props'],\n },\n schema,\n })\n }\n })\n return tabs\n}\n\nconst createFormTab = (defaultActiveKey?: string) => {\n const formTab = model({\n activeKey: defaultActiveKey,\n setActiveKey(key: string) {\n formTab.activeKey = key\n },\n })\n return formTab\n}\n\nconst FormTab = observer(\n defineComponent({\n inheritAttrs: false,\n props: {\n formTab: { type: Object as PropType<IFormTab> },\n value: {\n type: String,\n },\n customValue: {\n type: String,\n },\n disabled: {\n type: Boolean,\n },\n },\n emits: ['input'],\n setup(props, { attrs, emit }: any) {\n const field = useField()\n const prefixCls = `${stylePrefix}-form-tab`\n const formTabRef = computed(() => props.formTab ?? createFormTab())\n const takeActiveKey = (tabs: Tabs) => {\n return props?.value || props?.customValue || formTabRef.value?.activeKey || tabs?.[0]?.name\n }\n const badgedHeader = (key: SchemaKey, props: any) => {\n const errors = field.value.form.queryFeedbacks({\n type: 'error',\n address: `${field.value.address.concat(key)}.*`,\n })\n if (errors?.length) {\n return h(\n ElBadge,\n {\n class: [`${prefixCls}-errors-badge`],\n value: errors?.length,\n },\n { default: () => props.label }\n )\n }\n return props.label\n }\n const innerDisabled = props.disabled\n return () => {\n const tabs = useTabs()\n const activeKey = takeActiveKey(tabs)\n field.value.setData({\n setActiveKey: (activeKey: string) => {\n formTabRef.value.setActiveKey?.(activeKey)\n },\n })\n return h(\n ElTabs,\n {\n ...attrs,\n class: [prefixCls],\n modelValue: activeKey,\n onTabChange: (key: string) => {\n if (typeof key !== 'string') return\n\n emit('input', key)\n formTabRef.value.setActiveKey?.(key)\n },\n },\n {\n default: () =>\n tabs.map(({ props, schema, name }, key) => {\n return h(\n ElTabPane,\n {\n key,\n ...props,\n disabled: innerDisabled,\n },\n {\n default: () => h(RecursionField, { schema, name }, {}),\n label: () =>\n h(\n 'div',\n {},\n { default: () => [badgedHeader(name, props)] }\n ),\n }\n )\n }),\n }\n )\n }\n },\n })\n)\n\nconst FormTabPane = defineComponent<IFormTabPaneProps>({\n name: 'FFormTabPane',\n inheritAttrs: false,\n setup(_props, { slots }) {\n return () => h(Fragment, {}, slots)\n },\n})\n\nexport const composeFormTab = composeExport(FormTab, {\n TabPane: FormTabPane,\n createFormTab,\n})\n\nexport { composeFormTab as FormTab }\nexport default composeFormTab"],"names":["schema","props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GA,MAAAA;AAAA,kBACH,QAAU,EAAA,aAAA;AAAA,iBACZ;AAAA,gBACA;AAAA,kBACE,OAAA,EAAS,MAAM,CAAE,CAAA,cAAA,EAAgB,EAAE,MAAQ,EAAA,IAAA,EAAQ,EAAA,EAAE,CAAA;AAAA,kBACrD,OAAO,MACL,CAAA;AAAA,oBACE,KAAA;AAAA,oBACA,EAAC;AAAA,oBACD,EAAE,SAAS,MAAM,CAAC,aAAa,IAAMA,EAAAA,MAAK,CAAC,CAAE,EAAA;AAAA,mBAC/C;AAAA,iBACJ;AAAA,eACF,CAAA;AAAA,aACD,CAAA;AAAA,WACL;AAAA,SACF,CAAA;AAAA,OACF,CAAA;AAAA,KACF;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AAEA,MAAM,cAAc,eAAmC,CAAA;AAAA,EACrD,IAAM,EAAA,cAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAAA,EACd,KAAM,CAAA,MAAA,EAAQ,EAAE,KAAA,EAAS,EAAA;AACvB,IAAA,OAAO,MAAM,CAAA,CAAE,QAAU,EAAA,IAAI,KAAK,CAAA,CAAA;AAAA,GACpC;AACF,CAAC,CAAA,CAAA;AAEY,MAAA,cAAA,GAAiB,cAAc,OAAS,EAAA;AAAA,EACnD,OAAS,EAAA,WAAA;AAAA,EACT,aAAA;AACF,CAAC;;;;"}
@@ -0,0 +1,39 @@
1
+ import { onFormReact, onFieldInit, onFieldReact, onFieldChange } from '@formily/core';
2
+ /** formEffectsMap */
3
+ export declare const formEffectsMap: {
4
+ readonly onFormInit: (callback: (form: import("@formily/core").Form) => void) => void;
5
+ readonly onFormMount: (callback: (form: import("@formily/core").Form) => void) => void;
6
+ readonly onFormUnmount: (callback: (form: import("@formily/core").Form) => void) => void;
7
+ readonly onFormReact: typeof onFormReact;
8
+ readonly onFormValuesChange: (callback: (form: import("@formily/core").Form) => void) => void;
9
+ readonly onFormInitialValuesChange: (callback: (form: import("@formily/core").Form) => void) => void;
10
+ readonly onFormInputChange: (callback: (form: import("@formily/core").Form) => void) => void;
11
+ readonly onFormSubmit: (callback: (form: import("@formily/core").Form) => void) => void;
12
+ readonly onFormSubmitStart: (callback: (form: import("@formily/core").Form) => void) => void;
13
+ readonly onFormSubmitEnd: (callback: (form: import("@formily/core").Form) => void) => void;
14
+ readonly onFormSubmitFailed: (callback: (form: import("@formily/core").Form) => void) => void;
15
+ readonly onFormSubmitSuccess: (callback: (form: import("@formily/core").Form) => void) => void;
16
+ readonly onFormSubmitValidateStart: (callback: (form: import("@formily/core").Form) => void) => void;
17
+ readonly onFormSubmitValidateEnd: (callback: (form: import("@formily/core").Form) => void) => void;
18
+ readonly onFormSubmitValidateFailed: (callback: (form: import("@formily/core").Form) => void) => void;
19
+ readonly onFormSubmitValidateSuccess: (callback: (form: import("@formily/core").Form) => void) => void;
20
+ readonly onFormValidateStart: (callback: (form: import("@formily/core").Form) => void) => void;
21
+ readonly onFormValidateEnd: (callback: (form: import("@formily/core").Form) => void) => void;
22
+ readonly onFormValidateFailed: (callback: (form: import("@formily/core").Form) => void) => void;
23
+ readonly onFormValidateSuccess: (callback: (form: import("@formily/core").Form) => void) => void;
24
+ };
25
+ /** fieldEffectsMap */
26
+ export declare const fieldEffectsMap: {
27
+ readonly onFieldInit: typeof onFieldInit;
28
+ readonly onFieldMount: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").GeneralField, form: import("@formily/core").Form) => void) => void;
29
+ readonly onFieldUnmount: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").GeneralField, form: import("@formily/core").Form) => void) => void;
30
+ readonly onFieldReact: typeof onFieldReact;
31
+ readonly onFieldChange: typeof onFieldChange;
32
+ readonly onFieldValueChange: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
33
+ readonly onFieldInitialValueChange: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
34
+ readonly onFieldInputValueChange: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
35
+ readonly onFieldValidateStart: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
36
+ readonly onFieldValidateEnd: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
37
+ readonly onFieldValidateFailed: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
38
+ readonly onFieldValidateSuccess: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
39
+ };