orion-design 0.1.31 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/hooks/use-throne-context.d.ts +5 -0
  3. package/dist/Throne/hooks/use-throne-context.js +15 -0
  4. package/dist/Throne/hooks/use-throne-context.js.map +1 -0
  5. package/dist/Throne/index.d.ts +1 -1
  6. package/dist/Throne/index.js +14 -30
  7. package/dist/Throne/index.js.map +1 -1
  8. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +2 -0
  9. package/dist/components/Button/index.js +36 -41
  10. package/dist/components/Button/index.js.map +1 -1
  11. package/dist/components/Flex/index.js +89 -122
  12. package/dist/components/Flex/index.js.map +1 -1
  13. package/dist/components/Form/FileInput/FileInput.vue.d.ts +4 -4
  14. package/dist/components/Form/Form.js +2 -2
  15. package/dist/components/Form/Form.js.map +1 -1
  16. package/dist/components/Form/LovInput/LovInput.js +2 -2
  17. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  18. package/dist/components/Form/LovInput/LovInput.vue.d.ts +894 -0
  19. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  20. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  21. package/dist/components/Form/LovInput/index.js +4 -4
  22. package/dist/components/Form/MultiTableSelect/MultiTableSelect.d.ts +26 -0
  23. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js +5 -0
  24. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js.map +1 -0
  25. package/dist/components/Form/MultiTableSelect/MultiTableSelect.vue.d.ts +6249 -0
  26. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.d.ts +1 -0
  27. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js +9 -0
  28. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js.map +1 -0
  29. package/dist/components/Form/MultiTableSelect/index.d.ts +2 -0
  30. package/dist/components/Form/MultiTableSelect/index.js +7 -0
  31. package/dist/components/Form/MultiTableSelect/index.js.map +1 -0
  32. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  33. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  34. package/dist/components/Form/hooks/index.js +69 -127
  35. package/dist/components/Form/hooks/index.js.map +1 -1
  36. package/dist/components/Form/index.d.ts +3 -0
  37. package/dist/components/Form/index.js +790 -829
  38. package/dist/components/Form/index.js.map +1 -1
  39. package/dist/components/Form/utils/index.js +18 -30
  40. package/dist/components/Form/utils/index.js.map +1 -1
  41. package/dist/components/LovTable/LovPagetable.vue.d.ts +510 -6
  42. package/dist/components/LovTable/LovQuerytable.vue.d.ts +468 -4
  43. package/dist/components/LovTable/index.d.ts +489 -5
  44. package/dist/components/LovTable/index.js +104 -179
  45. package/dist/components/LovTable/index.js.map +1 -1
  46. package/dist/components/Modal/index.js +56 -111
  47. package/dist/components/Modal/index.js.map +1 -1
  48. package/dist/components/Modal/types.d.ts +1 -1
  49. package/dist/components/Modal/types.js +3 -4
  50. package/dist/components/Modal/types.js.map +1 -1
  51. package/dist/components/Modal/useModal.js +5 -5
  52. package/dist/components/Modal/useModal.js.map +1 -1
  53. package/dist/components/MultiTableSelectPagetable/MultiTableSelectPagetable.vue.d.ts +880 -0
  54. package/dist/components/MultiTableSelectPagetable/index.d.ts +462 -0
  55. package/dist/components/MultiTableSelectPagetable/index.js +164 -0
  56. package/dist/components/MultiTableSelectPagetable/index.js.map +1 -0
  57. package/dist/components/Pagetable/Pagetable.d.ts +96 -3
  58. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +14 -1
  59. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +14 -1
  60. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +1 -1
  61. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +14 -1
  62. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +14 -1
  63. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +14 -1
  64. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +14 -1
  65. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +14 -1
  66. package/dist/components/Pagetable/hooks/useCode.d.ts +2 -0
  67. package/dist/components/Pagetable/hooks/useCode.js +24 -0
  68. package/dist/components/Pagetable/hooks/useCode.js.map +1 -0
  69. package/dist/components/Pagetable/hooks/useColumns.js +85 -88
  70. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  71. package/dist/components/Pagetable/index.d.ts +159 -2
  72. package/dist/components/Pagetable/index.js +601 -684
  73. package/dist/components/Pagetable/index.js.map +1 -1
  74. package/dist/components/Pagetable/utils/index.js +54 -92
  75. package/dist/components/Pagetable/utils/index.js.map +1 -1
  76. package/dist/components/Querytable/Querytable.d.ts +80 -2
  77. package/dist/components/Querytable/columns/QuerytableColumnButtongroup.d.ts +14 -1
  78. package/dist/components/Querytable/columns/QuerytableColumnDate.d.ts +14 -1
  79. package/dist/components/Querytable/columns/QuerytableColumnDiy.d.ts +1 -1
  80. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +14 -1
  81. package/dist/components/Querytable/columns/QuerytableColumnMultiselect.d.ts +14 -1
  82. package/dist/components/Querytable/columns/QuerytableColumnNumber.d.ts +14 -1
  83. package/dist/components/Querytable/columns/QuerytableColumnSingleselect.d.ts +14 -1
  84. package/dist/components/Querytable/columns/QuerytableColumnString.d.ts +14 -1
  85. package/dist/components/Querytable/hooks/useColumns.js +79 -82
  86. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  87. package/dist/components/Querytable/index.d.ts +147 -1
  88. package/dist/components/Querytable/index.js +526 -579
  89. package/dist/components/Querytable/index.js.map +1 -1
  90. package/dist/components/Querytable/utils/index.js +54 -92
  91. package/dist/components/Querytable/utils/index.js.map +1 -1
  92. package/dist/components/RichTextEditor/index.js +74 -100
  93. package/dist/components/RichTextEditor/index.js.map +1 -1
  94. package/dist/components/Tabs/constants.js +2 -2
  95. package/dist/components/Tabs/constants.js.map +1 -1
  96. package/dist/components/Tabs/index.js +358 -603
  97. package/dist/components/Tabs/index.js.map +1 -1
  98. package/dist/components/Tabs/tab-bar.js +6 -6
  99. package/dist/components/Tabs/tab-bar.js.map +1 -1
  100. package/dist/components/Tabs/tab-pane.js +3 -3
  101. package/dist/components/Tabs/tab-pane.js.map +1 -1
  102. package/dist/components/Throne/ThroneContextProvider.d.ts +25 -0
  103. package/dist/components/_constants/aria.js +2 -2
  104. package/dist/components/_constants/aria.js.map +1 -1
  105. package/dist/components/_constants/event.js +4 -6
  106. package/dist/components/_constants/event.js.map +1 -1
  107. package/dist/components/_constants/index.js +6 -6
  108. package/dist/components/_hooks/index.js +7 -7
  109. package/dist/components/_hooks/use-namespace/index.js +39 -74
  110. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  111. package/dist/components/_hooks/use-ordered-children/index.js +19 -29
  112. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  113. package/dist/components/_util/arrays.js +5 -9
  114. package/dist/components/_util/arrays.js.map +1 -1
  115. package/dist/components/_util/browser.js +6 -6
  116. package/dist/components/_util/browser.js.map +1 -1
  117. package/dist/components/_util/classNames.js +17 -22
  118. package/dist/components/_util/classNames.js.map +1 -1
  119. package/dist/components/_util/dom/aria.js +39 -74
  120. package/dist/components/_util/dom/aria.js.map +1 -1
  121. package/dist/components/_util/dom/element.js +8 -9
  122. package/dist/components/_util/dom/element.js.map +1 -1
  123. package/dist/components/_util/dom/event.js +7 -14
  124. package/dist/components/_util/dom/event.js.map +1 -1
  125. package/dist/components/_util/dom/index.js +36 -36
  126. package/dist/components/_util/dom/position.js +25 -49
  127. package/dist/components/_util/dom/position.js.map +1 -1
  128. package/dist/components/_util/dom/scroll.js +61 -103
  129. package/dist/components/_util/dom/scroll.js.map +1 -1
  130. package/dist/components/_util/dom/style.js +50 -65
  131. package/dist/components/_util/dom/style.js.map +1 -1
  132. package/dist/components/_util/easings.js +4 -8
  133. package/dist/components/_util/easings.js.map +1 -1
  134. package/dist/components/_util/error.js +11 -12
  135. package/dist/components/_util/error.js.map +1 -1
  136. package/dist/components/_util/functions.js +3 -3
  137. package/dist/components/_util/i18n.js +2 -2
  138. package/dist/components/_util/i18n.js.map +1 -1
  139. package/dist/components/_util/index.js +137 -137
  140. package/dist/components/_util/isValid.js +2 -4
  141. package/dist/components/_util/isValid.js.map +1 -1
  142. package/dist/components/_util/objects.js +14 -18
  143. package/dist/components/_util/objects.js.map +1 -1
  144. package/dist/components/_util/props-util/index.js +20 -46
  145. package/dist/components/_util/props-util/index.js.map +1 -1
  146. package/dist/components/_util/props-util/initDefaultProps.js +10 -18
  147. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  148. package/dist/components/_util/raf.js +4 -5
  149. package/dist/components/_util/raf.js.map +1 -1
  150. package/dist/components/_util/rand.js +3 -4
  151. package/dist/components/_util/rand.js.map +1 -1
  152. package/dist/components/_util/strings.js +8 -9
  153. package/dist/components/_util/strings.js.map +1 -1
  154. package/dist/components/_util/throttleByRaf.js +10 -16
  155. package/dist/components/_util/throttleByRaf.js.map +1 -1
  156. package/dist/components/_util/type.js +38 -41
  157. package/dist/components/_util/type.js.map +1 -1
  158. package/dist/components/_util/types.js +22 -41
  159. package/dist/components/_util/types.js.map +1 -1
  160. package/dist/components/_util/typescript.js +2 -2
  161. package/dist/components/_util/typescript.js.map +1 -1
  162. package/dist/components/_util/util.js +43 -85
  163. package/dist/components/_util/util.js.map +1 -1
  164. package/dist/components/_util/vue/global-node.js +15 -27
  165. package/dist/components/_util/vue/global-node.js.map +1 -1
  166. package/dist/components/_util/vue/icon.js +25 -29
  167. package/dist/components/_util/vue/icon.js.map +1 -1
  168. package/dist/components/_util/vue/index.js +41 -41
  169. package/dist/components/_util/vue/install.js +18 -35
  170. package/dist/components/_util/vue/install.js.map +1 -1
  171. package/dist/components/_util/vue/props/index.js +6 -6
  172. package/dist/components/_util/vue/props/runtime.js +30 -46
  173. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  174. package/dist/components/_util/vue/refs.js +6 -12
  175. package/dist/components/_util/vue/refs.js.map +1 -1
  176. package/dist/components/_util/vue/size.js +3 -5
  177. package/dist/components/_util/vue/size.js.map +1 -1
  178. package/dist/components/_util/vue/validator.js +4 -5
  179. package/dist/components/_util/vue/validator.js.map +1 -1
  180. package/dist/components/_util/vue/vnode.js +54 -100
  181. package/dist/components/_util/vue/vnode.js.map +1 -1
  182. package/dist/components/_util/vue-types/index.js +220 -231
  183. package/dist/components/_util/vue-types/index.js.map +1 -1
  184. package/dist/components/components.d.ts +2 -0
  185. package/dist/components/components.js +24 -20
  186. package/dist/components/components.js.map +1 -1
  187. package/dist/components/index.js +43 -38
  188. package/dist/components/index.js.map +1 -1
  189. package/dist/components-DP9bnDLm.js +48 -0
  190. package/dist/components-DP9bnDLm.js.map +1 -0
  191. package/dist/error/OrionError.js +4 -8
  192. package/dist/error/OrionError.js.map +1 -1
  193. package/dist/{index-C6P_0wAy.js → index-ChkLOmNK.js} +76 -46
  194. package/dist/{index-C6P_0wAy.js.map → index-ChkLOmNK.js.map} +1 -1
  195. package/dist/index.css +1 -797
  196. package/dist/index.d.ts +1 -0
  197. package/dist/index.js +46 -36
  198. package/dist/index.js.map +1 -1
  199. package/dist/print/LodopFuncs.js +43 -101
  200. package/dist/print/LodopFuncs.js.map +1 -1
  201. package/dist/print/index.js +108 -200
  202. package/dist/print/index.js.map +1 -1
  203. package/dist/request/ErrorHandlerChain.js +14 -17
  204. package/dist/request/ErrorHandlerChain.js.map +1 -1
  205. package/dist/request/RequestFilterChain.js +13 -16
  206. package/dist/request/RequestFilterChain.js.map +1 -1
  207. package/dist/request/ResponseParserChain.js +14 -17
  208. package/dist/request/ResponseParserChain.js.map +1 -1
  209. package/dist/request/disivion/DateSerializer.js +22 -47
  210. package/dist/request/disivion/DateSerializer.js.map +1 -1
  211. package/dist/request/disivion/DivisionErrorHandler.js +25 -40
  212. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  213. package/dist/request/disivion/DivisionResponseParser.js +10 -16
  214. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  215. package/dist/request/disivion/index.js +201 -305
  216. package/dist/request/disivion/index.js.map +1 -1
  217. package/dist/request/error/BizExceptionResponseError.js +5 -11
  218. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  219. package/dist/request/error/ExceptionResponseError.js +5 -11
  220. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  221. package/dist/request/error/ResponseError.js +4 -9
  222. package/dist/request/error/ResponseError.js.map +1 -1
  223. package/dist/request/error/SessionExceptionResponseError.js +5 -11
  224. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  225. package/dist/request/index.js +11 -11
  226. package/dist/utils/DateUtil.js +33 -48
  227. package/dist/utils/DateUtil.js.map +1 -1
  228. package/dist/utils/NumberUtil.js +6 -6
  229. package/dist/utils/NumberUtil.js.map +1 -1
  230. package/dist/utils/cloneDeep.js +2 -2
  231. package/dist/utils/delay.js +3 -3
  232. package/dist/utils/delay.js.map +1 -1
  233. package/dist/utils/functions.js +3 -3
  234. package/dist/utils/index.js +12 -12
  235. package/dist/utils/md5.js +93 -191
  236. package/dist/utils/md5.js.map +1 -1
  237. package/dist/utils/uuid.js +25 -35
  238. package/dist/utils/uuid.js.map +1 -1
  239. package/dist/version/index.js +2 -2
  240. package/dist/version/version.d.ts +1 -1
  241. package/dist/version/version.js +2 -2
  242. package/dist/version/version.js.map +1 -1
  243. package/package.json +1 -1
  244. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
  245. package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
  246. package/dist/components-8oZ2kpUC.js +0 -27
  247. package/dist/components-8oZ2kpUC.js.map +0 -1
  248. package/dist/components-B3d9m_tn.js +0 -27
  249. package/dist/components-B3d9m_tn.js.map +0 -1
  250. package/dist/functions-BeMkokbY.js +0 -63
  251. package/dist/functions-BeMkokbY.js.map +0 -1
  252. package/dist/index-BOKLZnqH.js +0 -54
  253. package/dist/index-BOKLZnqH.js.map +0 -1
  254. package/dist/index-D1m0KTpK.js +0 -69
  255. package/dist/index-D1m0KTpK.js.map +0 -1
  256. package/dist/index-DR5ZP7mD.js +0 -160
  257. package/dist/index-DR5ZP7mD.js.map +0 -1
  258. package/dist/index-DkwIULcN.js +0 -200
  259. package/dist/index-DkwIULcN.js.map +0 -1
