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