orion-design 0.1.30 → 0.1.31

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