@@ -10,6 +10,10 @@ export declare const querytableColumnButtongroupProps: () => {
10
10
  type: PropType<"center" | "left" | "right">;
11
11
  default: "center" | "left" | "right";
12
12
  };
13
+ bodyAlign: {
14
+ type: PropType<"center" | "left" | "right">;
15
+ default: "center" | "left" | "right";
16
+ };
13
17
  name: {
14
18
  type: PropType<string>;
15
19
  default: string;
@@ -33,6 +37,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
33
37
  type: PropType<"center" | "left" | "right">;
34
38
  default: "center" | "left" | "right";
35
39
  };
40
+ bodyAlign: {
41
+ type: PropType<"center" | "left" | "right">;
42
+ default: "center" | "left" | "right";
43
+ };
36
44
  name: {
37
45
  type: PropType<string>;
38
46
  default: string;
@@ -54,6 +62,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
54
62
  type: PropType<"center" | "left" | "right">;
55
63
  default: "center" | "left" | "right";
56
64
  };
65
+ bodyAlign: {
66
+ type: PropType<"center" | "left" | "right">;
67
+ default: "center" | "left" | "right";
68
+ };
57
69
  name: {
58
70
  type: PropType<string>;
59
71
  default: string;
@@ -67,10 +79,11 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
67
79
  default: FixedType;
68
80
  };
