orion-design 0.1.29 → 0.1.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. package/dist/Throne/index.js +30 -14
  2. package/dist/Throne/index.js.map +1 -1
  3. package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
  4. package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
  5. package/dist/components/Button/index.js +40 -33
  6. package/dist/components/Button/index.js.map +1 -1
  7. package/dist/components/Flex/index.js +122 -89
  8. package/dist/components/Flex/index.js.map +1 -1
  9. package/dist/components/Form/Form.js +2 -2
  10. package/dist/components/Form/Form.js.map +1 -1
  11. package/dist/components/Form/LovInput/LovInput.js +2 -2
  12. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  13. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  14. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  15. package/dist/components/Form/LovInput/index.js +4 -4
  16. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  17. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  18. package/dist/components/Form/hooks/index.js +128 -66
  19. package/dist/components/Form/hooks/index.js.map +1 -1
  20. package/dist/components/Form/index.js +836 -656
  21. package/dist/components/Form/index.js.map +1 -1
  22. package/dist/components/Form/utils/index.js +30 -18
  23. package/dist/components/Form/utils/index.js.map +1 -1
  24. package/dist/components/LovTable/LovPagetable.vue.d.ts +28 -0
  25. package/dist/components/LovTable/index.d.ts +14 -0
  26. package/dist/components/LovTable/index.js +179 -105
  27. package/dist/components/LovTable/index.js.map +1 -1
  28. package/dist/components/Modal/Modal.d.ts +2 -0
  29. package/dist/components/Modal/ModalLocator.vue.d.ts +20 -0
  30. package/dist/components/Modal/index.d.ts +4 -1
  31. package/dist/components/Modal/index.js +127 -0
  32. package/dist/components/Modal/index.js.map +1 -0
  33. package/dist/components/Modal/types.d.ts +18 -0
  34. package/dist/components/Modal/types.js +7 -0
  35. package/dist/components/Modal/types.js.map +1 -0
  36. package/dist/components/Modal/useModal.d.ts +1 -3
  37. package/dist/components/Modal/useModal.js +5 -4
  38. package/dist/components/Modal/useModal.js.map +1 -1
  39. package/dist/components/Pagetable/Pagetable.d.ts +13 -0
  40. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
  41. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
  42. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +13 -0
  43. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
  44. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
  45. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
  46. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
  47. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
  48. package/dist/components/Pagetable/hooks/useColumns.js +88 -74
  49. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  50. package/dist/components/Pagetable/index.d.ts +9 -0
  51. package/dist/components/Pagetable/index.js +697 -491
  52. package/dist/components/Pagetable/index.js.map +1 -1
  53. package/dist/components/Pagetable/utils/index.js +92 -54
  54. package/dist/components/Pagetable/utils/index.js.map +1 -1
  55. package/dist/components/Querytable/hooks/useColumns.js +82 -74
  56. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  57. package/dist/components/Querytable/index.js +579 -469
  58. package/dist/components/Querytable/index.js.map +1 -1
  59. package/dist/components/Querytable/utils/index.js +92 -54
  60. package/dist/components/Querytable/utils/index.js.map +1 -1
  61. package/dist/components/RichTextEditor/index.js +100 -74
  62. package/dist/components/RichTextEditor/index.js.map +1 -1
  63. package/dist/components/Tabs/constants.js +2 -2
  64. package/dist/components/Tabs/constants.js.map +1 -1
  65. package/dist/components/Tabs/index.js +603 -358
  66. package/dist/components/Tabs/index.js.map +1 -1
  67. package/dist/components/Tabs/tab-bar.js +6 -6
  68. package/dist/components/Tabs/tab-bar.js.map +1 -1
  69. package/dist/components/Tabs/tab-pane.js +3 -3
  70. package/dist/components/Tabs/tab-pane.js.map +1 -1
  71. package/dist/components/_constants/aria.js +2 -2
  72. package/dist/components/_constants/aria.js.map +1 -1
  73. package/dist/components/_constants/event.js +6 -4
  74. package/dist/components/_constants/event.js.map +1 -1
  75. package/dist/components/_constants/index.js +6 -6
  76. package/dist/components/_hooks/index.js +7 -7
  77. package/dist/components/_hooks/use-namespace/index.js +74 -39
  78. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  79. package/dist/components/_hooks/use-ordered-children/index.js +29 -19
  80. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  81. package/dist/components/_util/arrays.js +9 -5
  82. package/dist/components/_util/arrays.js.map +1 -1
  83. package/dist/components/_util/browser.js +6 -6
  84. package/dist/components/_util/browser.js.map +1 -1
  85. package/dist/components/_util/classNames.js +22 -17
  86. package/dist/components/_util/classNames.js.map +1 -1
  87. package/dist/components/_util/dom/aria.js +74 -39
  88. package/dist/components/_util/dom/aria.js.map +1 -1
  89. package/dist/components/_util/dom/element.js +9 -8
  90. package/dist/components/_util/dom/element.js.map +1 -1
  91. package/dist/components/_util/dom/event.js +14 -7
  92. package/dist/components/_util/dom/event.js.map +1 -1
  93. package/dist/components/_util/dom/index.js +36 -36
  94. package/dist/components/_util/dom/position.js +49 -25
  95. package/dist/components/_util/dom/position.js.map +1 -1
  96. package/dist/components/_util/dom/scroll.js +103 -61
  97. package/dist/components/_util/dom/scroll.js.map +1 -1
  98. package/dist/components/_util/dom/style.js +65 -50
  99. package/dist/components/_util/dom/style.js.map +1 -1
  100. package/dist/components/_util/easings.js +8 -4
  101. package/dist/components/_util/easings.js.map +1 -1
  102. package/dist/components/_util/error.js +12 -11
  103. package/dist/components/_util/error.js.map +1 -1
  104. package/dist/components/_util/functions.js +3 -3
  105. package/dist/components/_util/i18n.js +2 -2
  106. package/dist/components/_util/i18n.js.map +1 -1
  107. package/dist/components/_util/index.js +137 -137
  108. package/dist/components/_util/isValid.js +4 -2
  109. package/dist/components/_util/isValid.js.map +1 -1
  110. package/dist/components/_util/objects.js +18 -14
  111. package/dist/components/_util/objects.js.map +1 -1
  112. package/dist/components/_util/props-util/index.js +46 -20
  113. package/dist/components/_util/props-util/index.js.map +1 -1
  114. package/dist/components/_util/props-util/initDefaultProps.js +18 -10
  115. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  116. package/dist/components/_util/raf.js +5 -4
  117. package/dist/components/_util/raf.js.map +1 -1
  118. package/dist/components/_util/rand.js +4 -3
  119. package/dist/components/_util/rand.js.map +1 -1
  120. package/dist/components/_util/strings.js +9 -8
  121. package/dist/components/_util/strings.js.map +1 -1
  122. package/dist/components/_util/throttleByRaf.js +16 -10
  123. package/dist/components/_util/throttleByRaf.js.map +1 -1
  124. package/dist/components/_util/type.js +41 -38
  125. package/dist/components/_util/type.js.map +1 -1
  126. package/dist/components/_util/types.js +41 -22
  127. package/dist/components/_util/types.js.map +1 -1
  128. package/dist/components/_util/typescript.js +2 -2
  129. package/dist/components/_util/typescript.js.map +1 -1
  130. package/dist/components/_util/util.js +85 -43
  131. package/dist/components/_util/util.js.map +1 -1
  132. package/dist/components/_util/vue/global-node.js +27 -15
  133. package/dist/components/_util/vue/global-node.js.map +1 -1
  134. package/dist/components/_util/vue/icon.js +29 -25
  135. package/dist/components/_util/vue/icon.js.map +1 -1
  136. package/dist/components/_util/vue/index.js +41 -41
  137. package/dist/components/_util/vue/install.js +35 -18
  138. package/dist/components/_util/vue/install.js.map +1 -1
  139. package/dist/components/_util/vue/props/index.js +6 -6
  140. package/dist/components/_util/vue/props/runtime.js +46 -30
  141. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  142. package/dist/components/_util/vue/refs.js +12 -6
  143. package/dist/components/_util/vue/refs.js.map +1 -1
  144. package/dist/components/_util/vue/size.js +5 -3
  145. package/dist/components/_util/vue/size.js.map +1 -1
  146. package/dist/components/_util/vue/validator.js +5 -4
  147. package/dist/components/_util/vue/validator.js.map +1 -1
  148. package/dist/components/_util/vue/vnode.js +100 -54
  149. package/dist/components/_util/vue/vnode.js.map +1 -1
  150. package/dist/components/_util/vue-types/index.js +231 -220
  151. package/dist/components/_util/vue-types/index.js.map +1 -1
  152. package/dist/components/components.js +20 -20
  153. package/dist/components/index.js +38 -35
  154. package/dist/components/index.js.map +1 -1
  155. package/dist/components-8oZ2kpUC.js +27 -0
  156. package/dist/components-8oZ2kpUC.js.map +1 -0
  157. package/dist/components-B3d9m_tn.js +27 -0
  158. package/dist/components-B3d9m_tn.js.map +1 -0
  159. package/dist/error/OrionError.js +8 -4
  160. package/dist/error/OrionError.js.map +1 -1
  161. package/dist/functions-BeMkokbY.js +63 -0
  162. package/dist/functions-BeMkokbY.js.map +1 -0
  163. package/dist/index-BOKLZnqH.js +54 -0
  164. package/dist/index-BOKLZnqH.js.map +1 -0
  165. package/dist/index-D1m0KTpK.js +69 -0
  166. package/dist/index-D1m0KTpK.js.map +1 -0
  167. package/dist/index-DR5ZP7mD.js +160 -0
  168. package/dist/index-DR5ZP7mD.js.map +1 -0
  169. package/dist/index-DkwIULcN.js +200 -0
  170. package/dist/index-DkwIULcN.js.map +1 -0
  171. package/dist/index.css +797 -1
  172. package/dist/index.js +36 -36
  173. package/dist/print/LodopFuncs.js +101 -43
  174. package/dist/print/LodopFuncs.js.map +1 -1
  175. package/dist/print/index.js +200 -108
  176. package/dist/print/index.js.map +1 -1
  177. package/dist/request/ErrorHandlerChain.js +17 -14
  178. package/dist/request/ErrorHandlerChain.js.map +1 -1
  179. package/dist/request/RequestFilterChain.js +16 -13
  180. package/dist/request/RequestFilterChain.js.map +1 -1
  181. package/dist/request/ResponseParserChain.js +17 -14
  182. package/dist/request/ResponseParserChain.js.map +1 -1
  183. package/dist/request/disivion/DateSerializer.js +47 -22
  184. package/dist/request/disivion/DateSerializer.js.map +1 -1
  185. package/dist/request/disivion/DivisionErrorHandler.js +40 -25
  186. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  187. package/dist/request/disivion/DivisionResponseParser.js +16 -10
  188. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  189. package/dist/request/disivion/index.js +305 -201
  190. package/dist/request/disivion/index.js.map +1 -1
  191. package/dist/request/error/BizExceptionResponseError.js +11 -5
  192. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  193. package/dist/request/error/ExceptionResponseError.js +11 -5
  194. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  195. package/dist/request/error/ResponseError.js +9 -4
  196. package/dist/request/error/ResponseError.js.map +1 -1
  197. package/dist/request/error/SessionExceptionResponseError.js +11 -5
  198. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  199. package/dist/request/index.js +11 -11
  200. package/dist/utils/DateUtil.js +48 -33
  201. package/dist/utils/DateUtil.js.map +1 -1
  202. package/dist/utils/NumberUtil.js +6 -6
  203. package/dist/utils/NumberUtil.js.map +1 -1
  204. package/dist/utils/cloneDeep.js +2 -2
  205. package/dist/utils/delay.js +3 -3
  206. package/dist/utils/delay.js.map +1 -1
  207. package/dist/utils/functions.js +3 -3
  208. package/dist/utils/index.js +12 -12
  209. package/dist/utils/md5.js +191 -93
  210. package/dist/utils/md5.js.map +1 -1
  211. package/dist/utils/uuid.js +35 -25
  212. package/dist/utils/uuid.js.map +1 -1
  213. package/dist/version/index.js +2 -2
  214. package/dist/version/version.d.ts +1 -1
  215. package/dist/version/version.js +2 -2
  216. package/dist/version/version.js.map +1 -1
  217. package/package.json +1 -1
  218. package/dist/components-J6-qau6Y.js +0 -73
  219. package/dist/components-J6-qau6Y.js.map +0 -1
