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