69
81
  }>> & Readonly<{}>, {
82
+ name: string;
70
83
  fixed: FixedType;
71
84
  head: string;
72
85
  width: string | boolean;
73
- name: string;
86
+ bodyAlign: "center" | "left" | "right";
74
87
  headAlign: "center" | "left" | "right";
75
88
  }, CustomSlotsType<{
76
89
  default: any;
@@ -9,6 +9,10 @@ export declare const querytableColumnDateProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -40,6 +44,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
40
44
  type: PropType<"center" | "left" | "right">;
41
45
  default: "center" | "left" | "right";
42
46
  };
47
+ bodyAlign: {
48
+ type: PropType<"center" | "left" | "right">;
49
+ default: "center" | "left" | "right";
50
+ };
43
51
  name: {
44
52
  type: PropType<string>;
45
53
  default: string;
@@ -69,6 +77,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
69
77
  type: PropType<"center" | "left" | "right">;
70
78
  default: "center" | "left" | "right";
71
79
  };
80
+ bodyAlign: {
81
+ type: PropType<"center" | "left" | "right">;
82
+ default: "center" | "left" | "right";
83
+ };
72
84
  name: {
73
85
  type: PropType<string>;
74
86
  default: string;
@@ -90,11 +102,12 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
90
102
  default: string;
91
103
  };
