orion-design 0.1.32 → 0.1.34

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