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