92
104
  }>> & Readonly<{}>, {
105
+ name: string;
93
106
  fixed: FixedType;
94
107
  head: string;
95
108
  width: string | boolean;
96
- name: string;
97
109
  format: string;
110
+ bodyAlign: "center" | "left" | "right";
98
111
  headAlign: "center" | "left" | "right";
99
112
  sourceFormat: string;
100
113
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -67,10 +67,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
67
67
  default: FixedType;
68
68
  };
69
69
  }>> & Readonly<{}>, {
70
+ name: string;
70
71
  fixed: FixedType;
71
72
  head: string;
72
73
  width: string | boolean;
73
- name: string;
74
74
  headAlign: "center" | "left" | "right";
75
75
  }, CustomSlotsType<{
76
76
  default: any;
@@ -9,6 +9,10 @@ export declare const querytableColumnLinkProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -32,6 +36,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
32
36
  type: PropType<"center" | "left" | "right">;
33
37
  default: "center" | "left" | "right";
34
38
  };
39
+ bodyAlign: {
40
+ type: PropType<"center" | "left" | "right">;
41
+ default: "center" | "left" | "right";
42
+ };
35
43
  name: {
36
44
  type: PropType<string>;
37
45
  default: string;
@@ -53,6 +61,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
53
61
  type: PropType<"center" | "left" | "right">;
54
62
  default: "center" | "left" | "right";
55
63
  };
64
+ bodyAlign: {
65
+ type: PropType<"center" | "left" | "right">;
66
+ default: "center" | "left" | "right";
67
+ };
56
68
  name: {
57
69
  type: PropType<string>;
58
70
  default: string;
@@ -66,10 +78,11 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
66
78
  default: FixedType;
67
79
  };
68
80
  }>> & Readonly<{}>, {
81
+ name: string;
69
82
  fixed: FixedType;
70
83
  head: string;
71
84
  width: string | boolean;
72
- name: string;
85
+ bodyAlign: "center" | "left" | "right";
73
86
  headAlign: "center" | "left" | "right";
74
87
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
75
88
  export default _default;
@@ -9,6 +9,10 @@ export declare const querytableColumnMultiselectProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -42,6 +46,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
42
46
  type: PropType<"center" | "left" | "right">;
43
47
  default: "center" | "left" | "right";
44
48
  };