@@ -1,606 +1,812 @@
1
1
  import "lodash-es";
2
- import { defineComponent as C, ref as Z, computed as ee, createVNode as l, createTextVNode as te, isVNode as V } from "vue";
3
- import { withInstall as ne } from "../_util/vue/install.js";
4
- import { ElTable as le, ElPagination as oe, ElTableColumn as S, ElButton as re } from "element-plus";
5
- import ae from "../_util/classNames.js";
6
- import { arrayType as ie, objectType as se, booleanType as D, stringType as n, someType as p, numberType as ue } from "../_util/type.js";
7
- import { number2string as pe, formatDate as z, getSingleCodeContent as j, getMultiCodeContent as M } from "./utils/index.js";
8
- import ce from "dayjs";
9
- import { S as de } from "../../index-BbsXWo7C.js";
10
- import ge from "../../error/OrionError.js";
11
- import me from "./hooks/useColumns.js";
12
- import I from "../../Throne/index.js";
13
- function he(o) {
14
- return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !V(o);
2
+ import { defineComponent, ref, computed, createVNode, createTextVNode, isVNode } from "vue";
3
+ import { withInstall } from "../_util/vue/install.js";
4
+ import { ElTable, ElPagination, ElTableColumn, ElButton } from "element-plus";
5
+ import classNames from "../_util/classNames.js";
6
+ import { arrayType, objectType, booleanType, stringType, someType, numberType } from "../_util/type.js";
7
+ import { number2string, formatDate, getSingleCodeContent, getMultiCodeContent } from "./utils/index.js";
8
+ import dayjs from "dayjs";
9
+ import { S as Space } from "../../index-BOKLZnqH.js";
10
+ import OrionError from "../../error/OrionError.js";
11
+ import useColumns from "./hooks/useColumns.js";
12
+ import Throne from "../../Throne/index.js";
13
+ function _isSlot$1(s) {
14
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
15
15
  }
16
- const fe = () => ({
17
- data: ie(),
18
- pagination: se(),
19
- showRowNumber: D(!0),
20
- selectionMode: D(!1),
21
- currentRowMode: D(!1),
22
- size: n()
23
- }), be = /* @__PURE__ */ C({
16
+ const pagetableProps = () => ({
17
+ data: arrayType(),
18
+ tailData: objectType(),
19
+ pagination: objectType(),
20
+ showRowNumber: booleanType(true),
21
+ selectionMode: booleanType(false),
22
+ currentRowMode: booleanType(false),
23
+ size: stringType()
24
+ });
25
+ const Pagetable$1 = /* @__PURE__ */ defineComponent({
24
26
  name: "OPagetable",
25
- inheritAttrs: !1,
26
- props: fe(),
27
+ inheritAttrs: false,
28
+ props: pagetableProps(),
27
29
  emits: ["selectionChange", "currentRowChange", "update:pagination", "rowClick", "rowDblclick", "cellClick", "cellDblclick"],
28
- setup(o, {
29
- slots: g,
30
- attrs: h,
31
- emit: s,
32
- expose: w
30
+ setup(props, {
31
+ slots,
32
+ attrs,
33
+ emit,
34
+ expose
33
35
  }) {
34
- const y = Z(), B = ee(() => ({})), k = me(g);
35
- return w({
36
- clearSelection: () => {
37
- y.value.clearSelection();
38
- },
39
- getSelectionRows: () => y.value.getSelectionRows(),
40
- toggleRowSelection: (...O) => y.value.toggleRowSelection(...O),
41
- toggleAllSelection: () => y.value.toggleAllSelection(),
42
- setCurrentRow: (...O) => y.value.setCurrentRow(...O),
43
- scrollTo: (...O) => y.value.scrollTo(...O)
44
- }), () => {
36
+ const elTableRef = ref();
37
+ const style = computed(() => {
38
+ const rowStyle = {};
39
+ return rowStyle;
40
+ });
41
+ const columns = useColumns(slots);
42
+ const leafColumns4ShowSummary = computed(() => {
43
+ let r = [];
44
+ if (props.showRowNumber) {
45
+ r.push({
46
+ type: "__showRowNumber__"
47
+ });
48
+ }
49
+ if (props.selectionMode) {
50
+ r.push({
51
+ type: "__selectionMode__"
52
+ });
53
+ }
54
+ function flat(columns2) {
55
+ if (!columns2) {
56
+ return;
57
+ }
58
+ for (let i = 0; i < columns2.length; i++) {
59
+ const c = columns2[i];
60
+ if (c.type === "OPagetableColumngroup") {
61
+ flat(c.children);
62
+ } else {
63
+ r.push({
64
+ ...c
65
+ });
66
+ }
67
+ }
68
+ }
69
+ flat(columns.value);
70
+ return r;
71
+ });
72
+ const showSummary = computed(() => {
73
+ function existTail(columns2) {
74
+ if (!columns2) {
75
+ return false;
76
+ }
77
+ for (let i = 0; i < columns2.length; i++) {
78
+ const c = columns2[i];
79
+ if (c.type === "OPagetableColumngroup") {
80
+ if (existTail(c.children)) {
81
+ return true;
82
+ }
83
+ } else {
84
+ if (c.tail === "" || c.tail === true || c.tail) {
85
+ return true;
86
+ }
87
+ }
88
+ }
89
+ return false;
90
+ }
91
+ return existTail(columns.value);
92
+ });
93
+ const clearSelection = () => {
94
+ elTableRef.value.clearSelection();
95
+ };
96
+ const getSelectionRows = () => {
97
+ return elTableRef.value.getSelectionRows();
98
+ };
99
+ const toggleRowSelection = (...args) => {
100
+ return elTableRef.value.toggleRowSelection(...args);
101
+ };
102
+ const toggleAllSelection = () => {
103
+ return elTableRef.value.toggleAllSelection();
104
+ };
105
+ const setCurrentRow = (...args) => {
106
+ return elTableRef.value.setCurrentRow(...args);
107
+ };
108
+ const scrollTo = (...args) => {
109
+ return elTableRef.value.scrollTo(...args);
110
+ };
111
+ expose({
112
+ clearSelection,
113
+ getSelectionRows,
114
+ toggleRowSelection,
115
+ toggleAllSelection,
116
+ setCurrentRow,
117
+ scrollTo
118
+ });
119
+ return () => {
120
+ const {
121
+ data
122
+ } = props;
123
+ const {
124
+ selectionMode = false
125
+ } = props;
45
126
  const {
46
- data: O
47
- } = o, {
48
- selectionMode: E = !1
49
- } = o, {
50
- pagination: v
51
- } = o, {
52
- showRowNumber: L = !0
53
- } = o, {
54
- currentRowMode: $ = !1
55
- } = o, {
56
- size: R = "default"
57
- } = o, Y = ae("orion-pagetbale"), F = () => l(S, {
58
- type: "index",
59
- label: "No",
60
- width: 56,
61
- fixed: "left",
62
- showOverflowTooltip: !0,
63
- index: (t) => (v.currentPage - 1) * v.pageSize + t + 1
64
- }, null), H = () => l(S, {
65
- type: "selection",
66
- width: 40,
67
- fixed: "left"
68
- }, null), U = (t) => {
127
+ pagination
128
+ } = props;
129
+ const {
130
+ showRowNumber = true
131
+ } = props;
132
+ const {
133
+ currentRowMode = false
134
+ } = props;
135
+ const {
136
+ size = "default"
137
+ } = props;
138
+ const getSummaries = (param) => {
139
+ const tailData = computed(() => props.tailData);
140
+ return leafColumns4ShowSummary.value.map((c) => {
141
+ if (c.type === "__showRowNumber__") {
142
+ return "Σ";
143
+ }
144
+ if (c.type === "__selectionMode__") {
145
+ return;
146
+ }
147
+ if (!tailData.value) {
148
+ return;
149
+ }
150
+ const columnName = c.name;
151
+ const columnTail = c.tail;
152
+ if (columnTail == null) {
153
+ return;
154
+ }
155
+ if (columnTail === false) {
156
+ return;
157
+ }
158
+ if (columnTail === "" || columnTail === true) {
159
+ if (tailData.value[columnName] != null) {
160
+ return tailData.value[columnName];
161
+ }
162
+ } else if (typeof columnTail === "string") {
163
+ return columnTail.replace("{}", tailData.value[columnName]);
164
+ } else {
165
+ throw new OrionError(`列[${columnName}]的tail属性配置错误,只能是 Boolean、String 类型,当前是[${typeof columnTail}]类型。`);
166
+ }
167
+ return;
168
+ });
169
+ };
170
+ const cn = classNames("orion-pagetbale");
171
+ const renderIndexColumn = () => {
172
+ return createVNode(ElTableColumn, {
173
+ "type": "index",
174
+ "label": "No",
175
+ "width": 56,
176
+ "fixed": "left",
177
+ "showOverflowTooltip": true,
178
+ "index": (index) => {
179
+ return (pagination.currentPage - 1) * pagination.pageSize + index + 1;
180
+ }
181
+ }, null);
182
+ };
183
+ const renderSelectionColumn = () => {
184
+ return createVNode(ElTableColumn, {
185
+ "type": "selection",
186
+ "width": 40,
187
+ "fixed": "left"
188
+ }, null);
189
+ };
190
+ const renderStringColumn = (column) => {
69
191
  const {
70
- name: e,
71
- head: r,
72
- headAlign: i,
73
- width: d,
74
- fixed: m
75
- } = t;
76
- return l(S, {
77
- label: r,
78
- headerAlign: i,
79
- prop: e,
80
- width: d,
81
- fixed: m,
82
- showOverflowTooltip: !0
192
+ name,
193
+ head,
194
+ headAlign,
195
+ width,
196
+ fixed
197
+ } = column;
198
+ return createVNode(ElTableColumn, {
199
+ "label": head,
200
+ "headerAlign": headAlign,
201
+ "prop": name,
202
+ "width": width,
203
+ "fixed": fixed,
204
+ "showOverflowTooltip": true
83
205
  }, null);
84
- }, _ = (t) => {
206
+ };
207
+ const renderLinkColumn = (column) => {
85
208
  const {
86
- name: e,
87
- head: r,
88
- headAlign: i,
89
- width: d,
90
- fixed: m
91
- } = t;
92
- return l(S, {
93
- label: r,
94
- headerAlign: i,
95
- prop: e,
96
- width: d,
97
- fixed: m,
98
- showOverflowTooltip: !0
209
+ name,
210
+ head,
211
+ headAlign,
212
+ width,
213
+ fixed
214
+ } = column;
215
+ return createVNode(ElTableColumn, {
216
+ "label": head,
217
+ "headerAlign": headAlign,
218
+ "prop": name,
219
+ "width": width,
220
+ "fixed": fixed,
221
+ "showOverflowTooltip": true
99
222
  }, {
100
- default: (a) => {
223
+ default: (scope) => {
101
224
  const {
102
- row: c,
103
- column: u
104
- } = a;
105
- return l("span", {
106
- class: "cell-linkcolumn"
107
- }, [c[u.property]]);
225
+ row,
226
+ column: column2
227
+ } = scope;
228
+ return createVNode("span", {
229
+ "class": "cell-linkcolumn"
230
+ }, [row[column2.property]]);
108
231
  }
109
232
  });
110
- }, q = (t) => {
233
+ };
234
+ const renderNumberColumn = (column) => {
235
+ const {
236
+ name,
237
+ head,
238
+ headAlign,
239
+ width,
240
+ fixed
241
+ } = column;
111
242
  const {
112
- name: e,
113
- head: r,
114
- headAlign: i,
115
- width: d,
116
- fixed: m
117
- } = t, {
118
- thousandsSeparator: a = !0,
119
- precision: c = -1,
120
- percentage: u = !1
121
- } = t;
122
- return l(S, {
123
- label: r,
124
- headerAlign: i,
125
- align: "right",
126
- prop: e,
127
- width: d,
128
- fixed: m,
129
- showOverflowTooltip: !0
243
+ thousandsSeparator = true,
244
+ precision = -1,
245
+ percentage = false
246
+ } = column;
247
+ return createVNode(ElTableColumn, {
248
+ "label": head,
249
+ "headerAlign": headAlign,
250
+ "align": "right",
251
+ "prop": name,
252
+ "width": width,
253
+ "fixed": fixed,
254
+ "showOverflowTooltip": true
130
255
  }, {
131
- default: (f) => {
256
+ default: (scope) => {
132
257
  const {
133
- row: P,
134
- column: b
135
- } = f;
136
- return l("span", {
137
- class: "cell-numbercolumn"
138
- }, [pe(P[b.property], a, c, u === !0 || u === "")]);
258
+ row,
259
+ column: column2
260
+ } = scope;
261
+ return createVNode("span", {
262
+ "class": "cell-numbercolumn"
263
+ }, [number2string(row[column2.property], thousandsSeparator, precision, percentage === true || percentage === "")]);
139
264
  }
140
265
  });
141
- }, G = (t) => {
266
+ };
267
+ const renderDateColumn = (column) => {
142
268
  const {
143
- name: e,
144
- head: r,
145
- headAlign: i,
146
- width: d,
147
- fixed: m,
148
- sourceFormat: a,
149
- format: c = "YYYYMMDDHHmmss"
150
- } = t;
151
- return l(S, {
152
- label: r,
153
- headerAlign: i,
154
- prop: e,
155
- width: d,
156
- fixed: m,
157
- showOverflowTooltip: !0
269
+ name,
270
+ head,
271
+ headAlign,
272
+ width,
273
+ fixed,
274
+ sourceFormat,
275
+ format = "YYYYMMDDHHmmss"
276
+ } = column;
277
+ return createVNode(ElTableColumn, {
278
+ "label": head,
279
+ "headerAlign": headAlign,
280
+ "prop": name,
281
+ "width": width,
282
+ "fixed": fixed,
283
+ "showOverflowTooltip": true
158
284
  }, {
159
- default: (u) => {
285
+ default: (scope) => {
160
286
  const {
161
- row: f,
162
- column: P
163
- } = u, b = f[P.property];
164
- return b instanceof Date || ce.isDayjs(b) ? l("div", null, [z(b, c)]) : a && c ? l("div", null, [z(b, a, c)]) : l("div", null, [b]);
287
+ row,
288
+ column: column2
289
+ } = scope;
290
+ const cellValue = row[column2.property];
291
+ if (cellValue instanceof Date || dayjs.isDayjs(cellValue)) {
292
+ return createVNode("div", null, [formatDate(cellValue, format)]);
293
+ } else {
294
+ if (sourceFormat && format) {
295
+ return createVNode("div", null, [formatDate(cellValue, sourceFormat, format)]);
296
+ } else {
297
+ return createVNode("div", null, [cellValue]);
298
+ }
299
+ }
165
300
  }
166
301
  });
167
- }, J = (t) => {
302
+ };
303
+ const renderSingleSelectColumn = (column) => {
168
304
  const {
169
- name: e,
170
- head: r,
171
- headAlign: i,
172
- width: d,
173
- fixed: m
174
- } = t, {
175
- code: a
176
- } = t;
177
- return l(S, {
178
- label: r,
179
- headerAlign: i,
180
- prop: e,
181
- width: d,
182
- fixed: m,
183
- showOverflowTooltip: !0
305
+ name,
306
+ head,
307
+ headAlign,
308
+ width,
309
+ fixed
310
+ } = column;
311
+ const {
312
+ code
313
+ } = column;
314
+ return createVNode(ElTableColumn, {
315
+ "label": head,
316
+ "headerAlign": headAlign,
317
+ "prop": name,
318
+ "width": width,
319
+ "fixed": fixed,
320
+ "showOverflowTooltip": true
184
321
  }, {
185
- default: (c) => {
322
+ default: (scope) => {
186
323
  const {
187
- row: u,
188
- column: f
189
- } = c, P = u[f.property];
190
- let b, x, A;
191
- return a ? typeof a == "string" ? (b = a, x = I.getCode(b), A = j(x.value, P)) : (x = a, A = j(x, P)) : A = null, l("span", {
192
- class: "cell-singleselect"
193
- }, [A]);
324
+ row,
325
+ column: column2
326
+ } = scope;
327
+ const cellValue = row[column2.property];
328
+ let codeName, codeData, codeContent;
329
+ if (!code) {
330
+ codeContent = null;
331
+ } else if (typeof code === "string") {
332
+ codeName = code;
333
+ codeData = Throne.getCode(codeName);
334
+ codeContent = getSingleCodeContent(codeData.value, cellValue);
335
+ } else {
336
+ codeData = code;
337
+ codeContent = getSingleCodeContent(codeData, cellValue);
338
+ }
339
+ return createVNode("span", {
340
+ "class": "cell-singleselect"
341
+ }, [codeContent]);
194
342
  }
195
343
  });
196
- }, K = (t) => {
344
+ };
345
+ const renderMultiSelectColumn = (column) => {
346
+ const {
347
+ name,
348
+ head,
349
+ headAlign,
350
+ width,
351
+ fixed
352
+ } = column;
197
353
  const {
198
- name: e,
199
- head: r,
200
- headAlign: i,
201
- width: d,
202
- fixed: m
203
- } = t, {
204
- code: a
205
- } = t;
206
- return l(S, {
207
- label: r,
208
- headerAlign: i,
209
- prop: e,
210
- width: d,
211
- fixed: m,
212
- showOverflowTooltip: !0
354
+ code
355
+ } = column;
356
+ return createVNode(ElTableColumn, {
357
+ "label": head,
358
+ "headerAlign": headAlign,
359
+ "prop": name,
360
+ "width": width,
361
+ "fixed": fixed,
362
+ "showOverflowTooltip": true
213
363
  }, {
214
- default: (c) => {
364
+ default: (scope) => {
215
365
  const {
216
- row: u,
217
- column: f
218
- } = c, P = u[f.property];
219
- let b, x, A;
220
- return a ? typeof a == "string" ? (b = a, x = I.getCode(b), A = M(x.value, P)) : (x = a, A = M(x, P)) : A = null, l("span", {
221
- class: "cell-multiselect"
222
- }, [A]);
366
+ row,
367
+ column: column2
368
+ } = scope;
369
+ const cellValue = row[column2.property];
370
+ let codeName, codeData, codeContent;
371
+ if (!code) {
372
+ codeContent = null;
373
+ } else if (typeof code === "string") {
374
+ codeName = code;
375
+ codeData = Throne.getCode(codeName);
376
+ codeContent = getMultiCodeContent(codeData.value, cellValue);
377
+ } else {
378
+ codeData = code;
379
+ codeContent = getMultiCodeContent(codeData, cellValue);
380
+ }
381
+ return createVNode("span", {
382
+ "class": "cell-multiselect"
383
+ }, [codeContent]);
223
384
  }
224
385
  });
225
- }, Q = (t) => {
386
+ };
387
+ const renderButtongroupColumn = (column) => {
226
388
  const {
227
- name: e,
228
- head: r,
229
- headAlign: i,
230
- width: d,
231
- fixed: m
232
- } = t;
233
- return l(S, {
234
- label: r,
235
- headerAlign: i,
236
- prop: e,
237
- width: d,
238
- fixed: m
389
+ name,
390
+ head,
391
+ headAlign,
392
+ width,
393
+ fixed
394
+ } = column;
395
+ return createVNode(ElTableColumn, {
396
+ "label": head,
397
+ "headerAlign": headAlign,
398
+ "prop": name,
399
+ "width": width,
400
+ "fixed": fixed
239
401
  }, {
240
- default: (a) => {
241
- var u, f;
242
- const c = (f = (u = t.children) == null ? void 0 : u.default) == null ? void 0 : f.call(u, {
243
- rowData: a.row,
244
- column: t,
245
- rowIndex: a.$index
402
+ default: (scope) => {
403
+ var _a, _b;
404
+ const children = (_b = (_a = column.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a, {
405
+ rowData: scope.row,
406
+ column,
407
+ rowIndex: scope.$index
246
408
  });
247
- return l("div", {
248
- class: "cell-buttongroup"
249
- }, [l(de, null, he(c) ? c : {
250
- default: () => [c]
409
+ return createVNode("div", {
410
+ "class": "cell-buttongroup"
411
+ }, [createVNode(Space, null, _isSlot$1(children) ? children : {
412
+ default: () => [children]
251
413
  })]);
252
414
  }
253
415
  });
254
- }, W = (t) => {
416
+ };
417
+ const renderColumngroupColumn = (column) => {
255
418
  const {
256
- head: e,
257
- headAlign: r
258
- } = t, {
259
- children: i
260
- } = t;
261
- return l(S, {
262
- label: e,
263
- headerAlign: r
419
+ head,
420
+ headAlign
421
+ } = column;
422
+ const {
423
+ children
424
+ } = column;
425
+ return createVNode(ElTableColumn, {
426
+ "label": head,
427
+ "headerAlign": headAlign
264
428
  }, {
265
- default: (d) => N(i)
429
+ default: (scope) => {
430
+ return renderColumns(children);
431
+ }
266
432
  });
267
- }, X = (t) => {
433
+ };
434
+ const renderDiyColumn = (column) => {
268
435
  const {
269
- name: e,
270
- head: r,
271
- headAlign: i,
272
- width: d,
273
- fixed: m
274
- } = t;
275
- return l(S, {
276
- label: r,
277
- headerAlign: i,
278
- prop: e,
279
- width: d,
280
- fixed: m
436
+ name,
437
+ head,
438
+ headAlign,
439
+ width,
440
+ fixed
441
+ } = column;
442
+ return createVNode(ElTableColumn, {
443
+ "label": head,
444
+ "headerAlign": headAlign,
445
+ "prop": name,
446
+ "width": width,
447
+ "fixed": fixed
281
448
  }, {
282
- default: (a) => {
283
- var u, f;
284
- const c = (f = (u = t.children) == null ? void 0 : u.default) == null ? void 0 : f.call(u, {
285
- rowData: a.row,
286
- column: t,
287
- rowIndex: a.$index
449
+ default: (scope) => {
450
+ var _a, _b;
451
+ const children = (_b = (_a = column.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a, {
452
+ rowData: scope.row,
453
+ column,
454
+ rowIndex: scope.$index
288
455
  });
289
- return l("div", {
290
- class: "cell-diy"
291
- }, [c, te(" ")]);
456
+ return createVNode("div", {
457
+ "class": "cell-diy"
458
+ }, [children, createTextVNode(" ")]);
292
459
  }
293
460
  });
294
- }, N = (t) => t == null ? void 0 : t.map((e) => {
295
- if (e.type === "OPagetableColumnString")
296
- return U(e);
297
- if (e.type === "OPagetableColumnLink")
298
- return _(e);
299
- if (e.type === "OPagetableColumnNumber")
300
- return q(e);
301
- if (e.type === "OPagetableColumnDate")
302
- return G(e);
303
- if (e.type === "OPagetableColumnSingleselect")
304
- return J(e);
305
- if (e.type === "OPagetableColumnMultiselect")
306
- return K(e);
307
- if (e.type === "OPagetableColumnButtongroup")
308
- return Q(e);
309
- if (e.type === "OPagetableColumngroup")
310
- return W(e);
311
- if (e.type === "OPagetableColumnDiy")
312
- return X(e);
313
- throw new ge(`OPagetable不能正确渲染'${e.type.name}'子组件。`);
314
- });
315
- return l("div", {
316
- class: [Y, h.class],
317
- style: [B.value, h.style]
318
- }, [l("div", {
319
- class: "pagetable-wrapper"
320
- }, [l(le, {
321
- border: !0,
322
- ref: y,
323
- data: O,
324
- height: "100%",
325
- style: {
461
+ };
462
+ const renderColumns = (columns2) => {
463
+ return columns2 == null ? void 0 : columns2.map((c) => {
464
+ if (c.type === "OPagetableColumnString") {
465
+ return renderStringColumn(c);
466
+ } else if (c.type === "OPagetableColumnLink") {
467
+ return renderLinkColumn(c);
468
+ } else if (c.type === "OPagetableColumnNumber") {
469
+ return renderNumberColumn(c);
470
+ } else if (c.type === "OPagetableColumnDate") {
471
+ return renderDateColumn(c);
472
+ } else if (c.type === "OPagetableColumnSingleselect") {
473
+ return renderSingleSelectColumn(c);
474
+ } else if (c.type === "OPagetableColumnMultiselect") {
475
+ return renderMultiSelectColumn(c);
476
+ } else if (c.type === "OPagetableColumnButtongroup") {
477
+ return renderButtongroupColumn(c);
478
+ } else if (c.type === "OPagetableColumngroup") {
479
+ return renderColumngroupColumn(c);
480
+ } else if (c.type === "OPagetableColumnDiy") {
481
+ return renderDiyColumn(c);
482
+ } else {
483
+ throw new OrionError(`OPagetable不能正确渲染'${c.type.name}'子组件。`);
484
+ }
485
+ });
486
+ };
487
+ return createVNode("div", {
488
+ "class": [cn, attrs.class],
489
+ "style": [style.value, attrs.style]
490
+ }, [createVNode("div", {
491
+ "class": "pagetable-wrapper"
492
+ }, [createVNode(ElTable, {
493
+ "showSummary": showSummary.value,
494
+ "summaryMethod": getSummaries,
495
+ "border": true,
496
+ "ref": elTableRef,
497
+ "data": data,
498
+ "height": "100%",
499
+ "style": {
326
500
  width: "100%"
327
501
  },
328
- "onSelection-change": (t) => s("selectionChange", t),
329
- "highlight-current-row": $,
330
- "onCurrent-change": (t, e) => s("currentRowChange", t, e),
331
- "onRow-click": (t, e, r) => s("rowClick", t, {
332
- name: e.property,
333
- head: e.label
334
- }, r),
335
- "onRow-dblclick": (t, e, r) => s("rowDblclick", t, {
336
- name: e.property,
337
- head: e.label
338
- }, r),
339
- "onCell-click": (t, e, r, i) => s("cellClick", t, {
340
- name: e.property,
341
- head: e.label
342
- }, r, i),
343
- "onCell-dblclick": (t, e, r, i) => s("cellDblclick", t, {
344
- name: e.property,
345
- head: e.label
346
- }, r, i),
347
- size: R
502
+ "onSelection-change": (rows) => emit("selectionChange", rows),
503
+ "highlight-current-row": currentRowMode,
504
+ "onCurrent-change": (currentRow, oldCurrentRow) => emit("currentRowChange", currentRow, oldCurrentRow),
505
+ "onRow-click": (row, column, event) => emit("rowClick", row, {
506
+ name: column.property,
507
+ head: column.label
508
+ }, event),
509
+ "onRow-dblclick": (row, column, event) => emit("rowDblclick", row, {
510
+ name: column.property,
511
+ head: column.label
512
+ }, event),
513
+ "onCell-click": (row, column, cell, event) => emit("cellClick", row, {
514
+ name: column.property,
515
+ head: column.label
516
+ }, cell, event),
517
+ "onCell-dblclick": (row, column, cell, event) => emit("cellDblclick", row, {
518
+ name: column.property,
519
+ head: column.label
520
+ }, cell, event),
521
+ "size": size
348
522
  }, {
349
- default: () => [L && F(), E && H(), N(k.value)]
350
- })]), l("div", {
351
- class: "pagination-wrapper"
352
- }, [l(oe, {
353
- currentPage: v.currentPage,
354
- "onUpdate:current-page": (t) => {
355
- s("update:pagination", {
356
- ...v,
357
- currentPage: t
523
+ default: () => [showRowNumber && renderIndexColumn(), selectionMode && renderSelectionColumn(), renderColumns(columns.value)]
524
+ })]), createVNode("div", {
525
+ "class": "pagination-wrapper"
526
+ }, [createVNode(ElPagination, {
527
+ "currentPage": pagination.currentPage,
528
+ "onUpdate:current-page": (e) => {
529
+ emit("update:pagination", {
530
+ ...pagination,
531
+ currentPage: e
358
532
  });
359
533
  },
360
- pageSize: v.pageSize,
361
- pageSizes: v.pageSizes,
362
- "onUpdate:page-size": (t) => {
363
- s("update:pagination", {
364
- ...v,
365
- pageSize: t
534
+ "pageSize": pagination.pageSize,
535
+ "pageSizes": pagination.pageSizes,
536
+ "onUpdate:page-size": (e) => {
537
+ emit("update:pagination", {
538
+ ...pagination,
539
+ pageSize: e
366
540
  });
367
541
  },
368
- total: v.total,
369
- layout: "total, ->, sizes, prev, pager, next, jumper",
370
- size: R
542
+ "total": pagination.total,
543
+ "layout": "total, ->, sizes, prev, pager, next, jumper",
544
+ "size": size,
545
+ "teleported": false
371
546
  }, null)])]);
372
547
  };
373
548
  }
374
- }), we = () => ({}), Ce = /* @__PURE__ */ C({
549
+ });
550
+ const pagetableColumnIndexProps = () => ({});
551
+ const PagetableColumnIndex = /* @__PURE__ */ defineComponent({
375
552
  name: "OPagetableColumnIndex",
376
- inheritAttrs: !1,
377
- props: we(),
378
- setup(o, {
379
- slots: g,
380
- attrs: h,
381
- emit: s,
382
- expose: w
553
+ inheritAttrs: false,
554
+ props: pagetableColumnIndexProps(),
555
+ setup(props, {
556
+ slots,
557
+ attrs,
558
+ emit,
559
+ expose
383
560
  }) {
384
561
  return () => null;
385
562
  }
386
- }), Se = () => ({
387
- head: n(),
388
- headAlign: n(),
389
- name: n(),
390
- width: p([Boolean, String]),
391
- fixed: p([Boolean, String])
392
- }), ye = /* @__PURE__ */ C({
563
+ });
564
+ const pagetableColumnStringProps = () => ({
565
+ head: stringType(),
566
+ headAlign: stringType(),
567
+ name: stringType(),
568
+ width: someType([Boolean, String]),
569
+ fixed: someType([Boolean, String]),
570
+ tail: someType([Boolean, String])
571
+ });
572
+ const PagetableColumnString = /* @__PURE__ */ defineComponent({
393
573
  name: "OPagetableColumnString",
394
- inheritAttrs: !1,
395
- props: Se(),
396
- setup(o, {
397
- slots: g,
398
- attrs: h,
399
- emit: s,
400
- expose: w
574
+ inheritAttrs: false,
575
+ props: pagetableColumnStringProps(),
576
+ setup(props, {
577
+ slots,
578
+ attrs,
579
+ emit,
580
+ expose
401
581
  }) {
402
582
  return () => null;
403
583
  }
404
- }), Pe = () => ({
405
- head: n(),
406
- headAlign: n(),
407
- name: n(),
408
- width: p([Boolean, String]),
409
- fixed: p([Boolean, String])
410
- }), xe = /* @__PURE__ */ C({
584
+ });
585
+ const pagetableColumnLinkProps = () => ({
586
+ head: stringType(),
587
+ headAlign: stringType(),
588
+ name: stringType(),
589
+ width: someType([Boolean, String]),
590
+ fixed: someType([Boolean, String]),
591
+ tail: someType([Boolean, String])
592
+ });
593
+ const PagetableColumnLink = /* @__PURE__ */ defineComponent({
411
594
  name: "OPagetableColumnLink",
412
- inheritAttrs: !1,
413
- props: Pe(),
414
- setup(o, {
415
- slots: g,
416
- attrs: h,
417
- emit: s,
418
- expose: w
595
+ inheritAttrs: false,
596
+ props: pagetableColumnLinkProps(),
597
+ setup(props, {
598
+ slots,
599
+ attrs,
600
+ emit,
601
+ expose
419
602
  }) {
420
603
  return () => null;
421
604
  }
422
- }), Ae = () => ({
423
- head: n(),
424
- headAlign: n(),
425
- name: n(),
426
- width: p([Boolean, String]),
427
- fixed: p([Boolean, String]),
428
- thousandsSeparator: D(!0),
429
- precision: ue(-1),
430
- percentage: D(!1)
431
- }), Oe = /* @__PURE__ */ C({
605
+ });
606
+ const pagetableColumnNumberProps = () => ({
607
+ head: stringType(),
608
+ headAlign: stringType(),
609
+ name: stringType(),
610
+ width: someType([Boolean, String]),
611
+ fixed: someType([Boolean, String]),
612
+ tail: someType([Boolean, String]),
613
+ thousandsSeparator: booleanType(true),
614
+ precision: numberType(-1),
615
+ percentage: booleanType(false)
616
+ });
617
+ const PagetableColumnNumber = /* @__PURE__ */ defineComponent({
432
618
  name: "OPagetableColumnNumber",
433
- inheritAttrs: !1,
434
- props: Ae(),
435
- setup(o, {
436
- slots: g,
437
- attrs: h,
438
- emit: s,
439
- expose: w
619
+ inheritAttrs: false,
620
+ props: pagetableColumnNumberProps(),
621
+ setup(props, {
622
+ slots,
623
+ attrs,
624
+ emit,
625
+ expose
440
626
  }) {
441
627
  return () => null;
442
628
  }
443
- }), ve = () => ({
444
- head: n(),
445
- headAlign: n(),
446
- name: n(),
447
- width: p([Boolean, String]),
448
- fixed: p([Boolean, String]),
629
+ });
630
+ const pagetableColumnDateProps = () => ({
631
+ head: stringType(),
632
+ headAlign: stringType(),
633
+ name: stringType(),
634
+ width: someType([Boolean, String]),
635
+ fixed: someType([Boolean, String]),
636
+ tail: someType([Boolean, String]),
449
637
  // Date
450
- format: n(),
451
- sourceFormat: n()
452
- }), Be = /* @__PURE__ */ C({
638
+ format: stringType(),
639
+ sourceFormat: stringType()
640
+ });
641
+ const PagetableColumnDate = /* @__PURE__ */ defineComponent({
453
642
  name: "OPagetableColumnDate",
454
- inheritAttrs: !1,
455
- props: ve(),
456
- setup(o, {
457
- slots: g,
458
- attrs: h,
459
- emit: s,
460
- expose: w
643
+ inheritAttrs: false,
644
+ props: pagetableColumnDateProps(),
645
+ setup(props, {
646
+ slots,
647
+ attrs,
648
+ emit,
649
+ expose
461
650
  }) {
462
651
  return () => null;
463
652
  }
464
- }), ke = () => ({
465
- head: n(),
466
- headAlign: n(),
467
- name: n(),
468
- width: p([Boolean, String]),
469
- fixed: p([Boolean, String]),
470
- code: p([String, Array])
471
- }), De = /* @__PURE__ */ C({
653
+ });
654
+ const pagetableColumnSingleselectProps = () => ({
655
+ head: stringType(),
656
+ headAlign: stringType(),
657
+ name: stringType(),
658
+ width: someType([Boolean, String]),
659
+ fixed: someType([Boolean, String]),
660
+ tail: someType([Boolean, String]),
661
+ code: someType([String, Array])
662
+ });
663
+ const PagetableColumnSingleselect = /* @__PURE__ */ defineComponent({
472
664
  name: "OPagetableColumnSingleselect",
473
- inheritAttrs: !1,
474
- props: ke(),
475
- setup(o, {
476
- slots: g,
477
- attrs: h,
478
- emit: s,
479
- expose: w
665
+ inheritAttrs: false,
666
+ props: pagetableColumnSingleselectProps(),
667
+ setup(props, {
668
+ slots,
669
+ attrs,
670
+ emit,
671
+ expose
480
672
  }) {
481
673
  return () => null;
482
674
  }
483
- }), Te = () => ({
484
- head: n(),
485
- headAlign: n(),
486
- name: n(),
487
- width: p([Boolean, String]),
488
- fixed: p([Boolean, String]),
489
- code: p([String, Array])
490
- }), Re = /* @__PURE__ */ C({
675
+ });
676
+ const pagetableColumnMultiselectProps = () => ({
677
+ head: stringType(),
678
+ headAlign: stringType(),
679
+ name: stringType(),
680
+ width: someType([Boolean, String]),
681
+ fixed: someType([Boolean, String]),
682
+ tail: someType([Boolean, String]),
683
+ code: someType([String, Array])
684
+ });
685
+ const PagetableColumnMultiselect = /* @__PURE__ */ defineComponent({
491
686
  name: "OPagetableColumnMultiselect",
492
- inheritAttrs: !1,
493
- props: Te(),
494
- setup(o, {
495
- slots: g,
496
- attrs: h,
497
- emit: s,
498
- expose: w
687
+ inheritAttrs: false,
688
+ props: pagetableColumnMultiselectProps(),
689
+ setup(props, {
690
+ slots,
691
+ attrs,
692
+ emit,
693
+ expose
499
694
  }) {
500
695
  return () => null;
501
696
  }
502
- }), Ne = () => ({
503
- head: n(),
504
- headAlign: n(),
505
- name: n(),
506
- width: p([Boolean, String]),
507
- fixed: p([Boolean, String])
508
- }), ze = /* @__PURE__ */ C({
697
+ });
698
+ const pagetableColumnButtongroupProps = () => ({
699
+ head: stringType(),
700
+ headAlign: stringType(),
701
+ name: stringType(),
702
+ width: someType([Boolean, String]),
703
+ fixed: someType([Boolean, String]),
704
+ tail: someType([Boolean, String])
705
+ });
706
+ const PagetableColumnButtongroup = /* @__PURE__ */ defineComponent({
509
707
  name: "OPagetableColumnButtongroup",
510
- inheritAttrs: !1,
511
- props: Ne(),
708
+ inheritAttrs: false,
709
+ props: pagetableColumnButtongroupProps(),
512
710
  slots: Object,
513
- setup(o, {
514
- slots: g,
515
- attrs: h,
516
- emit: s,
517
- expose: w
711
+ setup(props, {
712
+ slots,
713
+ attrs,
714
+ emit,
715
+ expose
518
716
  }) {
519
717
  return () => null;
520
718
  }
521
719
  });
522
- function je(o) {
523
- return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !V(o);
720
+ function _isSlot(s) {
721
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
524
722
  }
525
- const Me = () => ({
526
- type: n()
527
- }), Ie = /* @__PURE__ */ C({
723
+ const pagetableCellButtonProps = () => ({
724
+ type: stringType()
725
+ });
726
+ const PagetableCellButton = /* @__PURE__ */ defineComponent({
528
727
  name: "OPagetableCellButton",
529
- inheritAttrs: !1,
530
- props: Me(),
728
+ inheritAttrs: false,
729
+ props: pagetableCellButtonProps(),
531
730
  emits: ["click"],
532
- setup(o, {
533
- slots: g,
534
- attrs: h,
535
- emit: s,
536
- expose: w
731
+ setup(props, {
732
+ slots,
733
+ attrs,
734
+ emit,
735
+ expose
537
736
  }) {
538
- const y = (B) => {
539
- s("click", B);
737
+ const handleClick = (event) => {
738
+ emit("click", event);
540
739
  };
541
740
  return () => {
542
- var T;
741
+ var _a;
543
742
  const {
544
- type: B
545
- } = o, k = (T = g.default) == null ? void 0 : T.call(g);
546
- return l(re, {
547
- link: !0,
548
- type: B,
549
- size: "small",
550
- onClick: y
551
- }, je(k) ? k : {
552
- default: () => [k]
743
+ type
744
+ } = props;
745
+ const children = (_a = slots.default) == null ? void 0 : _a.call(slots);
746
+ return createVNode(ElButton, {
747
+ "link": true,
748
+ "type": type,
749
+ "size": "small",
750
+ "onClick": handleClick
751
+ }, _isSlot(children) ? children : {
752
+ default: () => [children]
553
753
  });
554
754
  };
555
755
  }
556
- }), Ve = () => ({
557
- head: n(),
558
- headAlign: n()
559
- }), Ee = /* @__PURE__ */ C({
756
+ });
757
+ const pagetableColumngroupProps = () => ({
758
+ head: stringType(),
759
+ headAlign: stringType()
760
+ });
761
+ const PagetableColumngroup = /* @__PURE__ */ defineComponent({
560
762
  name: "OPagetableColumngroup",
561
- inheritAttrs: !1,
562
- props: Ve(),
563
- setup(o, {
564
- slots: g,
565
- attrs: h,
566
- emit: s,
567
- expose: w
763
+ inheritAttrs: false,
764
+ props: pagetableColumngroupProps(),
765
+ setup(props, {
766
+ slots,
767
+ attrs,
768
+ emit,
769
+ expose
568
770
  }) {
569
771
  return () => null;
570
772
  }
571
- }), Le = () => ({
572
- head: n(),
573
- headAlign: n(),
574
- name: n(),
575
- width: p([Boolean, String]),
576
- fixed: p([Boolean, String])
577
- }), $e = /* @__PURE__ */ C({
773
+ });
774
+ const pagetableColumnDiyProps = () => ({
775
+ head: stringType(),
776
+ headAlign: stringType(),
777
+ name: stringType(),
778
+ width: someType([Boolean, String]),
779
+ fixed: someType([Boolean, String]),
780
+ tail: someType([Boolean, String])
781
+ });
782
+ const PagetableColumnDiy = /* @__PURE__ */ defineComponent({
578
783
  name: "OPagetableColumnDiy",
579
- inheritAttrs: !1,
580
- props: Le(),
784
+ inheritAttrs: false,
785
+ props: pagetableColumnDiyProps(),
581
786
  slots: Object,
582
- setup(o, {
583
- slots: g,
584
- attrs: h,
585
- emit: s,
586
- expose: w
787
+ setup(props, {
788
+ slots,
789
+ attrs,
790
+ emit,
791
+ expose
587
792
  }) {
588
793
  return () => null;
589
794
  }
590
- }), ot = ne(be, {
591
- PagetableColumnIndex: Ce,
592
- PagetableColumnString: ye,
593
- PagetableColumnLink: xe,
594
- PagetableColumnNumber: Oe,
595
- PagetableColumnDate: Be,
596
- PagetableColumnSingleselect: De,
597
- PagetableColumnMultiselect: Re,
598
- PagetableColumnButtongroup: ze,
599
- PagetableCellButton: Ie,
600
- PagetableColumngroup: Ee,
601
- PagetableColumnDiy: $e
795
+ });
796
+ const Pagetable = withInstall(Pagetable$1, {
797
+ PagetableColumnIndex,
798
+ PagetableColumnString,
799
+ PagetableColumnLink,
800
+ PagetableColumnNumber,
801
+ PagetableColumnDate,
802
+ PagetableColumnSingleselect,
803
+ PagetableColumnMultiselect,
804
+ PagetableColumnButtongroup,
805
+ PagetableCellButton,
806
+ PagetableColumngroup,
807
+ PagetableColumnDiy
602
808
  });
603
809
  export {
604
- ot as default
810
+ Pagetable as default
605
811
  };
606
812
  //# sourceMappingURL=index.js.map