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