49
+ bodyAlign: {
50
+ type: PropType<"center" | "left" | "right">;
51
+ default: "center" | "left" | "right";
52
+ };
45
53
  name: {
46
54
  type: PropType<string>;
47
55
  default: string;
@@ -73,6 +81,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
73
81
  type: PropType<"center" | "left" | "right">;
74
82
  default: "center" | "left" | "right";
75
83
  };
84
+ bodyAlign: {
85
+ type: PropType<"center" | "left" | "right">;
86
+ default: "center" | "left" | "right";
87
+ };
76
88
  name: {
77
89
  type: PropType<string>;
78
90
  default: string;
@@ -96,6 +108,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
96
108
  }[];
97
109
  };
98
110
  }>> & Readonly<{}>, {
111
+ name: string;
99
112
  fixed: FixedType;
100
113
  code: string | {
101
114
  value: string;
@@ -103,7 +116,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
103
116
  }[];
104
117
  head: string;
105
118
  width: string | boolean;
106
- name: string;
119
+ bodyAlign: "center" | "left" | "right";
107
120
  headAlign: "center" | "left" | "right";
108
121
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
109
122
  export default _default;
@@ -9,6 +9,10 @@ export declare const querytableColumnNumberProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -44,6 +48,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
44
48
  type: PropType<"center" | "left" | "right">;
45
49
  default: "center" | "left" | "right";
46
50
  };
51
+ bodyAlign: {
52
+ type: PropType<"center" | "left" | "right">;
53
+ default: "center" | "left" | "right";
54
+ };
47
55
  name: {
48
56
  type: PropType<string>;
49
57
  default: string;
@@ -77,6 +85,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
77
85
  type: PropType<"center" | "left" | "right">;
78
86
  default: "center" | "left" | "right";
79
87
  };
88
+ bodyAlign: {
89
+ type: PropType<"center" | "left" | "right">;
90
+ default: "center" | "left" | "right";
91
+ };
80
92
  name: {
81
93
  type: PropType<string>;
82
94
  default: string;
@@ -102,10 +114,11 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
102
114
  default: boolean;
103
115
  };
104
116
  }>> & Readonly<{}>, {
117
+ name: string;
105
118
  fixed: FixedType;
106
119
  head: string;
107
120
  width: string | boolean;
108
- name: string;
121
+ bodyAlign: "center" | "left" | "right";
109
122
  thousandsSeparator: boolean;
110
123
  headAlign: "center" | "left" | "right";
111
124
  precision: -1;
@@ -9,6 +9,10 @@ export declare const querytableColumnSingleselectProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -42,6 +46,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
42
46
  type: PropType<"center" | "left" | "right">;
43
47
  default: "center" | "left" | "right";
44
48
  };
49
+ bodyAlign: {
50
+ type: PropType<"center" | "left" | "right">;
51
+ default: "center" | "left" | "right";
52
+ };
45
53
  name: {
46
54
  type: PropType<string>;
47
55
  default: string;
@@ -73,6 +81,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
73
81
  type: PropType<"center" | "left" | "right">;
74
82
  default: "center" | "left" | "right";
75
83
  };
84
+ bodyAlign: {
85
+ type: PropType<"center" | "left" | "right">;
86
+ default: "center" | "left" | "right";
87
+ };
76
88
  name: {
77
89
  type: PropType<string>;
78
90
  default: string;
@@ -96,6 +108,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
96
108
  }[];
97
109
  };
98
110
  }>> & Readonly<{}>, {
111
+ name: string;
99
112
  fixed: FixedType;
100
113
  code: string | {
101
114
  value: string;
@@ -103,7 +116,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
103
116
  }[];
104
117
  head: string;
105
118
  width: string | boolean;
106
- name: string;
119
+ bodyAlign: "center" | "left" | "right";
107
120
  headAlign: "center" | "left" | "right";
108
121
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
109
122
  export default _default;
@@ -9,6 +9,10 @@ export declare const querytableColumnStringProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -32,6 +36,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
32
36
  type: PropType<"center" | "left" | "right">;
33
37
  default: "center" | "left" | "right";
34
38
  };
39
+ bodyAlign: {
40
+ type: PropType<"center" | "left" | "right">;
41
+ default: "center" | "left" | "right";
42
+ };
35
43
  name: {
36
44
  type: PropType<string>;
37
45
  default: string;
@@ -53,6 +61,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
53
61
  type: PropType<"center" | "left" | "right">;
54
62
  default: "center" | "left" | "right";
55
63
  };
64
+ bodyAlign: {
65
+ type: PropType<"center" | "left" | "right">;
66
+ default: "center" | "left" | "right";
67
+ };
56
68
  name: {
57
69
  type: PropType<string>;
58
70
  default: string;
@@ -66,10 +78,11 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
66
78
  default: FixedType;
67
79
  };
68
80
  }>> & Readonly<{}>, {
81
+ name: string;
69
82
  fixed: FixedType;
70
83
  head: string;
71
84
  width: string | boolean;
72
- name: string;
85
+ bodyAlign: "center" | "left" | "right";
73
86
  headAlign: "center" | "left" | "right";
74
87
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
75
88
  export default _default;
@@ -1,105 +1,102 @@
1
- import { computed } from "vue";
2
- import OrionError from "../../../error/OrionError.js";
3
- import { camelize } from "../../_util/util.js";
4
- import { filterEmpty } from "../../_util/props-util/index.js";
5
- function genColumns(children) {
6
- const tableColumns = children == null ? void 0 : children.map((c) => {
7
- var _a, _b;
8
- const props = { ...c.props || {} };
9
- for (const [k, v] of Object.entries(props)) {
10
- delete props[k];
11
- props[camelize(k)] = v;
12
- }
13
- if (c.type.name === "OQuerytableColumnIndex") {
1
+ import { computed as h } from "vue";
2
+ import f from "../../../error/OrionError.js";
3
+ import { camelize as g } from "../../_util/util.js";
4
+ import { filterEmpty as l } from "../../_util/props-util/index.js";
5
+ function m(t) {
6
+ return t == null ? void 0 : t.map((n) => {
7
+ var a, i;
8
+ const e = { ...n.props || {} };
9
+ for (const [d, y] of Object.entries(e))
10
+ delete e[d], e[g(d)] = y;
11
+ if (n.type.name === "OQuerytableColumnIndex")
14
12
  return {
15
- type: c.type.name
13
+ type: n.type.name
16
14
  };
17
- } else if (c.type.name === "OQuerytableColumnString" || c.type.name === "OQuerytableColumnLink") {
15
+ if (n.type.name === "OQuerytableColumnString" || n.type.name === "OQuerytableColumnLink")
18
16
  return {
19
- type: c.type.name,
20
- head: props == null ? void 0 : props.head,
21
- headAlign: props == null ? void 0 : props.headAlign,
22
- name: props == null ? void 0 : props.name,
23
- width: props == null ? void 0 : props.width,
24
- fixed: props == null ? void 0 : props.fixed
17
+ type: n.type.name,
18
+ head: e == null ? void 0 : e.head,
19
+ headAlign: e == null ? void 0 : e.headAlign,
20
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
21
+ name: e == null ? void 0 : e.name,
22
+ width: e == null ? void 0 : e.width,
23
+ fixed: e == null ? void 0 : e.fixed
25
24
  };
26
- } else if (c.type.name === "OQuerytableColumnNumber") {
25
+ if (n.type.name === "OQuerytableColumnNumber")
27
26
  return {
28
- type: c.type.name,
29
- head: props == null ? void 0 : props.head,
30
- headAlign: props == null ? void 0 : props.headAlign,
31
- name: props == null ? void 0 : props.name,
32
- width: props == null ? void 0 : props.width,
33
- fixed: props == null ? void 0 : props.fixed,
34
- thousandsSeparator: props == null ? void 0 : props.thousandsSeparator,
35
- precision: Number(props == null ? void 0 : props.precision),
36
- percentage: props == null ? void 0 : props.percentage
27
+ type: n.type.name,
28
+ head: e == null ? void 0 : e.head,
29
+ headAlign: e == null ? void 0 : e.headAlign,
30
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
31
+ name: e == null ? void 0 : e.name,
32
+ width: e == null ? void 0 : e.width,
33
+ fixed: e == null ? void 0 : e.fixed,
34
+ thousandsSeparator: e == null ? void 0 : e.thousandsSeparator,
35
+ precision: Number(e == null ? void 0 : e.precision),
36
+ percentage: e == null ? void 0 : e.percentage
37
37
  };
38
- } else if (c.type.name === "OQuerytableColumnDate") {
38
+ if (n.type.name === "OQuerytableColumnDate")
39
39
  return {
40
- type: c.type.name,
41
- head: props == null ? void 0 : props.head,
42
- headAlign: props == null ? void 0 : props.headAlign,
43
- name: props == null ? void 0 : props.name,
44
- width: props == null ? void 0 : props.width,
45
- fixed: props == null ? void 0 : props.fixed,
46
- format: props == null ? void 0 : props.format,
47
- sourceFormat: props == null ? void 0 : props.sourceFormat
40
+ type: n.type.name,
41
+ head: e == null ? void 0 : e.head,
42
+ headAlign: e == null ? void 0 : e.headAlign,
43
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
44
+ name: e == null ? void 0 : e.name,
45
+ width: e == null ? void 0 : e.width,
46
+ fixed: e == null ? void 0 : e.fixed,
47
+ format: e == null ? void 0 : e.format,
48
+ sourceFormat: e == null ? void 0 : e.sourceFormat
48
49
  };
49
- } else if (c.type.name === "OQuerytableColumnSingleselect" || c.type.name === "OQuerytableColumnMultiselect") {
50
+ if (n.type.name === "OQuerytableColumnSingleselect" || n.type.name === "OQuerytableColumnMultiselect")
50
51
  return {
51
- type: c.type.name,
52
- head: props == null ? void 0 : props.head,
53
- headAlign: props == null ? void 0 : props.headAlign,
54
- name: props == null ? void 0 : props.name,
55
- width: props == null ? void 0 : props.width,
56
- fixed: props == null ? void 0 : props.fixed,
57
- code: props == null ? void 0 : props.code
52
+ type: n.type.name,
53
+ head: e == null ? void 0 : e.head,
54
+ headAlign: e == null ? void 0 : e.headAlign,
55
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
56
+ name: e == null ? void 0 : e.name,
57
+ width: e == null ? void 0 : e.width,
58
+ fixed: e == null ? void 0 : e.fixed,
59
+ code: e == null ? void 0 : e.code
58
60
  };
59
- } else if (c.type.name === "OQuerytableColumnButtongroup") {
61
+ if (n.type.name === "OQuerytableColumnButtongroup")
60
62
  return {
61
- type: c.type.name,
62
- head: props == null ? void 0 : props.head,
63
- headAlign: props == null ? void 0 : props.headAlign,
64
- name: props == null ? void 0 : props.name,
65
- width: props == null ? void 0 : props.width,
66
- fixed: props == null ? void 0 : props.fixed,
67
- children: c.children
63
+ type: n.type.name,
64
+ head: e == null ? void 0 : e.head,
65
+ headAlign: e == null ? void 0 : e.headAlign,
66
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
67
+ name: e == null ? void 0 : e.name,
68
+ width: e == null ? void 0 : e.width,
69
+ fixed: e == null ? void 0 : e.fixed,
70
+ children: n.children
68
71
  };
69
- } else if (c.type.name === "OQuerytableColumngroup") {
72
+ if (n.type.name === "OQuerytableColumngroup")
70
73
  return {
71
- type: c.type.name,
72
- head: props == null ? void 0 : props.head,
73
- headAlign: props == null ? void 0 : props.headAlign,
74
- children: genColumns(filterEmpty((_b = (_a = c.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a)))
74
+ type: n.type.name,
75
+ head: e == null ? void 0 : e.head,
76
+ headAlign: e == null ? void 0 : e.headAlign,
77
+ children: m(l((i = (a = n.children) == null ? void 0 : a.default) == null ? void 0 : i.call(a)))
75
78
  };
76
- } else if (c.type.name === "OQuerytableColumnDiy") {
79
+ if (n.type.name === "OQuerytableColumnDiy")
77
80
  return {
78
- type: c.type.name,
79
- head: props == null ? void 0 : props.head,
80
- headAlign: props == null ? void 0 : props.headAlign,
81
- name: props == null ? void 0 : props.name,
82
- width: props == null ? void 0 : props.width,
83
- fixed: props == null ? void 0 : props.fixed,
84
- children: c.children
81
+ type: n.type.name,
82
+ head: e == null ? void 0 : e.head,
83
+ headAlign: e == null ? void 0 : e.headAlign,
84
+ name: e == null ? void 0 : e.name,
85
+ width: e == null ? void 0 : e.width,
86
+ fixed: e == null ? void 0 : e.fixed,
87
+ children: n.children
85
88
  };
86
- } else {
87
- throw new OrionError(`OQuerytable不能正确解析'${c.type.name}'子组件。`);
88
- }
89
+ throw new f(`OQuerytable不能正确解析'${n.type.name}'子组件。`);
89
90
  });
90
- return tableColumns;
91
91
  }
92
- function useColumns(slots) {
93
- const columns = computed(() => {
94
- var _a;
95
- const children = (_a = slots.default) == null ? void 0 : _a.call(slots);
96
- const non_empty_children = filterEmpty(children);
97
- const tableColumns = genColumns(non_empty_children);
98
- return tableColumns;
92
+ function x(t) {
93
+ return h(() => {
94
+ var i;
95
+ const n = (i = t.default) == null ? void 0 : i.call(t), e = l(n);
96
+ return m(e);
99
97
  });
100
- return columns;
101
98
  }
102
99
  export {
103
- useColumns as default
100
+ x as default
104
101
  };
105
102
  //# sourceMappingURL=useColumns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useColumns.js","sources":["../../../../src/components/Querytable/hooks/useColumns.ts"],"sourcesContent":["import { computed } from 'vue'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\nimport { camelize } from '../../../components/_util/util'\r\nimport { filterEmpty } from '../../_util/props-util'\r\n\r\nfunction genColumns(children) {\r\n const tableColumns = children?.map((c) => {\r\n const props = { ...(c.props || {}) }\r\n for (const [k, v] of Object.entries(props)) {\r\n delete props[k]\r\n props[camelize(k)] = v\r\n }\r\n\r\n if (c.type.name === 'OQuerytableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnString' || c.type.name === 'OQuerytableColumnLink') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnNumber') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n thousandsSeparator: props?.thousandsSeparator,\r\n precision: Number(props?.precision),\r\n percentage: props?.percentage,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnDate') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnSingleselect' || c.type.name === 'OQuerytableColumnMultiselect') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnButtongroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumngroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n\r\n children: genColumns(filterEmpty(c.children?.default?.())),\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnDiy') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OQuerytable不能正确解析'${c.type.name}'子组件。`)\r\n }\r\n })\r\n\r\n return tableColumns\r\n}\r\n\r\nexport default function useColumns(slots) {\r\n const columns = computed(() => {\r\n const children = slots.default?.()\r\n\r\n const non_empty_children = filterEmpty(children)\r\n\r\n const tableColumns = genColumns(non_empty_children)\r\n\r\n return tableColumns\r\n })\r\n\r\n return columns\r\n}\r\n"],"names":[],"mappings":";;;;AAMA,SAAS,WAAW,UAAU;AAC5B,QAAM,eAAe,qCAAU,IAAI,CAAC,MAAM;;AACxC,UAAM,QAAQ,EAAE,GAAI,EAAE,SAAS,CAAI,EAAA;AACnC,eAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC1C,aAAO,MAAM,CAAC;AACR,YAAA,SAAS,CAAC,CAAC,IAAI;AAAA,IACvB;AAEI,QAAA,EAAE,KAAK,SAAS,0BAA0B;AACrC,aAAA;AAAA,QACL,MAAM,EAAE,KAAK;AAAA,MAAA;AAAA,IACf,WACS,EAAE,KAAK,SAAS,6BAA6B,EAAE,KAAK,SAAS,yBAAyB;AACxF,aAAA;AAAA,QACL,MAAM,EAAE,KAAK;AAAA,QACb,MAAM,+BAAO;AAAA,QACb,WAAW,+BAAO;AAAA,QAClB,MAAM,+BAAO;AAAA,QACb,OAAO,+BAAO;AAAA,QACd,OAAO,+BAAO;AAAA,MAAA;AAAA,IAEP,WAAA,EAAE,KAAK,SAAS,2BAA2B;AAC7C,aAAA;AAAA,QACL,MAAM,EAAE,KAAK;AAAA,QACb,MAAM,+BAAO;AAAA,QACb,WAAW,+BAAO;AAAA,QAClB,MAAM,+BAAO;AAAA,QACb,OAAO,+BAAO;AAAA,QACd,OAAO,+BAAO;AAAA,QAEd,oBAAoB,+BAAO;AAAA,QAC3B,WAAW,OAAO,+BAAO,SAAS;AAAA,QAClC,YAAY,+BAAO;AAAA,MAAA;AAAA,IAEZ,WAAA,EAAE,KAAK,SAAS,yBAAyB;AAC3C,aAAA;AAAA,QACL,MAAM,EAAE,KAAK;AAAA,QAEb,MAAM,+BAAO;AAAA,QACb,WAAW,+BAAO;AAAA,QAClB,MAAM,+BAAO;AAAA,QACb,OAAO,+BAAO;AAA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AACvB,UAAA,YAAW,WAAM,YAAN;AAEX,UAAA,qBAAqB,YAAY,QAAQ;AAEzC,UAAA,eAAe,WAAW,kBAAkB;AAE3C,WAAA;AAAA,EAAA,CACR;AAEM,SAAA;AACT;"}
1
+ {"version":3,"file":"useColumns.js","sources":["../../../../src/components/Querytable/hooks/useColumns.ts"],"sourcesContent":["import { computed } from 'vue'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\nimport { camelize } from '../../../components/_util/util'\r\nimport { filterEmpty } from '../../_util/props-util'\r\n\r\nfunction genColumns(children) {\r\n const tableColumns = children?.map((c) => {\r\n const props = { ...(c.props || {}) }\r\n for (const [k, v] of Object.entries(props)) {\r\n delete props[k]\r\n props[camelize(k)] = v\r\n }\r\n\r\n if (c.type.name === 'OQuerytableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnString' || c.type.name === 'OQuerytableColumnLink') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnNumber') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n thousandsSeparator: props?.thousandsSeparator,\r\n precision: Number(props?.precision),\r\n percentage: props?.percentage,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnDate') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnSingleselect' || c.type.name === 'OQuerytableColumnMultiselect') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnButtongroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumngroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n\r\n children: genColumns(filterEmpty(c.children?.default?.())),\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnDiy') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OQuerytable不能正确解析'${c.type.name}'子组件。`)\r\n }\r\n })\r\n\r\n return tableColumns\r\n}\r\n\r\nexport default function useColumns(slots) {\r\n const columns = computed(() => {\r\n const children = slots.default?.()\r\n\r\n const non_empty_children = filterEmpty(children)\r\n\r\n const tableColumns = genColumns(non_empty_children)\r\n\r\n return tableColumns\r\n })\r\n\r\n return columns\r\n}\r\n"],"names":["genColumns","children","c","props","k","v","camelize","filterEmpty","_b","_a","OrionError","useColumns","slots","computed","non_empty_children"],"mappings":";;;;AAMA,SAASA,EAAWC,GAAU;AAsGrB,SArGcA,KAAA,gBAAAA,EAAU,IAAI,CAACC,MAAM;;AACxC,UAAMC,IAAQ,EAAE,GAAID,EAAE,SAAS,CAAI,EAAA;AACnC,eAAW,CAACE,GAAGC,CAAC,KAAK,OAAO,QAAQF,CAAK;AACvC,aAAOA,EAAMC,CAAC,GACRD,EAAAG,EAAS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