view-ui-plus-derive 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/index.d.ts +22 -101
- package/dist/index.js +512 -566
- package/dist/iview-mods/index.d.ts +3 -3
- package/dist/locale/en-US.js +1 -1
- package/dist/locale/index.d.ts +4 -3
- package/dist/locale/zh-CN.js +1 -1
- package/dist/style.js +1 -1
- package/package.json +11 -5
package/dist/index.js
CHANGED
|
@@ -1,40 +1,33 @@
|
|
|
1
|
-
import L from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import Ne from "dayjs/plugin/isBetween";
|
|
5
|
-
import { defineComponent as U, shallowRef as ye, computed as N, onMounted as ce, watch as z, resolveComponent as O, createElementBlock as j, openBlock as V, withDirectives as se, createVNode as $, withCtx as B, createTextVNode as F, toDisplayString as I, vShow as fe, Fragment as q, renderList as ee, createBlock as H, renderSlot as M, ref as P, mergeProps as K, useSlots as Pe, createCommentVNode as W, createElementVNode as te, normalizeClass as ie, nextTick as J, unref as G, shallowReactive as De, useTemplateRef as be, normalizeProps as ke, guardReactiveProps as Se, createSlots as $e, getCurrentInstance as He, onBeforeUnmount as Oe, mergeModels as Be, useAttrs as Le, useModel as Ee, reactive as Ke } from "vue";
|
|
6
|
-
import { getPathValue as pe, setPathValue as Ue, deepMerge as Ye, makeObjectByPath as _e } from "utils-where";
|
|
7
|
-
import Ge from "./locale/zh-CN.js";
|
|
1
|
+
import { defineComponent as Y, shallowRef as ye, computed as P, onMounted as re, watch as z, resolveComponent as O, createElementBlock as N, openBlock as V, withDirectives as se, createVNode as $, withCtx as C, createTextVNode as j, toDisplayString as I, unref as F, vShow as fe, Fragment as q, renderList as ee, createBlock as L, renderSlot as R, ref as H, mergeProps as U, useSlots as Fe, createCommentVNode as W, createElementVNode as te, normalizeClass as ue, nextTick as J, shallowReactive as Ve, useTemplateRef as be, normalizeProps as ke, guardReactiveProps as Be, createSlots as De, getCurrentInstance as ze, onBeforeUnmount as $e, mergeModels as Ce, useAttrs as je, useModel as Ne, reactive as Pe } from "vue";
|
|
2
|
+
import { getPathValue as pe, setPathValue as He, deepMerge as Le, makeObjectByPath as Ee } from "utils-where";
|
|
3
|
+
import Ke from "./locale/zh-CN.js";
|
|
8
4
|
/* empty css */
|
|
9
5
|
/* empty css */
|
|
10
|
-
import { i as
|
|
6
|
+
import { i as Oe } from "./directives/v-iview-select.js";
|
|
7
|
+
import E from "dayjs";
|
|
11
8
|
/* empty css */
|
|
9
|
+
import Ue from "dayjs/plugin/isBetween";
|
|
12
10
|
/* empty css */
|
|
13
|
-
import { Checkbox as
|
|
11
|
+
import { Checkbox as Se } from "view-ui-plus";
|
|
14
12
|
/* empty css */
|
|
15
13
|
/* empty css */
|
|
16
|
-
const
|
|
14
|
+
const A = {
|
|
17
15
|
i18n: null,
|
|
18
16
|
prefix: "d",
|
|
19
|
-
msg:
|
|
20
|
-
t(t, ...
|
|
21
|
-
return
|
|
17
|
+
msg: Ke,
|
|
18
|
+
t(t, ...B) {
|
|
19
|
+
return A.i18n?.global.t(A.prefix + "." + t, ...B) ?? pe(A.msg, A.prefix + "." + t) ?? t;
|
|
22
20
|
}
|
|
23
|
-
},
|
|
21
|
+
}, Ye = {
|
|
24
22
|
name: "AllCheckbox"
|
|
25
|
-
},
|
|
26
|
-
...
|
|
23
|
+
}, _e = /* @__PURE__ */ Y({
|
|
24
|
+
...Ye,
|
|
27
25
|
props: {
|
|
28
26
|
modelValue: Array,
|
|
29
27
|
/**
|
|
30
28
|
* 全选框显示文本,默认“全选”
|
|
31
29
|
*/
|
|
32
|
-
title:
|
|
33
|
-
type: String,
|
|
34
|
-
default() {
|
|
35
|
-
return R.t("allCheckbox.title");
|
|
36
|
-
}
|
|
37
|
-
},
|
|
30
|
+
title: String,
|
|
38
31
|
/**
|
|
39
32
|
* 选项数组,数组成员可以是数组或对象
|
|
40
33
|
*/
|
|
@@ -78,38 +71,38 @@ const R = {
|
|
|
78
71
|
all: Boolean
|
|
79
72
|
},
|
|
80
73
|
emits: ["update:modelValue", "update:all", "change"],
|
|
81
|
-
setup(t, { emit:
|
|
82
|
-
const e = t, l =
|
|
74
|
+
setup(t, { emit: B }) {
|
|
75
|
+
const e = t, l = B, a = ye(e.modelValue || []), n = P({
|
|
83
76
|
get() {
|
|
84
77
|
return a.value.length === e.list.length;
|
|
85
78
|
},
|
|
86
|
-
set(
|
|
87
|
-
a.value =
|
|
79
|
+
set(r) {
|
|
80
|
+
a.value = r ? e.list.map((v) => v[e.keyMap.value]) : [];
|
|
88
81
|
}
|
|
89
|
-
}),
|
|
82
|
+
}), u = P(
|
|
90
83
|
() => a.value.length > 0 && a.value.length < e.list.length
|
|
91
84
|
);
|
|
92
85
|
function h() {
|
|
93
86
|
l("update:modelValue", a.value), l("update:all", n.value), l("change", a.value, n.value);
|
|
94
87
|
}
|
|
95
|
-
return
|
|
88
|
+
return re(() => {
|
|
96
89
|
l("update:all", n.value);
|
|
97
90
|
}), z(
|
|
98
91
|
() => e.modelValue,
|
|
99
|
-
(
|
|
100
|
-
a.value !==
|
|
92
|
+
(r) => {
|
|
93
|
+
a.value !== r && (a.value = r || [], l("update:all", n.value));
|
|
101
94
|
}
|
|
102
|
-
), (
|
|
95
|
+
), (r, v) => {
|
|
103
96
|
const f = O("Checkbox"), g = O("CheckboxGroup");
|
|
104
|
-
return V(),
|
|
97
|
+
return V(), N("div", null, [
|
|
105
98
|
se($(f, {
|
|
106
99
|
modelValue: n.value,
|
|
107
100
|
"onUpdate:modelValue": v[0] || (v[0] = (y) => n.value = y),
|
|
108
|
-
indeterminate:
|
|
101
|
+
indeterminate: u.value,
|
|
109
102
|
onOnChange: h
|
|
110
103
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
|
|
104
|
+
default: C(() => [
|
|
105
|
+
j(I(t.title ?? F(A).t("allCheckbox.title")), 1)
|
|
113
106
|
]),
|
|
114
107
|
_: 1
|
|
115
108
|
}, 8, ["modelValue", "indeterminate"]), [
|
|
@@ -121,14 +114,14 @@ const R = {
|
|
|
121
114
|
class: "ivu-inline-block",
|
|
122
115
|
onOnChange: h
|
|
123
116
|
}, {
|
|
124
|
-
default:
|
|
125
|
-
(V(!0),
|
|
117
|
+
default: C(() => [
|
|
118
|
+
(V(!0), N(q, null, ee(t.list, (y) => (V(), L(f, {
|
|
126
119
|
key: y[t.keyMap.value],
|
|
127
120
|
label: y[t.keyMap.value]
|
|
128
121
|
}, {
|
|
129
|
-
default:
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
default: C(() => [
|
|
123
|
+
R(r.$slots, "default", { item: y }, () => [
|
|
124
|
+
j(I(y[t.keyMap.label]), 1)
|
|
132
125
|
])
|
|
133
126
|
]),
|
|
134
127
|
_: 2
|
|
@@ -139,10 +132,10 @@ const R = {
|
|
|
139
132
|
]);
|
|
140
133
|
};
|
|
141
134
|
}
|
|
142
|
-
}),
|
|
135
|
+
}), Ge = {
|
|
143
136
|
name: "BaseSwitch"
|
|
144
|
-
},
|
|
145
|
-
...
|
|
137
|
+
}, Je = /* @__PURE__ */ Y({
|
|
138
|
+
...Ge,
|
|
146
139
|
props: {
|
|
147
140
|
modelValue: [String, Number, Boolean],
|
|
148
141
|
/**
|
|
@@ -169,49 +162,49 @@ const R = {
|
|
|
169
162
|
falseLabel: String
|
|
170
163
|
},
|
|
171
164
|
emits: ["update:modelValue", "change"],
|
|
172
|
-
setup(t, { emit:
|
|
173
|
-
const e = t, l =
|
|
174
|
-
l("update:modelValue",
|
|
165
|
+
setup(t, { emit: B }) {
|
|
166
|
+
const e = t, l = B, a = H(e.modelValue), n = (u) => {
|
|
167
|
+
l("update:modelValue", u), l("change", u);
|
|
175
168
|
};
|
|
176
169
|
return z(
|
|
177
170
|
() => e.modelValue,
|
|
178
|
-
(
|
|
179
|
-
a.value !==
|
|
171
|
+
(u) => {
|
|
172
|
+
a.value !== u && (a.value = u);
|
|
180
173
|
}
|
|
181
|
-
), (
|
|
182
|
-
const
|
|
183
|
-
return V(),
|
|
174
|
+
), (u, h) => {
|
|
175
|
+
const r = O("Switch");
|
|
176
|
+
return V(), L(r, U({
|
|
184
177
|
modelValue: a.value,
|
|
185
178
|
"onUpdate:modelValue": h[0] || (h[0] = (v) => a.value = v),
|
|
186
179
|
onOnChange: n
|
|
187
|
-
},
|
|
180
|
+
}, u.$attrs, {
|
|
188
181
|
trueValue: t.trueValue,
|
|
189
182
|
falseValue: t.falseValue
|
|
190
183
|
}), {
|
|
191
|
-
open:
|
|
192
|
-
|
|
193
|
-
|
|
184
|
+
open: C(() => [
|
|
185
|
+
R(u.$slots, "open", {}, () => [
|
|
186
|
+
j(I(t.trueLabel), 1)
|
|
194
187
|
])
|
|
195
188
|
]),
|
|
196
|
-
close:
|
|
197
|
-
|
|
198
|
-
|
|
189
|
+
close: C(() => [
|
|
190
|
+
R(u.$slots, "close", {}, () => [
|
|
191
|
+
j(I(t.falseLabel), 1)
|
|
199
192
|
])
|
|
200
193
|
]),
|
|
201
194
|
_: 3
|
|
202
195
|
}, 16, ["modelValue", "trueValue", "falseValue"]);
|
|
203
196
|
};
|
|
204
197
|
}
|
|
205
|
-
}),
|
|
198
|
+
}), We = { class: "combi ivu-input-group" }, qe = {
|
|
206
199
|
key: 0,
|
|
207
200
|
class: "ivu-input-group-prepend"
|
|
208
|
-
},
|
|
201
|
+
}, Qe = {
|
|
209
202
|
key: 1,
|
|
210
203
|
class: "ivu-input-group-append"
|
|
211
|
-
},
|
|
204
|
+
}, Xe = {
|
|
212
205
|
name: "Combi"
|
|
213
|
-
},
|
|
214
|
-
...
|
|
206
|
+
}, Ze = /* @__PURE__ */ Y({
|
|
207
|
+
...Xe,
|
|
215
208
|
props: {
|
|
216
209
|
/**
|
|
217
210
|
* 前置文本
|
|
@@ -223,29 +216,29 @@ const R = {
|
|
|
223
216
|
append: String
|
|
224
217
|
},
|
|
225
218
|
setup(t) {
|
|
226
|
-
const
|
|
227
|
-
return (n,
|
|
228
|
-
l.value ? (V(),
|
|
229
|
-
|
|
230
|
-
|
|
219
|
+
const B = Fe(), e = t, l = P(() => !!e.prepend || !!B.prepend?.().length), a = P(() => !!e.append || !!B.append?.().length);
|
|
220
|
+
return (n, u) => (V(), N("div", We, [
|
|
221
|
+
l.value ? (V(), N("div", qe, [
|
|
222
|
+
R(n.$slots, "prepend", {}, () => [
|
|
223
|
+
j(I(t.prepend), 1)
|
|
231
224
|
])
|
|
232
225
|
])) : W("", !0),
|
|
233
226
|
te("div", {
|
|
234
|
-
class:
|
|
227
|
+
class: ue(["combi-cell", { "with-append": a.value, "with-prepend": l.value }])
|
|
235
228
|
}, [
|
|
236
|
-
|
|
229
|
+
R(n.$slots, "default")
|
|
237
230
|
], 2),
|
|
238
|
-
a.value ? (V(),
|
|
239
|
-
|
|
240
|
-
|
|
231
|
+
a.value ? (V(), N("div", Qe, [
|
|
232
|
+
R(n.$slots, "append", {}, () => [
|
|
233
|
+
j(I(t.append), 1)
|
|
241
234
|
])
|
|
242
235
|
])) : W("", !0)
|
|
243
236
|
]));
|
|
244
237
|
}
|
|
245
|
-
}),
|
|
238
|
+
}), et = { class: "count-range" }, tt = {
|
|
246
239
|
name: "CountRange"
|
|
247
|
-
},
|
|
248
|
-
...
|
|
240
|
+
}, at = /* @__PURE__ */ Y({
|
|
241
|
+
...tt,
|
|
249
242
|
props: {
|
|
250
243
|
/**
|
|
251
244
|
* 双向绑定最小值
|
|
@@ -298,21 +291,11 @@ const R = {
|
|
|
298
291
|
/**
|
|
299
292
|
* 最小值占位文本
|
|
300
293
|
*/
|
|
301
|
-
minHolder:
|
|
302
|
-
type: String,
|
|
303
|
-
default() {
|
|
304
|
-
return R.t("countRange.minHolder");
|
|
305
|
-
}
|
|
306
|
-
},
|
|
294
|
+
minHolder: String,
|
|
307
295
|
/**
|
|
308
296
|
* 最大值占位文本
|
|
309
297
|
*/
|
|
310
|
-
maxHolder:
|
|
311
|
-
type: String,
|
|
312
|
-
default() {
|
|
313
|
-
return R.t("countRange.maxHolder");
|
|
314
|
-
}
|
|
315
|
-
},
|
|
298
|
+
maxHolder: String,
|
|
316
299
|
controlsOutside: Boolean,
|
|
317
300
|
step: Number,
|
|
318
301
|
readonly: Boolean,
|
|
@@ -345,11 +328,11 @@ const R = {
|
|
|
345
328
|
hideJoiner: Boolean
|
|
346
329
|
},
|
|
347
330
|
emits: ["update:begin", "update:end", "change-min", "change-max", "change"],
|
|
348
|
-
setup(t, { emit:
|
|
349
|
-
const e = t, l =
|
|
331
|
+
setup(t, { emit: B }) {
|
|
332
|
+
const e = t, l = B, a = H(e.begin), n = H(e.end), u = P(() => ({
|
|
350
333
|
min: e.min,
|
|
351
334
|
max: e.max,
|
|
352
|
-
placeholder: e.minHolder,
|
|
335
|
+
placeholder: e.minHolder ?? A.t("countRange.minHolder"),
|
|
353
336
|
disabled: e.disabled || e.minDisabled,
|
|
354
337
|
class: e.minClass,
|
|
355
338
|
controlsOutside: e.controlsOutside,
|
|
@@ -361,10 +344,10 @@ const R = {
|
|
|
361
344
|
parser: e.parser,
|
|
362
345
|
activeChange: e.activeChange,
|
|
363
346
|
...e.minAttr
|
|
364
|
-
})), h =
|
|
347
|
+
})), h = P(() => ({
|
|
365
348
|
min: a.value,
|
|
366
349
|
max: e.max,
|
|
367
|
-
placeholder: e.maxHolder,
|
|
350
|
+
placeholder: e.maxHolder ?? A.t("countRange.maxHolder"),
|
|
368
351
|
disabled: e.disabled || e.maxDisabled,
|
|
369
352
|
class: e.maxClass,
|
|
370
353
|
controlsOutside: e.controlsOutside,
|
|
@@ -376,12 +359,12 @@ const R = {
|
|
|
376
359
|
parser: e.parser,
|
|
377
360
|
activeChange: a.value ? !1 : e.activeChange,
|
|
378
361
|
...e.maxAttr
|
|
379
|
-
})),
|
|
362
|
+
})), r = () => {
|
|
380
363
|
l("update:begin", a.value), l("update:end", n.value);
|
|
381
364
|
}, v = (s) => {
|
|
382
|
-
n.value != null && s > n.value && (n.value = s + 1 > h.value.max ? h.value.max : s + 1),
|
|
365
|
+
n.value != null && s > n.value && (n.value = s + 1 > h.value.max ? h.value.max : s + 1), r(), l("change-min", s), l("change", s, n.value, !1);
|
|
383
366
|
}, f = (s) => {
|
|
384
|
-
|
|
367
|
+
r(), l("change-max", s), l("change", a.value, s, !0);
|
|
385
368
|
}, g = (s) => {
|
|
386
369
|
a.value !== s && (a.value = s !== void 0 ? s : null);
|
|
387
370
|
}, y = (s) => {
|
|
@@ -389,28 +372,28 @@ const R = {
|
|
|
389
372
|
};
|
|
390
373
|
return z(() => e.begin, g), z(() => e.end, y), (s, k) => {
|
|
391
374
|
const x = O("InputNumber");
|
|
392
|
-
return V(),
|
|
393
|
-
$(x,
|
|
375
|
+
return V(), N("div", et, [
|
|
376
|
+
$(x, U({
|
|
394
377
|
modelValue: a.value,
|
|
395
378
|
"onUpdate:modelValue": k[0] || (k[0] = (o) => a.value = o)
|
|
396
|
-
},
|
|
379
|
+
}, u.value, { onOnChange: v }), null, 16, ["modelValue"]),
|
|
397
380
|
se(te("span", {
|
|
398
|
-
class:
|
|
381
|
+
class: ue(["count-range-joiner", t.joinerClass])
|
|
399
382
|
}, null, 2), [
|
|
400
383
|
[fe, !t.hideJoiner]
|
|
401
384
|
]),
|
|
402
|
-
$(x,
|
|
385
|
+
$(x, U({
|
|
403
386
|
modelValue: n.value,
|
|
404
387
|
"onUpdate:modelValue": k[1] || (k[1] = (o) => n.value = o)
|
|
405
388
|
}, h.value, { onOnChange: f }), null, 16, ["modelValue"])
|
|
406
389
|
]);
|
|
407
390
|
};
|
|
408
391
|
}
|
|
409
|
-
}),
|
|
392
|
+
}), lt = { key: 1 }, nt = {
|
|
410
393
|
name: "RemoteSelect",
|
|
411
394
|
inheritAttrs: !1
|
|
412
|
-
},
|
|
413
|
-
...
|
|
395
|
+
}, xe = /* @__PURE__ */ Y({
|
|
396
|
+
...nt,
|
|
414
397
|
props: {
|
|
415
398
|
modelValue: [String, Array, Number],
|
|
416
399
|
list: Array,
|
|
@@ -479,11 +462,11 @@ const R = {
|
|
|
479
462
|
type: Function,
|
|
480
463
|
default({
|
|
481
464
|
multiple: t,
|
|
482
|
-
keyMap:
|
|
465
|
+
keyMap: B,
|
|
483
466
|
list: e,
|
|
484
467
|
value: l
|
|
485
468
|
}) {
|
|
486
|
-
return t ? e.filter((a) => l.includes(a[
|
|
469
|
+
return t ? e.filter((a) => l.includes(a[B.value])) : e.find((a) => a[B.value] === l) || {};
|
|
487
470
|
}
|
|
488
471
|
},
|
|
489
472
|
/**
|
|
@@ -501,12 +484,12 @@ const R = {
|
|
|
501
484
|
}
|
|
502
485
|
},
|
|
503
486
|
emits: ["update:modelValue", "update:chosen", "update:list", "update:refresh", "load"],
|
|
504
|
-
setup(t, { expose:
|
|
505
|
-
const l = t, a = e, n =
|
|
506
|
-
() =>
|
|
487
|
+
setup(t, { expose: B, emit: e }) {
|
|
488
|
+
const l = t, a = e, n = H(l.modelValue || ""), u = H([]), h = H(!1), r = H({}), v = P(
|
|
489
|
+
() => r.value && Object.keys(r.value).length > 0 ? typeof l.textFormat != "function" ? l.multiple ? r.value.map(
|
|
507
490
|
(d) => `${d[l.keyMap.label]}${d[l.keyMap.value] ? "(" + d[l.keyMap.value] + ")" : ""}`
|
|
508
|
-
).join(",") : `${
|
|
509
|
-
), f =
|
|
491
|
+
).join(",") : `${r.value[l.keyMap.label]}${r.value[l.keyMap.value] ? "(" + r.value[l.keyMap.value] + ")" : ""}` : l.textFormat(r.value) : ""
|
|
492
|
+
), f = H(!1);
|
|
510
493
|
let g, y, s, k;
|
|
511
494
|
async function x() {
|
|
512
495
|
let d;
|
|
@@ -516,24 +499,24 @@ const R = {
|
|
|
516
499
|
return;
|
|
517
500
|
}
|
|
518
501
|
if (h.value = !0, d = await l.method(typeof l.param != "function" ? l.param : l.param()), h.value = !1, d && typeof l.process == "function") {
|
|
519
|
-
const
|
|
520
|
-
|
|
502
|
+
const S = l.process(d);
|
|
503
|
+
S != null && (d = S);
|
|
521
504
|
}
|
|
522
505
|
} else
|
|
523
506
|
h.value = !0, d = await l.loader(), h.value = !1;
|
|
524
|
-
d && (f.value = !0,
|
|
507
|
+
d && (f.value = !0, u.value = d, a("update:list", d), D() && o(n.value), g = !0, J(() => {
|
|
525
508
|
g = null;
|
|
526
509
|
}), a("load", d));
|
|
527
510
|
}
|
|
528
511
|
function o(d) {
|
|
529
512
|
y = !0, J(() => {
|
|
530
513
|
y = null;
|
|
531
|
-
}), s && (l.multiple ? !d.toString().length : d === void 0) && (n.value = d = s),
|
|
514
|
+
}), s && (l.multiple ? !d.toString().length : d === void 0) && (n.value = d = s), r.value = l.getSelected({
|
|
532
515
|
multiple: l.multiple,
|
|
533
516
|
keyMap: l.keyMap,
|
|
534
|
-
list:
|
|
517
|
+
list: u.value,
|
|
535
518
|
value: n.value
|
|
536
|
-
}), a("update:modelValue", d || ""), a("update:chosen",
|
|
519
|
+
}), a("update:modelValue", d || ""), a("update:chosen", r.value);
|
|
537
520
|
}
|
|
538
521
|
function b(d) {
|
|
539
522
|
d && !l.autoGet && !h.value && !f.value && l.check() && (!l.strict || l.parentCode) && x();
|
|
@@ -541,18 +524,18 @@ const R = {
|
|
|
541
524
|
function D() {
|
|
542
525
|
return n.value != null && n.value.toString().length > 0;
|
|
543
526
|
}
|
|
544
|
-
return a("update:refresh", x),
|
|
545
|
-
l.autoGet ? x() : D() && !
|
|
546
|
-
}),
|
|
527
|
+
return a("update:refresh", x), re(() => {
|
|
528
|
+
l.autoGet ? x() : D() && !u.value.length && b(!0);
|
|
529
|
+
}), B({
|
|
547
530
|
code: n,
|
|
548
531
|
changeCode: o,
|
|
549
532
|
loaded: f,
|
|
550
|
-
codes:
|
|
533
|
+
codes: u,
|
|
551
534
|
search: x
|
|
552
535
|
}), z(
|
|
553
536
|
() => l.list,
|
|
554
537
|
(d) => {
|
|
555
|
-
g || (d && d.length ? (
|
|
538
|
+
g || (d && d.length ? (u.value = d, f.value = !!l.cache) : (u.value = [], f.value = !1));
|
|
556
539
|
},
|
|
557
540
|
{ immediate: !0 }
|
|
558
541
|
), z(
|
|
@@ -562,7 +545,7 @@ const R = {
|
|
|
562
545
|
k = null;
|
|
563
546
|
}), n.value = d || "", D())) {
|
|
564
547
|
if (o(n.value), l.refresh === x) return;
|
|
565
|
-
for (const
|
|
548
|
+
for (const S in r.value)
|
|
566
549
|
return;
|
|
567
550
|
b(!0);
|
|
568
551
|
}
|
|
@@ -572,19 +555,19 @@ const R = {
|
|
|
572
555
|
(d) => {
|
|
573
556
|
k ? (s = l.modelValue, setTimeout(() => {
|
|
574
557
|
s = null;
|
|
575
|
-
})) : n.value = l.multiple ? [] : "",
|
|
558
|
+
})) : n.value = l.multiple ? [] : "", u.value = [], f.value = !1, a("update:list", u.value), D() && d && /* !this.opening && */
|
|
576
559
|
b(!0);
|
|
577
560
|
}
|
|
578
|
-
), (d,
|
|
579
|
-
const
|
|
580
|
-
return t.textMode ? (V(),
|
|
581
|
-
|
|
582
|
-
|
|
561
|
+
), (d, S) => {
|
|
562
|
+
const i = O("Option"), c = O("Select");
|
|
563
|
+
return t.textMode ? (V(), N("span", lt, [
|
|
564
|
+
R(d.$slots, "text", { text: v.value }, () => [
|
|
565
|
+
j(I(v.value), 1)
|
|
583
566
|
])
|
|
584
|
-
])) : se((V(),
|
|
567
|
+
])) : se((V(), L(c, U({
|
|
585
568
|
key: 0,
|
|
586
569
|
modelValue: n.value,
|
|
587
|
-
"onUpdate:modelValue":
|
|
570
|
+
"onUpdate:modelValue": S[0] || (S[0] = (M) => n.value = M),
|
|
588
571
|
onOnOpenChange: b,
|
|
589
572
|
onOnChange: o
|
|
590
573
|
}, d.$attrs, {
|
|
@@ -592,23 +575,23 @@ const R = {
|
|
|
592
575
|
loading: h.value,
|
|
593
576
|
"not-found-text": h.value ? null : void 0
|
|
594
577
|
}), {
|
|
595
|
-
default:
|
|
596
|
-
|
|
597
|
-
(V(!0),
|
|
598
|
-
key: l.valueAsKey ?
|
|
599
|
-
value:
|
|
600
|
-
label: t.formatLabel && t.formatLabel(
|
|
601
|
-
disabled: t.optionDisabled && t.optionDisabled(
|
|
602
|
-
tag: t.optionTag && t.optionTag(
|
|
578
|
+
default: C(() => [
|
|
579
|
+
R(d.$slots, "dropdown", { list: u.value }, () => [
|
|
580
|
+
(V(!0), N(q, null, ee(u.value, (M, _) => (V(), L(i, {
|
|
581
|
+
key: l.valueAsKey ? M[t.keyMap.value] : _,
|
|
582
|
+
value: M[t.keyMap.value],
|
|
583
|
+
label: t.formatLabel && t.formatLabel(M, _),
|
|
584
|
+
disabled: t.optionDisabled && t.optionDisabled(M, _),
|
|
585
|
+
tag: t.optionTag && t.optionTag(M, _)
|
|
603
586
|
}, {
|
|
604
|
-
default:
|
|
605
|
-
|
|
606
|
-
item:
|
|
607
|
-
index:
|
|
587
|
+
default: C(() => [
|
|
588
|
+
R(d.$slots, "default", {
|
|
589
|
+
item: M,
|
|
590
|
+
index: _
|
|
608
591
|
}, () => [
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
592
|
+
j(I(M[t.keyMap.label]), 1),
|
|
593
|
+
M[t.keyMap.value] ? (V(), N(q, { key: 0 }, [
|
|
594
|
+
j("(" + I(M[t.keyMap.value]) + ")", 1)
|
|
612
595
|
], 64)) : W("", !0)
|
|
613
596
|
])
|
|
614
597
|
]),
|
|
@@ -618,21 +601,21 @@ const R = {
|
|
|
618
601
|
]),
|
|
619
602
|
_: 3
|
|
620
603
|
}, 16, ["modelValue", "multiple", "loading", "not-found-text"])), [
|
|
621
|
-
[
|
|
604
|
+
[F(Oe), t.all, "all"]
|
|
622
605
|
]);
|
|
623
606
|
};
|
|
624
607
|
}
|
|
625
608
|
}), he = {
|
|
626
609
|
list: null
|
|
627
|
-
}, ne =
|
|
610
|
+
}, ne = Ve({}), oe = {
|
|
628
611
|
list: []
|
|
629
|
-
},
|
|
612
|
+
}, ie = {
|
|
630
613
|
list: []
|
|
631
|
-
}, ve = {},
|
|
614
|
+
}, ve = {}, ot = {
|
|
632
615
|
name: "CacheSelect",
|
|
633
616
|
inheritAttrs: !1
|
|
634
|
-
},
|
|
635
|
-
...
|
|
617
|
+
}, it = /* @__PURE__ */ Y({
|
|
618
|
+
...ot,
|
|
636
619
|
props: {
|
|
637
620
|
modelValue: [String, Array, Number],
|
|
638
621
|
/**
|
|
@@ -644,25 +627,25 @@ const R = {
|
|
|
644
627
|
}
|
|
645
628
|
},
|
|
646
629
|
emits: ["update:modelValue", "update:chosen", "update:list", "load", "change"],
|
|
647
|
-
setup(t, { emit:
|
|
648
|
-
const e = t, l =
|
|
630
|
+
setup(t, { emit: B }) {
|
|
631
|
+
const e = t, l = B, a = H(""), n = be("sel"), u = (v) => {
|
|
649
632
|
l("update:modelValue", v), l("change", v);
|
|
650
633
|
}, h = (v) => {
|
|
651
634
|
J(() => {
|
|
652
635
|
oe[e.cacheId] && (oe[e.cacheId].forEach((f) => {
|
|
653
636
|
f.changeCode(f.code);
|
|
654
|
-
}), oe[e.cacheId] = []),
|
|
637
|
+
}), oe[e.cacheId] = []), ie[e.cacheId] && (ie[e.cacheId].forEach((f) => {
|
|
655
638
|
f !== n.value && f.$emit("update:list", f.codes);
|
|
656
|
-
}),
|
|
639
|
+
}), ie[e.cacheId] = []);
|
|
657
640
|
}), l("load", v);
|
|
658
|
-
},
|
|
641
|
+
}, r = () => a.value != null && a.value.toString().length > 0;
|
|
659
642
|
return z(
|
|
660
643
|
() => e.modelValue,
|
|
661
644
|
(v) => {
|
|
662
645
|
a.value !== v && (a.value = v || "");
|
|
663
646
|
}
|
|
664
|
-
), ne[e.cacheId] || (ne[e.cacheId] = [], he[e.cacheId] = null),
|
|
665
|
-
ne[e.cacheId].length && (n.value.loaded = !0), e.modelValue && (a.value = e.modelValue), he[e.cacheId] ? (
|
|
647
|
+
), ne[e.cacheId] || (ne[e.cacheId] = [], he[e.cacheId] = null), re(() => {
|
|
648
|
+
ne[e.cacheId].length && (n.value.loaded = !0), e.modelValue && (a.value = e.modelValue), he[e.cacheId] ? (r() && (oe[e.cacheId] || (oe[e.cacheId] = []), oe[e.cacheId].push(n.value)), n.value.loaded = ve[e.cacheId]) : he[e.cacheId] = !0, ie[e.cacheId] || (ie[e.cacheId] = []), ie[e.cacheId].push(n.value), ve[e.cacheId] || (ve[e.cacheId] = r()), z(
|
|
666
649
|
() => ne[e.cacheId],
|
|
667
650
|
(v) => {
|
|
668
651
|
v.length && (n.value.loaded = !0);
|
|
@@ -671,38 +654,38 @@ const R = {
|
|
|
671
654
|
immediate: !0
|
|
672
655
|
}
|
|
673
656
|
);
|
|
674
|
-
}), (v, f) => (V(),
|
|
657
|
+
}), (v, f) => (V(), L(xe, U({
|
|
675
658
|
ref: "sel",
|
|
676
659
|
modelValue: a.value,
|
|
677
660
|
"onUpdate:modelValue": f[0] || (f[0] = (g) => a.value = g),
|
|
678
|
-
list:
|
|
661
|
+
list: F(ne)[t.cacheId],
|
|
679
662
|
"onUpdate:list": [
|
|
680
|
-
f[1] || (f[1] = (g) =>
|
|
663
|
+
f[1] || (f[1] = (g) => F(ne)[t.cacheId] = g),
|
|
681
664
|
f[3] || (f[3] = (g) => v.$emit("update:list", g))
|
|
682
665
|
],
|
|
683
666
|
onLoad: h,
|
|
684
|
-
onOnChange:
|
|
667
|
+
onOnChange: u,
|
|
685
668
|
"onUpdate:chosen": f[2] || (f[2] = (g) => v.$emit("update:chosen", g))
|
|
686
669
|
}, v.$attrs, { cache: "" }), {
|
|
687
|
-
default:
|
|
688
|
-
|
|
670
|
+
default: C(({ item: g, index: y }) => [
|
|
671
|
+
R(v.$slots, "default", {
|
|
689
672
|
item: g,
|
|
690
673
|
index: y
|
|
691
674
|
})
|
|
692
675
|
]),
|
|
693
|
-
dropdown:
|
|
694
|
-
|
|
676
|
+
dropdown: C(({ list: g }) => [
|
|
677
|
+
R(v.$slots, "dropdown", { list: g })
|
|
695
678
|
]),
|
|
696
|
-
text:
|
|
697
|
-
|
|
679
|
+
text: C((g) => [
|
|
680
|
+
R(v.$slots, "text", ke(Be(g)))
|
|
698
681
|
]),
|
|
699
682
|
_: 3
|
|
700
683
|
}, 16, ["modelValue", "list"]));
|
|
701
684
|
}
|
|
702
|
-
}),
|
|
685
|
+
}), ut = {
|
|
703
686
|
name: "CurdTable"
|
|
704
|
-
},
|
|
705
|
-
...
|
|
687
|
+
}, st = /* @__PURE__ */ Y({
|
|
688
|
+
...ut,
|
|
706
689
|
props: {
|
|
707
690
|
modelValue: {
|
|
708
691
|
type: Array,
|
|
@@ -747,12 +730,7 @@ const R = {
|
|
|
747
730
|
/**
|
|
748
731
|
* 控制列表头文本
|
|
749
732
|
*/
|
|
750
|
-
actionText:
|
|
751
|
-
type: String,
|
|
752
|
-
default() {
|
|
753
|
-
return R.t("curdTable.actionText");
|
|
754
|
-
}
|
|
755
|
-
},
|
|
733
|
+
actionText: String,
|
|
756
734
|
/**
|
|
757
735
|
* 右侧控制列
|
|
758
736
|
*/
|
|
@@ -760,7 +738,7 @@ const R = {
|
|
|
760
738
|
type: Object,
|
|
761
739
|
default(t) {
|
|
762
740
|
return {
|
|
763
|
-
title:
|
|
741
|
+
// title: props.actionText,
|
|
764
742
|
slot: "action",
|
|
765
743
|
width: t.actionWidth,
|
|
766
744
|
align: t.actionAlign,
|
|
@@ -820,12 +798,7 @@ const R = {
|
|
|
820
798
|
type: Object,
|
|
821
799
|
default: () => ({})
|
|
822
800
|
},
|
|
823
|
-
addText:
|
|
824
|
-
type: String,
|
|
825
|
-
default() {
|
|
826
|
-
return R.t("curdTable.addText");
|
|
827
|
-
}
|
|
828
|
-
},
|
|
801
|
+
addText: String,
|
|
829
802
|
/**
|
|
830
803
|
* 是否隐藏每行的删除按钮,通过函数返回值决定
|
|
831
804
|
*/
|
|
@@ -841,10 +814,17 @@ const R = {
|
|
|
841
814
|
}
|
|
842
815
|
},
|
|
843
816
|
emits: ["update:modelValue", "add", "remove", "change"],
|
|
844
|
-
setup(t, { emit:
|
|
845
|
-
const e = t, l =
|
|
846
|
-
() => e.disabled ? e.columns : e.columns.concat(
|
|
847
|
-
|
|
817
|
+
setup(t, { emit: B }) {
|
|
818
|
+
const e = t, l = B, a = H(e.modelValue), n = P(
|
|
819
|
+
() => e.disabled ? e.columns : e.columns.concat(
|
|
820
|
+
Object.assign(
|
|
821
|
+
{
|
|
822
|
+
title: e.actionText ?? A.t("curdTable.actionText")
|
|
823
|
+
},
|
|
824
|
+
e.actionCol
|
|
825
|
+
)
|
|
826
|
+
)
|
|
827
|
+
), u = P(() => {
|
|
848
828
|
const g = [], y = (s) => {
|
|
849
829
|
s.slot && g.push(s), s.children && s.children.forEach((k) => {
|
|
850
830
|
y(k);
|
|
@@ -855,9 +835,9 @@ const R = {
|
|
|
855
835
|
}), g;
|
|
856
836
|
});
|
|
857
837
|
function h() {
|
|
858
|
-
typeof e.beforeAdd != "function" ?
|
|
838
|
+
typeof e.beforeAdd != "function" ? r() : e.beforeAdd().then(r).catch();
|
|
859
839
|
}
|
|
860
|
-
function
|
|
840
|
+
function r(g) {
|
|
861
841
|
a.value.push(...e.addRow(g)), l("update:modelValue", a.value), l("add", a.value[a.value.length - 1]), l("change", !0);
|
|
862
842
|
}
|
|
863
843
|
function v(g) {
|
|
@@ -876,20 +856,20 @@ const R = {
|
|
|
876
856
|
}
|
|
877
857
|
), (g, y) => {
|
|
878
858
|
const s = O("Button"), k = O("Table");
|
|
879
|
-
return V(),
|
|
859
|
+
return V(), N("div", null, [
|
|
880
860
|
$(k, {
|
|
881
861
|
border: t.border,
|
|
882
862
|
columns: n.value,
|
|
883
863
|
data: a.value,
|
|
884
864
|
size: t.size,
|
|
885
865
|
style: { "z-index": "0" }
|
|
886
|
-
},
|
|
887
|
-
action:
|
|
888
|
-
|
|
866
|
+
}, De({
|
|
867
|
+
action: C(({ row: x, index: o }) => [
|
|
868
|
+
R(g.$slots, "moreAction", {
|
|
889
869
|
row: x,
|
|
890
870
|
index: o
|
|
891
871
|
}),
|
|
892
|
-
!t.hideDelBtn || !t.hideDelBtn(x, o) ? (V(),
|
|
872
|
+
!t.hideDelBtn || !t.hideDelBtn(x, o) ? (V(), L(s, U({
|
|
893
873
|
key: 0,
|
|
894
874
|
type: t.delBtnType,
|
|
895
875
|
size: t.delBtnSize,
|
|
@@ -898,22 +878,22 @@ const R = {
|
|
|
898
878
|
disabled: t.delBtnDisabled(x, o),
|
|
899
879
|
onClick: (b) => v(o)
|
|
900
880
|
}), {
|
|
901
|
-
default:
|
|
902
|
-
|
|
881
|
+
default: C(() => [
|
|
882
|
+
j(I(F(A).t("curdTable.del")), 1)
|
|
903
883
|
]),
|
|
904
884
|
_: 2
|
|
905
885
|
}, 1040, ["type", "size", "ghost", "disabled", "onClick"])) : W("", !0)
|
|
906
886
|
]),
|
|
907
887
|
_: 2
|
|
908
888
|
}, [
|
|
909
|
-
ee(
|
|
889
|
+
ee(u.value, (x) => ({
|
|
910
890
|
name: x.slot,
|
|
911
|
-
fn:
|
|
912
|
-
|
|
891
|
+
fn: C((o) => [
|
|
892
|
+
R(g.$slots, x.slot, ke(Be(o)))
|
|
913
893
|
])
|
|
914
894
|
}))
|
|
915
895
|
]), 1032, ["border", "columns", "data", "size"]),
|
|
916
|
-
t.disabled ? W("", !0) : se((V(),
|
|
896
|
+
t.disabled ? W("", !0) : se((V(), L(s, U({
|
|
917
897
|
key: 0,
|
|
918
898
|
type: t.addBtnType,
|
|
919
899
|
size: t.addBtnSize,
|
|
@@ -925,8 +905,8 @@ const R = {
|
|
|
925
905
|
style: { display: "block", position: "relative", "margin-top": "-1px" },
|
|
926
906
|
onClick: h
|
|
927
907
|
}), {
|
|
928
|
-
default:
|
|
929
|
-
|
|
908
|
+
default: C(() => [
|
|
909
|
+
j(I(t.addText ?? F(A).t("curdTable.addText")), 1)
|
|
930
910
|
]),
|
|
931
911
|
_: 1
|
|
932
912
|
}, 16, ["type", "size", "ghost", "disabled"])), [
|
|
@@ -935,10 +915,10 @@ const R = {
|
|
|
935
915
|
]);
|
|
936
916
|
};
|
|
937
917
|
}
|
|
938
|
-
}),
|
|
918
|
+
}), dt = { class: "date-range" }, ct = {
|
|
939
919
|
name: "DateRange"
|
|
940
|
-
},
|
|
941
|
-
...
|
|
920
|
+
}, rt = /* @__PURE__ */ Y({
|
|
921
|
+
...ct,
|
|
942
922
|
props: {
|
|
943
923
|
/**
|
|
944
924
|
* 双向绑定开始时间
|
|
@@ -991,21 +971,11 @@ const R = {
|
|
|
991
971
|
/**
|
|
992
972
|
* 开始时间placeholder
|
|
993
973
|
*/
|
|
994
|
-
beginHolder:
|
|
995
|
-
type: String,
|
|
996
|
-
default() {
|
|
997
|
-
return R.t("dateRange.beginHolder");
|
|
998
|
-
}
|
|
999
|
-
},
|
|
974
|
+
beginHolder: String,
|
|
1000
975
|
/**
|
|
1001
976
|
* 结束时间placeholder
|
|
1002
977
|
*/
|
|
1003
|
-
endHolder:
|
|
1004
|
-
type: String,
|
|
1005
|
-
default() {
|
|
1006
|
-
return R.t("dateRange.endHolder");
|
|
1007
|
-
}
|
|
1008
|
-
},
|
|
978
|
+
endHolder: String,
|
|
1009
979
|
/**
|
|
1010
980
|
* 一次性传给开始组件的prop
|
|
1011
981
|
*/
|
|
@@ -1032,71 +1002,71 @@ const R = {
|
|
|
1032
1002
|
format: String
|
|
1033
1003
|
},
|
|
1034
1004
|
emits: ["update:begin", "update:end", "change-begin", "change-end", "change"],
|
|
1035
|
-
setup(t, { emit:
|
|
1005
|
+
setup(t, { emit: B }) {
|
|
1036
1006
|
const e = {
|
|
1037
1007
|
date: "day",
|
|
1038
1008
|
month: "month",
|
|
1039
1009
|
year: "year",
|
|
1040
1010
|
datetime: "day"
|
|
1041
|
-
}, l = t, a =
|
|
1011
|
+
}, l = t, a = B, n = H(l.begin), u = H(l.end), h = P(() => ({
|
|
1042
1012
|
options: l.limitBegin ? {
|
|
1043
|
-
disabledDate: (k) => k &&
|
|
1013
|
+
disabledDate: (k) => k && E(k).isBefore(Date.now(), e[l.type])
|
|
1044
1014
|
// date.valueOf() < Date.now() - (props.disableToday ? 0 : 86400000)
|
|
1045
1015
|
} : void 0,
|
|
1046
1016
|
disabled: l.disabled || l.beginDisabled,
|
|
1047
|
-
placeholder: l.beginHolder,
|
|
1017
|
+
placeholder: l.beginHolder ?? A.t("dateRange.beginHolder"),
|
|
1048
1018
|
class: l.beginClass,
|
|
1049
1019
|
clearable: l.clearable,
|
|
1050
1020
|
transfer: l.transfer,
|
|
1051
1021
|
format: l.format,
|
|
1052
1022
|
...l.beginAttr
|
|
1053
|
-
})),
|
|
1023
|
+
})), r = P(() => ({
|
|
1054
1024
|
options: {
|
|
1055
|
-
disabledDate: (k) => n.value && k &&
|
|
1025
|
+
disabledDate: (k) => n.value && k && E(k).isBefore(n.value, e[l.type])
|
|
1056
1026
|
},
|
|
1057
1027
|
disabled: l.disabled || l.endDisabled,
|
|
1058
|
-
placeholder: l.endHolder,
|
|
1028
|
+
placeholder: l.endHolder ?? A.t("dateRange.endHolder"),
|
|
1059
1029
|
class: l.endClass,
|
|
1060
1030
|
clearable: l.clearable,
|
|
1061
1031
|
transfer: l.transfer,
|
|
1062
1032
|
format: l.format,
|
|
1063
1033
|
...l.endAttr
|
|
1064
1034
|
})), v = () => {
|
|
1065
|
-
a("update:begin", n.value), a("update:end",
|
|
1035
|
+
a("update:begin", n.value), a("update:end", u.value);
|
|
1066
1036
|
}, f = (k) => {
|
|
1067
|
-
n.value >
|
|
1037
|
+
n.value > u.value && (u.value = l.autoNext ? E(n.value).add(1, e[l.type]).toDate() : ""), v(), a("change-begin", k), a("change", n.value, u.value, !1);
|
|
1068
1038
|
}, g = (k) => {
|
|
1069
|
-
l.type === "datetime" && k &&
|
|
1039
|
+
l.type === "datetime" && k && E(k).isBefore(n.value) && (u.value = E(n.value).add(1, "hour").toDate(), k = E(u.value).format("YYYY-MM-DD HH:mm:ss")), v(), a("change-end", k), a("change", n.value, u.value, !0);
|
|
1070
1040
|
}, y = (k) => {
|
|
1071
1041
|
n.value !== k && (n.value = k || "");
|
|
1072
1042
|
}, s = (k) => {
|
|
1073
|
-
|
|
1043
|
+
u.value !== k && (u.value = k || "");
|
|
1074
1044
|
};
|
|
1075
1045
|
return z(() => l.begin, y), z(() => l.end, s), (k, x) => {
|
|
1076
1046
|
const o = O("DatePicker");
|
|
1077
|
-
return V(),
|
|
1078
|
-
$(o,
|
|
1047
|
+
return V(), N("div", dt, [
|
|
1048
|
+
$(o, U({
|
|
1079
1049
|
modelValue: n.value,
|
|
1080
1050
|
"onUpdate:modelValue": x[0] || (x[0] = (b) => n.value = b),
|
|
1081
1051
|
onOnChange: f
|
|
1082
1052
|
}, h.value, { type: t.type }), null, 16, ["modelValue", "type"]),
|
|
1083
1053
|
se(te("span", {
|
|
1084
|
-
class:
|
|
1054
|
+
class: ue(["date-range-joiner", t.joinerClass])
|
|
1085
1055
|
}, null, 2), [
|
|
1086
1056
|
[fe, !t.hideJoiner]
|
|
1087
1057
|
]),
|
|
1088
|
-
$(o,
|
|
1089
|
-
modelValue:
|
|
1090
|
-
"onUpdate:modelValue": x[1] || (x[1] = (b) =>
|
|
1058
|
+
$(o, U({
|
|
1059
|
+
modelValue: u.value,
|
|
1060
|
+
"onUpdate:modelValue": x[1] || (x[1] = (b) => u.value = b),
|
|
1091
1061
|
onOnChange: g
|
|
1092
|
-
},
|
|
1062
|
+
}, r.value, { type: t.type }), null, 16, ["modelValue", "type"])
|
|
1093
1063
|
]);
|
|
1094
1064
|
};
|
|
1095
1065
|
}
|
|
1096
|
-
}),
|
|
1066
|
+
}), ft = {
|
|
1097
1067
|
name: "DateRangePicker"
|
|
1098
|
-
},
|
|
1099
|
-
...
|
|
1068
|
+
}, mt = /* @__PURE__ */ Y({
|
|
1069
|
+
...ft,
|
|
1100
1070
|
props: {
|
|
1101
1071
|
/**
|
|
1102
1072
|
* 双向绑定开始时间
|
|
@@ -1152,28 +1122,28 @@ const R = {
|
|
|
1152
1122
|
}
|
|
1153
1123
|
},
|
|
1154
1124
|
emits: ["update:begin", "update:end", "change"],
|
|
1155
|
-
setup(t, { emit:
|
|
1156
|
-
const e = t, l =
|
|
1125
|
+
setup(t, { emit: B }) {
|
|
1126
|
+
const e = t, l = B, a = P(
|
|
1157
1127
|
() => e.options || (e.limitBegin ? {
|
|
1158
1128
|
disabledDate: (h) => h && h.valueOf() < Date.now() - (e.disableToday ? 0 : 864e5)
|
|
1159
1129
|
} : null)
|
|
1160
|
-
), n =
|
|
1130
|
+
), n = P({
|
|
1161
1131
|
get() {
|
|
1162
|
-
const h = e.begin,
|
|
1163
|
-
return h &&
|
|
1132
|
+
const h = e.begin, r = e.end;
|
|
1133
|
+
return h && r ? [E(h).toDate(), E(r).toDate()] : [];
|
|
1164
1134
|
},
|
|
1165
1135
|
set(h) {
|
|
1166
|
-
let
|
|
1167
|
-
h[0] && h[1] ? (
|
|
1136
|
+
let r, v;
|
|
1137
|
+
h[0] && h[1] ? (r = E(h[0]).format(e.valueFormat), v = E(h[1]).format(e.valueFormat)) : r = v = "", l("update:begin", r), l("update:end", v);
|
|
1168
1138
|
}
|
|
1169
|
-
}),
|
|
1170
|
-
l("change", h,
|
|
1139
|
+
}), u = (h, r) => {
|
|
1140
|
+
l("change", h, r);
|
|
1171
1141
|
};
|
|
1172
|
-
return (h,
|
|
1142
|
+
return (h, r) => {
|
|
1173
1143
|
const v = O("DatePicker");
|
|
1174
|
-
return V(),
|
|
1144
|
+
return V(), L(v, {
|
|
1175
1145
|
modelValue: n.value,
|
|
1176
|
-
"onUpdate:modelValue":
|
|
1146
|
+
"onUpdate:modelValue": r[0] || (r[0] = (f) => n.value = f),
|
|
1177
1147
|
type: t.type,
|
|
1178
1148
|
clearable: t.clearable,
|
|
1179
1149
|
"split-panels": t.splitPanels,
|
|
@@ -1182,14 +1152,16 @@ const R = {
|
|
|
1182
1152
|
placeholder: t.placeholder,
|
|
1183
1153
|
disabled: t.disabled,
|
|
1184
1154
|
placement: t.placement,
|
|
1185
|
-
onOnChange:
|
|
1155
|
+
onOnChange: u
|
|
1186
1156
|
}, null, 8, ["modelValue", "type", "clearable", "split-panels", "options", "transfer", "placeholder", "disabled", "placement"]);
|
|
1187
1157
|
};
|
|
1188
1158
|
}
|
|
1189
|
-
}),
|
|
1159
|
+
}), gt = { class: "mcalendar" };
|
|
1160
|
+
E.prototype.isBetween || E.extend(Ue);
|
|
1161
|
+
const pt = {
|
|
1190
1162
|
name: "MCalendar"
|
|
1191
|
-
},
|
|
1192
|
-
...
|
|
1163
|
+
}, ht = /* @__PURE__ */ Y({
|
|
1164
|
+
...pt,
|
|
1193
1165
|
props: {
|
|
1194
1166
|
/**
|
|
1195
1167
|
* 指定日期,默认显示该日期所在月份
|
|
@@ -1295,44 +1267,44 @@ const R = {
|
|
|
1295
1267
|
}
|
|
1296
1268
|
},
|
|
1297
1269
|
emits: ["update:range", "select-range", "click-day", "dblclick-day"],
|
|
1298
|
-
setup(t, { emit:
|
|
1299
|
-
const e = t, l =
|
|
1270
|
+
setup(t, { emit: B }) {
|
|
1271
|
+
const e = t, l = B, a = H(), n = H(null), u = H(null), h = P(() => {
|
|
1300
1272
|
let o = Math.floor(e.startDay);
|
|
1301
1273
|
return (isNaN(o) || o < 0 || o > 6) && (o = 0), o;
|
|
1302
|
-
}),
|
|
1274
|
+
}), r = P(() => {
|
|
1303
1275
|
let o;
|
|
1304
1276
|
const b = [], D = h.value + 7;
|
|
1305
1277
|
for (let d = h.value; d < D; d++)
|
|
1306
1278
|
o = d % 7, b.push({
|
|
1307
|
-
title: e.weekMap?.[o] ||
|
|
1279
|
+
title: e.weekMap?.[o] || A.t(`mCalendar.${e.weekType}.${o}`),
|
|
1308
1280
|
order: o
|
|
1309
1281
|
});
|
|
1310
1282
|
return b;
|
|
1311
1283
|
}), v = (o) => {
|
|
1312
|
-
let b =
|
|
1284
|
+
let b = E(
|
|
1313
1285
|
e.date || e.dates && e.dates[0] && e.dates[0][e.dateKey]
|
|
1314
|
-
), D, d,
|
|
1315
|
-
return e.isOnFirstLine ? D = b : (D = b.startOf("month"), d = b.endOf("month")),
|
|
1286
|
+
), D, d, S;
|
|
1287
|
+
return e.isOnFirstLine ? D = b : (D = b.startOf("month"), d = b.endOf("month")), S = D.day(), h.value !== 0 && S === 0 && (S = 7), b = D.subtract(S - h.value, "day"), e.isOnFirstLine && (d = b.add(41, "day")), {
|
|
1316
1288
|
beginDate: b.format("YYYY-MM-DD"),
|
|
1317
1289
|
endDate: d?.format("YYYY-MM-DD"),
|
|
1318
1290
|
extra: [b, e.isOnFirstLine ? b : D, d]
|
|
1319
1291
|
};
|
|
1320
1292
|
}, f = () => {
|
|
1321
|
-
e.hasRange && (n.value =
|
|
1293
|
+
e.hasRange && (n.value = u.value = null);
|
|
1322
1294
|
const {
|
|
1323
1295
|
extra: [o, b, D]
|
|
1324
|
-
} = v(), d = e.dates?.[0] ? e.dates.slice() : [],
|
|
1325
|
-
let
|
|
1326
|
-
for (a.value = [],
|
|
1327
|
-
|
|
1328
|
-
_date:
|
|
1329
|
-
_text:
|
|
1330
|
-
_isOuter: !
|
|
1331
|
-
_isToday:
|
|
1296
|
+
} = v(), d = e.dates?.[0] ? e.dates.slice() : [], S = /* @__PURE__ */ new Date();
|
|
1297
|
+
let i, c, M;
|
|
1298
|
+
for (a.value = [], i = 0; i < 42; i++)
|
|
1299
|
+
c = o.add(i, "day"), M = d.find((_) => c.isSame(_[e.dateKey], "day")), a.value.push({
|
|
1300
|
+
_date: c.toDate(),
|
|
1301
|
+
_text: c.format(e.textFormat),
|
|
1302
|
+
_isOuter: !c.isBetween(b, D, "day", "[]"),
|
|
1303
|
+
_isToday: c.isSame(S, "day"),
|
|
1332
1304
|
// _rangeStart: undefined,
|
|
1333
1305
|
// _rangeEnd: undefined,
|
|
1334
1306
|
_inRange: void 0,
|
|
1335
|
-
...
|
|
1307
|
+
...M
|
|
1336
1308
|
});
|
|
1337
1309
|
};
|
|
1338
1310
|
let g;
|
|
@@ -1341,8 +1313,8 @@ const R = {
|
|
|
1341
1313
|
if (D)
|
|
1342
1314
|
if (!n.value)
|
|
1343
1315
|
n.value = o, o._inRange = !0;
|
|
1344
|
-
else if (
|
|
1345
|
-
n.value =
|
|
1316
|
+
else if (u.value)
|
|
1317
|
+
n.value = u.value = null, a.value.forEach((d) => {
|
|
1346
1318
|
d._inRange = !1;
|
|
1347
1319
|
}), e.clearable || (n.value = o);
|
|
1348
1320
|
else {
|
|
@@ -1350,52 +1322,52 @@ const R = {
|
|
|
1350
1322
|
const d = n.value;
|
|
1351
1323
|
n.value = o, o = d;
|
|
1352
1324
|
}
|
|
1353
|
-
|
|
1325
|
+
u.value = o, o._inRange = !0;
|
|
1354
1326
|
}
|
|
1355
1327
|
l("click-day", o, b), D && (g = !0, J(() => {
|
|
1356
1328
|
g = null;
|
|
1357
|
-
}), l("update:range", [n.value,
|
|
1329
|
+
}), l("update:range", [n.value, u.value]), l(
|
|
1358
1330
|
"select-range",
|
|
1359
|
-
[n.value,
|
|
1331
|
+
[n.value, u.value],
|
|
1360
1332
|
a.value.slice(
|
|
1361
1333
|
a.value.indexOf(n.value),
|
|
1362
|
-
a.value.indexOf(
|
|
1334
|
+
a.value.indexOf(u.value) + 1
|
|
1363
1335
|
)
|
|
1364
1336
|
));
|
|
1365
1337
|
}, s = (o, b) => {
|
|
1366
1338
|
l("dblclick-day", o, b);
|
|
1367
1339
|
}, k = (o, b) => {
|
|
1368
|
-
if (!e.hasRange || !n.value ||
|
|
1340
|
+
if (!e.hasRange || !n.value || u.value || o._isOuter && !e.outerInRange)
|
|
1369
1341
|
return;
|
|
1370
1342
|
let D = a.value.indexOf(n.value);
|
|
1371
1343
|
if (b < D) {
|
|
1372
1344
|
const d = D;
|
|
1373
1345
|
D = b, b = d;
|
|
1374
1346
|
}
|
|
1375
|
-
a.value.forEach((d,
|
|
1376
|
-
d._inRange =
|
|
1347
|
+
a.value.forEach((d, S) => {
|
|
1348
|
+
d._inRange = S >= D && S <= b;
|
|
1377
1349
|
});
|
|
1378
1350
|
}, x = (o) => {
|
|
1379
1351
|
if (!(!e.hasRange || g)) {
|
|
1380
1352
|
if (!o || !o.length) {
|
|
1381
|
-
n.value =
|
|
1353
|
+
n.value = u.value = null, a.value.forEach((b) => {
|
|
1382
1354
|
b._inRange = !1;
|
|
1383
1355
|
});
|
|
1384
1356
|
return;
|
|
1385
1357
|
}
|
|
1386
1358
|
if (o[0] && o[1]) {
|
|
1387
|
-
if (
|
|
1388
|
-
const
|
|
1389
|
-
o[1] = o[0], o[0] =
|
|
1359
|
+
if (E(o[0]._date).isAfter(o[1]._date)) {
|
|
1360
|
+
const S = o[1];
|
|
1361
|
+
o[1] = o[0], o[0] = S;
|
|
1390
1362
|
}
|
|
1391
1363
|
let b, D, d;
|
|
1392
|
-
for (let
|
|
1393
|
-
if (b =
|
|
1394
|
-
|
|
1364
|
+
for (let S = 0, i = a.value.length; S < i; S++)
|
|
1365
|
+
if (b = E(a.value[S]._date), b.isSame(o[0]._date, "day") && (n.value = a.value[S], D = S), b.isSame(o[1]._date, "day")) {
|
|
1366
|
+
u.value = a.value[S], d = S;
|
|
1395
1367
|
break;
|
|
1396
1368
|
}
|
|
1397
|
-
a.value.forEach((
|
|
1398
|
-
|
|
1369
|
+
a.value.forEach((S, i) => {
|
|
1370
|
+
S._inRange = i >= D && i <= d;
|
|
1399
1371
|
});
|
|
1400
1372
|
}
|
|
1401
1373
|
}
|
|
@@ -1416,21 +1388,21 @@ const R = {
|
|
|
1416
1388
|
f();
|
|
1417
1389
|
}
|
|
1418
1390
|
), z(() => e.range, x), (o, b) => {
|
|
1419
|
-
const D = O("Col"), d = O("Row"),
|
|
1420
|
-
return V(),
|
|
1391
|
+
const D = O("Col"), d = O("Row"), S = O("Spin");
|
|
1392
|
+
return V(), N("div", gt, [
|
|
1421
1393
|
$(d, null, {
|
|
1422
|
-
default:
|
|
1423
|
-
(V(!0),
|
|
1424
|
-
key:
|
|
1394
|
+
default: C(() => [
|
|
1395
|
+
(V(!0), N(q, null, ee(r.value, (i, c) => (V(), L(D, {
|
|
1396
|
+
key: c,
|
|
1425
1397
|
span: "4",
|
|
1426
|
-
class:
|
|
1398
|
+
class: ue([
|
|
1427
1399
|
"mcalendar-title",
|
|
1428
|
-
{ weekend: t.offDay.includes(
|
|
1429
|
-
t.titleClass && t.titleClass(
|
|
1400
|
+
{ weekend: t.offDay.includes(i.order) },
|
|
1401
|
+
t.titleClass && t.titleClass(i, c)
|
|
1430
1402
|
])
|
|
1431
1403
|
}, {
|
|
1432
|
-
default:
|
|
1433
|
-
|
|
1404
|
+
default: C(() => [
|
|
1405
|
+
j(I(i.title), 1)
|
|
1434
1406
|
]),
|
|
1435
1407
|
_: 2
|
|
1436
1408
|
}, 1032, ["class"]))), 128))
|
|
@@ -1438,30 +1410,30 @@ const R = {
|
|
|
1438
1410
|
_: 1
|
|
1439
1411
|
}),
|
|
1440
1412
|
$(d, null, {
|
|
1441
|
-
default:
|
|
1442
|
-
(V(!0),
|
|
1443
|
-
key:
|
|
1413
|
+
default: C(() => [
|
|
1414
|
+
(V(!0), N(q, null, ee(a.value, (i, c) => (V(), L(D, {
|
|
1415
|
+
key: c,
|
|
1444
1416
|
span: "4",
|
|
1445
|
-
class:
|
|
1417
|
+
class: ue([
|
|
1446
1418
|
"mcalendar-cell",
|
|
1447
|
-
{ "mcalendar-cell_today":
|
|
1448
|
-
{ outer:
|
|
1449
|
-
{ "range-start":
|
|
1450
|
-
{ "in-range":
|
|
1451
|
-
{ "range-end":
|
|
1452
|
-
t.dateClass && t.dateClass(
|
|
1453
|
-
|
|
1419
|
+
{ "mcalendar-cell_today": i._isToday },
|
|
1420
|
+
{ outer: i._isOuter },
|
|
1421
|
+
{ "range-start": i === n.value },
|
|
1422
|
+
{ "in-range": i._inRange },
|
|
1423
|
+
{ "range-end": i === u.value },
|
|
1424
|
+
t.dateClass && t.dateClass(i, c),
|
|
1425
|
+
i.className
|
|
1454
1426
|
]),
|
|
1455
|
-
onClick: (
|
|
1456
|
-
onDblclick: (
|
|
1457
|
-
onMouseenter: (
|
|
1427
|
+
onClick: (M) => y(i, c),
|
|
1428
|
+
onDblclick: (M) => s(i, c),
|
|
1429
|
+
onMouseenter: (M) => k(i, c)
|
|
1458
1430
|
}, {
|
|
1459
|
-
default:
|
|
1460
|
-
|
|
1461
|
-
day:
|
|
1462
|
-
index:
|
|
1431
|
+
default: C(() => [
|
|
1432
|
+
R(o.$slots, "cell", {
|
|
1433
|
+
day: i,
|
|
1434
|
+
index: c
|
|
1463
1435
|
}, () => [
|
|
1464
|
-
|
|
1436
|
+
j(I(i._text), 1)
|
|
1465
1437
|
])
|
|
1466
1438
|
]),
|
|
1467
1439
|
_: 2
|
|
@@ -1469,37 +1441,27 @@ const R = {
|
|
|
1469
1441
|
]),
|
|
1470
1442
|
_: 3
|
|
1471
1443
|
}),
|
|
1472
|
-
se($(
|
|
1444
|
+
se($(S, { fix: "" }, null, 512), [
|
|
1473
1445
|
[fe, t.loading]
|
|
1474
1446
|
])
|
|
1475
1447
|
]);
|
|
1476
1448
|
};
|
|
1477
1449
|
}
|
|
1478
|
-
}),
|
|
1450
|
+
}), vt = {
|
|
1479
1451
|
name: "ModalFooter",
|
|
1480
1452
|
inheritAttrs: !1
|
|
1481
|
-
},
|
|
1482
|
-
...
|
|
1453
|
+
}, bt = /* @__PURE__ */ Y({
|
|
1454
|
+
...vt,
|
|
1483
1455
|
props: {
|
|
1484
1456
|
modelValue: Boolean,
|
|
1485
1457
|
/**
|
|
1486
1458
|
* 确定按钮文本
|
|
1487
1459
|
*/
|
|
1488
|
-
okText:
|
|
1489
|
-
type: String,
|
|
1490
|
-
default() {
|
|
1491
|
-
return R.t("modalFooter.ok");
|
|
1492
|
-
}
|
|
1493
|
-
},
|
|
1460
|
+
okText: String,
|
|
1494
1461
|
/**
|
|
1495
1462
|
* 取消按钮文本
|
|
1496
1463
|
*/
|
|
1497
|
-
cancelText:
|
|
1498
|
-
type: String,
|
|
1499
|
-
default() {
|
|
1500
|
-
return R.t("modalFooter.cancel");
|
|
1501
|
-
}
|
|
1502
|
-
},
|
|
1464
|
+
cancelText: String,
|
|
1503
1465
|
/**
|
|
1504
1466
|
* 传递给确定按钮的props
|
|
1505
1467
|
*/
|
|
@@ -1544,75 +1506,75 @@ const R = {
|
|
|
1544
1506
|
}
|
|
1545
1507
|
},
|
|
1546
1508
|
emits: ["update:modelValue", "ok", "cancel"],
|
|
1547
|
-
setup(t, { emit:
|
|
1548
|
-
const e =
|
|
1509
|
+
setup(t, { emit: B }) {
|
|
1510
|
+
const e = B, l = ze(), a = () => {
|
|
1549
1511
|
l.vnode.props.onCancel ? e("cancel") : e("update:modelValue", !1);
|
|
1550
1512
|
};
|
|
1551
|
-
return (n,
|
|
1552
|
-
const h = O("Col"),
|
|
1553
|
-
return V(),
|
|
1513
|
+
return (n, u) => {
|
|
1514
|
+
const h = O("Col"), r = O("Button"), v = O("Row");
|
|
1515
|
+
return V(), L(v, {
|
|
1554
1516
|
justify: "space-between",
|
|
1555
1517
|
align: "middle"
|
|
1556
1518
|
}, {
|
|
1557
|
-
default:
|
|
1519
|
+
default: C(() => [
|
|
1558
1520
|
$(h, null, {
|
|
1559
|
-
default:
|
|
1560
|
-
|
|
1521
|
+
default: C(() => [
|
|
1522
|
+
R(n.$slots, "other")
|
|
1561
1523
|
]),
|
|
1562
1524
|
_: 3
|
|
1563
1525
|
}),
|
|
1564
1526
|
$(h, { class: "flex" }, {
|
|
1565
|
-
default:
|
|
1566
|
-
t.rightCancel ? (V(),
|
|
1567
|
-
t.hasOk ? (V(),
|
|
1527
|
+
default: C(() => [
|
|
1528
|
+
t.rightCancel ? (V(), N(q, { key: 1 }, [
|
|
1529
|
+
t.hasOk ? (V(), L(r, U({
|
|
1568
1530
|
key: 0,
|
|
1569
1531
|
disabled: t.okDisabled,
|
|
1570
1532
|
loading: t.okLoading
|
|
1571
1533
|
}, t.ok, {
|
|
1572
1534
|
type: "primary",
|
|
1573
|
-
onClick:
|
|
1535
|
+
onClick: u[1] || (u[1] = (f) => n.$emit("ok"))
|
|
1574
1536
|
}), {
|
|
1575
|
-
default:
|
|
1576
|
-
|
|
1537
|
+
default: C(() => [
|
|
1538
|
+
j(I(t.okText ?? F(A).t("modalFooter.ok")), 1)
|
|
1577
1539
|
]),
|
|
1578
1540
|
_: 1
|
|
1579
1541
|
}, 16, ["disabled", "loading"])) : W("", !0),
|
|
1580
|
-
$(
|
|
1542
|
+
$(r, U({
|
|
1581
1543
|
disabled: t.cancelDisabled,
|
|
1582
1544
|
loading: t.cancelLoading,
|
|
1583
1545
|
type: t.cancelType
|
|
1584
1546
|
}, t.cancel, { onClick: a }), {
|
|
1585
|
-
default:
|
|
1586
|
-
|
|
1547
|
+
default: C(() => [
|
|
1548
|
+
j(I(t.cancelText ?? F(A).t("modalFooter.cancel")), 1)
|
|
1587
1549
|
]),
|
|
1588
1550
|
_: 1
|
|
1589
1551
|
}, 16, ["disabled", "loading", "type"])
|
|
1590
|
-
], 64)) : (V(),
|
|
1591
|
-
$(
|
|
1552
|
+
], 64)) : (V(), N(q, { key: 0 }, [
|
|
1553
|
+
$(r, U({
|
|
1592
1554
|
disabled: t.cancelDisabled,
|
|
1593
1555
|
loading: t.cancelLoading,
|
|
1594
1556
|
type: t.cancelType
|
|
1595
1557
|
}, t.cancel, { onClick: a }), {
|
|
1596
|
-
default:
|
|
1597
|
-
|
|
1558
|
+
default: C(() => [
|
|
1559
|
+
j(I(t.cancelText ?? F(A).t("modalFooter.cancel")), 1)
|
|
1598
1560
|
]),
|
|
1599
1561
|
_: 1
|
|
1600
1562
|
}, 16, ["disabled", "loading", "type"]),
|
|
1601
|
-
t.hasOk ? (V(),
|
|
1563
|
+
t.hasOk ? (V(), L(r, U({
|
|
1602
1564
|
key: 0,
|
|
1603
1565
|
disabled: t.okDisabled,
|
|
1604
1566
|
loading: t.okLoading
|
|
1605
1567
|
}, t.ok, {
|
|
1606
1568
|
type: "primary",
|
|
1607
|
-
onClick:
|
|
1569
|
+
onClick: u[0] || (u[0] = (f) => n.$emit("ok"))
|
|
1608
1570
|
}), {
|
|
1609
|
-
default:
|
|
1610
|
-
|
|
1571
|
+
default: C(() => [
|
|
1572
|
+
j(I(t.okText ?? F(A).t("modalFooter.ok")), 1)
|
|
1611
1573
|
]),
|
|
1612
1574
|
_: 1
|
|
1613
1575
|
}, 16, ["disabled", "loading"])) : W("", !0)
|
|
1614
1576
|
], 64)),
|
|
1615
|
-
|
|
1577
|
+
R(n.$slots, "action")
|
|
1616
1578
|
]),
|
|
1617
1579
|
_: 3
|
|
1618
1580
|
})
|
|
@@ -1621,23 +1583,18 @@ const R = {
|
|
|
1621
1583
|
});
|
|
1622
1584
|
};
|
|
1623
1585
|
}
|
|
1624
|
-
}),
|
|
1586
|
+
}), yt = {
|
|
1625
1587
|
key: 0,
|
|
1626
1588
|
class: "ivu-dropdown-item"
|
|
1627
|
-
},
|
|
1589
|
+
}, G = {}, kt = {
|
|
1628
1590
|
name: "ToggleColumn"
|
|
1629
|
-
},
|
|
1630
|
-
...
|
|
1591
|
+
}, we = /* @__PURE__ */ Y({
|
|
1592
|
+
...kt,
|
|
1631
1593
|
props: {
|
|
1632
1594
|
modelValue: {
|
|
1633
1595
|
type: Array
|
|
1634
1596
|
},
|
|
1635
|
-
title:
|
|
1636
|
-
type: String,
|
|
1637
|
-
default() {
|
|
1638
|
-
return R.t("toggleColumn.title");
|
|
1639
|
-
}
|
|
1640
|
-
},
|
|
1597
|
+
title: String,
|
|
1641
1598
|
/**
|
|
1642
1599
|
* 仅显示图标
|
|
1643
1600
|
*/
|
|
@@ -1664,87 +1621,87 @@ const R = {
|
|
|
1664
1621
|
storeAt: String
|
|
1665
1622
|
},
|
|
1666
1623
|
emits: ["update:modelValue", "change"],
|
|
1667
|
-
setup(t, { emit:
|
|
1668
|
-
const e = t, l =
|
|
1669
|
-
let a, n,
|
|
1670
|
-
const h = (
|
|
1624
|
+
setup(t, { emit: B }) {
|
|
1625
|
+
const e = t, l = B;
|
|
1626
|
+
let a, n, u;
|
|
1627
|
+
const h = (i) => {
|
|
1671
1628
|
clearTimeout(a);
|
|
1672
|
-
let
|
|
1673
|
-
|
|
1674
|
-
a = null, localStorage.setItem(n, JSON.stringify(
|
|
1629
|
+
let c = localStorage.getItem(n);
|
|
1630
|
+
c = c ? JSON.parse(c) : {}, i ? Le(c, Ee(u, r)) : He(c, u, r), a = setTimeout(() => {
|
|
1631
|
+
a = null, localStorage.setItem(n, JSON.stringify(c));
|
|
1675
1632
|
});
|
|
1676
1633
|
};
|
|
1677
|
-
let
|
|
1678
|
-
e.storeAt && (n = e.storeAt.split(".")[0],
|
|
1679
|
-
const v =
|
|
1680
|
-
const
|
|
1681
|
-
return
|
|
1682
|
-
}), s =
|
|
1634
|
+
let r;
|
|
1635
|
+
e.storeAt && (n = e.storeAt.split(".")[0], u = e.storeAt.slice(n.length + 1), r = localStorage.getItem(n) && pe(JSON.parse(localStorage[n]), u), r || (r = {}, h(!0)));
|
|
1636
|
+
const v = H(!1), f = ye([]), g = H([]), y = P(() => {
|
|
1637
|
+
const i = g.value.filter((c) => c._switchable);
|
|
1638
|
+
return i.some((c) => c._visible) && i.some((c) => !c._visible);
|
|
1639
|
+
}), s = P({
|
|
1683
1640
|
get() {
|
|
1684
|
-
const
|
|
1685
|
-
return
|
|
1641
|
+
const i = g.value.filter((c) => c._switchable);
|
|
1642
|
+
return i.length > 0 && i.every((c) => c._visible);
|
|
1686
1643
|
},
|
|
1687
|
-
set(
|
|
1688
|
-
g.value.forEach((
|
|
1689
|
-
|
|
1690
|
-
}), e.storeAt && (g.value.forEach((
|
|
1691
|
-
c
|
|
1692
|
-
}), h()),
|
|
1644
|
+
set(i) {
|
|
1645
|
+
g.value.forEach((c, M) => {
|
|
1646
|
+
c._switchable && (f.value[M]._visible = c._visible = i);
|
|
1647
|
+
}), e.storeAt && (g.value.forEach((c, M) => {
|
|
1648
|
+
r[c.key] = c._visible;
|
|
1649
|
+
}), h()), S(), l("change", f.value);
|
|
1693
1650
|
}
|
|
1694
1651
|
});
|
|
1695
1652
|
function k() {
|
|
1696
|
-
const
|
|
1697
|
-
if (!e.all &&
|
|
1698
|
-
|
|
1653
|
+
const i = g.value.filter((c) => c._visible);
|
|
1654
|
+
if (!e.all && i.length === 1) {
|
|
1655
|
+
i[0]._switchable = !1;
|
|
1699
1656
|
return;
|
|
1700
1657
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1658
|
+
i.forEach((c) => {
|
|
1659
|
+
c.initSwitchable && !c._switchable && (c._switchable = !0);
|
|
1703
1660
|
});
|
|
1704
1661
|
}
|
|
1705
|
-
function x(
|
|
1706
|
-
f.value[
|
|
1662
|
+
function x(i, c) {
|
|
1663
|
+
f.value[c]._visible = i._visible, e.storeAt && (r[i.key] = i._visible, h()), S(), k(), l("change", f.value[c]);
|
|
1707
1664
|
}
|
|
1708
1665
|
let o;
|
|
1709
|
-
function b(
|
|
1666
|
+
function b(i) {
|
|
1710
1667
|
clearTimeout(o), o = setTimeout(() => {
|
|
1711
|
-
v.value =
|
|
1668
|
+
v.value = i, o = null;
|
|
1712
1669
|
}, 200);
|
|
1713
1670
|
}
|
|
1714
1671
|
function D() {
|
|
1715
|
-
(
|
|
1716
|
-
|
|
1717
|
-
title:
|
|
1718
|
-
key:
|
|
1719
|
-
initSwitchable:
|
|
1720
|
-
_switchable:
|
|
1721
|
-
_visible:
|
|
1672
|
+
(G[e.cacheId]?.cols || e.modelValue).forEach((i) => {
|
|
1673
|
+
i.hasOwnProperty("_visible") || (e.storeAt ? i._visible = r[i.key] === void 0 || r[i.key] : i._visible = !0), i.hasOwnProperty("_switchable") || (i._switchable = !0), f.value.push(i), g.value.push({
|
|
1674
|
+
title: i.title || "",
|
|
1675
|
+
key: i.key,
|
|
1676
|
+
initSwitchable: i._switchable,
|
|
1677
|
+
_switchable: i._switchable,
|
|
1678
|
+
_visible: i._visible
|
|
1722
1679
|
});
|
|
1723
|
-
}), k(),
|
|
1680
|
+
}), k(), S();
|
|
1724
1681
|
}
|
|
1725
1682
|
let d;
|
|
1726
|
-
function
|
|
1727
|
-
e.cacheId != null && (
|
|
1728
|
-
|
|
1683
|
+
function S() {
|
|
1684
|
+
e.cacheId != null && (G[e.cacheId].flag = !0, J(() => {
|
|
1685
|
+
G[e.cacheId].flag = null;
|
|
1729
1686
|
})), d = !0, J(() => {
|
|
1730
1687
|
d = null;
|
|
1731
1688
|
}), l(
|
|
1732
1689
|
"update:modelValue",
|
|
1733
|
-
f.value.filter((
|
|
1690
|
+
f.value.filter((i) => i._visible)
|
|
1734
1691
|
);
|
|
1735
1692
|
}
|
|
1736
|
-
return
|
|
1737
|
-
e.cacheId != null && (
|
|
1738
|
-
|
|
1693
|
+
return re(() => {
|
|
1694
|
+
e.cacheId != null && (G[e.cacheId] ? G[e.cacheId].all++ : G[e.cacheId] = { cols: e.modelValue, all: 1 }, $e(() => {
|
|
1695
|
+
G[e.cacheId] && --G[e.cacheId].all < 1 && delete G[e.cacheId];
|
|
1739
1696
|
})), D();
|
|
1740
1697
|
}), z(
|
|
1741
1698
|
() => e.modelValue,
|
|
1742
|
-
(
|
|
1743
|
-
d || (
|
|
1699
|
+
(i) => {
|
|
1700
|
+
d || (G[e.cacheId] && !G[e.cacheId].flag && (G[e.cacheId].cols = i), f.value = [], g.value = [], D());
|
|
1744
1701
|
}
|
|
1745
|
-
), (
|
|
1746
|
-
const
|
|
1747
|
-
return V(),
|
|
1702
|
+
), (i, c) => {
|
|
1703
|
+
const M = O("Icon"), _ = O("Button"), ae = O("Checkbox"), le = O("DropdownItem"), me = O("DropdownMenu"), de = O("Dropdown");
|
|
1704
|
+
return V(), L(de, {
|
|
1748
1705
|
trigger: "custom",
|
|
1749
1706
|
visible: v.value,
|
|
1750
1707
|
placement: "bottom-end",
|
|
@@ -1752,38 +1709,38 @@ const R = {
|
|
|
1752
1709
|
"transfer-class-name": "toggle-column-pop",
|
|
1753
1710
|
class: "toggle-column"
|
|
1754
1711
|
}, {
|
|
1755
|
-
list:
|
|
1712
|
+
list: C(() => [
|
|
1756
1713
|
te("div", {
|
|
1757
|
-
onMouseenter:
|
|
1758
|
-
onMouseleave:
|
|
1714
|
+
onMouseenter: c[3] || (c[3] = (K) => b(!0)),
|
|
1715
|
+
onMouseleave: c[4] || (c[4] = (K) => b(!1))
|
|
1759
1716
|
}, [
|
|
1760
|
-
t.all ? (V(),
|
|
1717
|
+
t.all ? (V(), N("div", yt, [
|
|
1761
1718
|
$(ae, {
|
|
1762
1719
|
modelValue: s.value,
|
|
1763
|
-
"onUpdate:modelValue":
|
|
1720
|
+
"onUpdate:modelValue": c[2] || (c[2] = (K) => s.value = K),
|
|
1764
1721
|
indeterminate: y.value
|
|
1765
1722
|
}, {
|
|
1766
|
-
default:
|
|
1767
|
-
|
|
1723
|
+
default: C(() => [
|
|
1724
|
+
j(I(F(A).t("toggleColumn.checkAll")), 1)
|
|
1768
1725
|
]),
|
|
1769
1726
|
_: 1
|
|
1770
1727
|
}, 8, ["modelValue", "indeterminate"])
|
|
1771
1728
|
])) : W("", !0),
|
|
1772
1729
|
$(me, { class: "toggle-column-list" }, {
|
|
1773
|
-
default:
|
|
1774
|
-
(V(!0),
|
|
1730
|
+
default: C(() => [
|
|
1731
|
+
(V(!0), N(q, null, ee(g.value, (K, ge) => (V(), L(le, {
|
|
1775
1732
|
key: ge,
|
|
1776
|
-
disabled: !
|
|
1733
|
+
disabled: !K._switchable
|
|
1777
1734
|
}, {
|
|
1778
|
-
default:
|
|
1735
|
+
default: C(() => [
|
|
1779
1736
|
$(ae, {
|
|
1780
|
-
modelValue:
|
|
1781
|
-
"onUpdate:modelValue": (Z) =>
|
|
1782
|
-
disabled: !
|
|
1783
|
-
onOnChange: (Z) => x(
|
|
1737
|
+
modelValue: K._visible,
|
|
1738
|
+
"onUpdate:modelValue": (Z) => K._visible = Z,
|
|
1739
|
+
disabled: !K._switchable,
|
|
1740
|
+
onOnChange: (Z) => x(K, ge)
|
|
1784
1741
|
}, {
|
|
1785
|
-
default:
|
|
1786
|
-
|
|
1742
|
+
default: C(() => [
|
|
1743
|
+
j(I(K.title), 1)
|
|
1787
1744
|
]),
|
|
1788
1745
|
_: 2
|
|
1789
1746
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "onOnChange"])
|
|
@@ -1795,21 +1752,21 @@ const R = {
|
|
|
1795
1752
|
})
|
|
1796
1753
|
], 32)
|
|
1797
1754
|
]),
|
|
1798
|
-
default:
|
|
1755
|
+
default: C(() => [
|
|
1799
1756
|
te("span", {
|
|
1800
|
-
onMouseover:
|
|
1801
|
-
onMouseout:
|
|
1757
|
+
onMouseover: c[0] || (c[0] = (K) => b(!0)),
|
|
1758
|
+
onMouseout: c[1] || (c[1] = (K) => b(!1)),
|
|
1802
1759
|
class: "toggle-column-btn"
|
|
1803
1760
|
}, [
|
|
1804
|
-
|
|
1805
|
-
$(
|
|
1761
|
+
R(i.$slots, "default", {}, () => [
|
|
1762
|
+
$(_, {
|
|
1806
1763
|
type: "default",
|
|
1807
1764
|
icon: t.icon
|
|
1808
1765
|
}, {
|
|
1809
|
-
default:
|
|
1810
|
-
t.icon ? W("", !0) : (V(),
|
|
1811
|
-
|
|
1812
|
-
$(
|
|
1766
|
+
default: C(() => [
|
|
1767
|
+
t.icon ? W("", !0) : (V(), N(q, { key: 0 }, [
|
|
1768
|
+
j(I(t.title ?? F(A).t("toggleColumn.title")) + " ", 1),
|
|
1769
|
+
$(M, { type: "ios-arrow-down" })
|
|
1813
1770
|
], 64))
|
|
1814
1771
|
]),
|
|
1815
1772
|
_: 1
|
|
@@ -1822,22 +1779,22 @@ const R = {
|
|
|
1822
1779
|
};
|
|
1823
1780
|
}
|
|
1824
1781
|
});
|
|
1825
|
-
function
|
|
1782
|
+
function Bt(t, B = ["id", "class", "style"]) {
|
|
1826
1783
|
const e = {};
|
|
1827
1784
|
return Object.entries(t).forEach((l) => {
|
|
1828
|
-
|
|
1785
|
+
B.includes(l[0]) || (e[l[0]] = l[1]);
|
|
1829
1786
|
}), e;
|
|
1830
1787
|
}
|
|
1831
|
-
const
|
|
1788
|
+
const Ct = {
|
|
1832
1789
|
class: "page-table-header-title"
|
|
1833
|
-
},
|
|
1790
|
+
}, St = {
|
|
1834
1791
|
class: "page-table-list"
|
|
1835
|
-
},
|
|
1792
|
+
}, Vt = {
|
|
1836
1793
|
name: "PageTable"
|
|
1837
1794
|
// inheritAttrs: false
|
|
1838
|
-
},
|
|
1839
|
-
...
|
|
1840
|
-
props: /* @__PURE__ */
|
|
1795
|
+
}, Dt = /* @__PURE__ */ Y({
|
|
1796
|
+
...Vt,
|
|
1797
|
+
props: /* @__PURE__ */ Ce({
|
|
1841
1798
|
columns: {
|
|
1842
1799
|
type: Array,
|
|
1843
1800
|
default: () => []
|
|
@@ -1967,12 +1924,7 @@ const Dt = {
|
|
|
1967
1924
|
/**
|
|
1968
1925
|
* head title
|
|
1969
1926
|
*/
|
|
1970
|
-
title:
|
|
1971
|
-
type: String,
|
|
1972
|
-
default() {
|
|
1973
|
-
return R.t("pageTable.title");
|
|
1974
|
-
}
|
|
1975
|
-
},
|
|
1927
|
+
title: String,
|
|
1976
1928
|
/**
|
|
1977
1929
|
* 是否显示header
|
|
1978
1930
|
*/
|
|
@@ -1995,14 +1947,14 @@ const Dt = {
|
|
|
1995
1947
|
},
|
|
1996
1948
|
loadingModifiers: {}
|
|
1997
1949
|
}),
|
|
1998
|
-
emits: /* @__PURE__ */
|
|
1950
|
+
emits: /* @__PURE__ */ Ce(["update:modelValue", "update:selection", "load", "select-all", "select-rows", "select", "reload", "change-col"], ["update:loading"]),
|
|
1999
1951
|
setup(t, {
|
|
2000
|
-
expose:
|
|
1952
|
+
expose: B,
|
|
2001
1953
|
emit: e
|
|
2002
1954
|
}) {
|
|
2003
|
-
const l =
|
|
2004
|
-
let
|
|
2005
|
-
const h =
|
|
1955
|
+
const l = Bt(je()), a = t, n = e;
|
|
1956
|
+
let u;
|
|
1957
|
+
const h = Ne(t, "loading"), r = be("tableRef"), v = be("elRef"), f = H(!1), g = ye(), y = Pe({
|
|
2006
1958
|
data: [],
|
|
2007
1959
|
// rows: [] as Obj[],
|
|
2008
1960
|
// selections: [],
|
|
@@ -2015,7 +1967,7 @@ const Dt = {
|
|
|
2015
1967
|
const p = y.data.filter((T) => T._checkable && !T._disabled), w = p.length;
|
|
2016
1968
|
return (
|
|
2017
1969
|
// table.rows.some((e) => e._checkable) && (
|
|
2018
|
-
y.data.some((T) => T._checkable) && $(
|
|
1970
|
+
y.data.some((T) => T._checkable) && $(Se, {
|
|
2019
1971
|
"model-value": !!w && p.every((T) => T._checked),
|
|
2020
1972
|
disabled: !w,
|
|
2021
1973
|
"onUpdate:model-value": (T) => {
|
|
@@ -2032,7 +1984,7 @@ const Dt = {
|
|
|
2032
1984
|
render: (m, {
|
|
2033
1985
|
row: p,
|
|
2034
1986
|
index: w
|
|
2035
|
-
}) => p._checkable && $(
|
|
1987
|
+
}) => p._checkable && $(Se, {
|
|
2036
1988
|
"model-value": p._checked,
|
|
2037
1989
|
disabled: p._disabled,
|
|
2038
1990
|
"onUpdate:model-value": (T) => {
|
|
@@ -2040,11 +1992,11 @@ const Dt = {
|
|
|
2040
1992
|
}
|
|
2041
1993
|
}, null)
|
|
2042
1994
|
}
|
|
2043
|
-
}), s =
|
|
1995
|
+
}), s = Ve({
|
|
2044
1996
|
curr: 1,
|
|
2045
1997
|
size: 30,
|
|
2046
1998
|
total: 0
|
|
2047
|
-
}), k =
|
|
1999
|
+
}), k = P(() => f.value ? !1 : a.transfer), x = P(() => {
|
|
2048
2000
|
const m = [], p = (w) => {
|
|
2049
2001
|
w.slot && m.push(w), w.children && w.children.forEach((T) => {
|
|
2050
2002
|
p(T);
|
|
@@ -2092,23 +2044,23 @@ const Dt = {
|
|
|
2092
2044
|
p._checkable = !0, p._checked = p._disabled = !1;
|
|
2093
2045
|
});
|
|
2094
2046
|
}
|
|
2095
|
-
function
|
|
2096
|
-
typeof a.check == "function" && !a.check() || (a.isLocal ?
|
|
2047
|
+
function S(m) {
|
|
2048
|
+
typeof a.check == "function" && !a.check() || (a.isLocal ? i(m) : D());
|
|
2097
2049
|
}
|
|
2098
|
-
function
|
|
2050
|
+
function i(m) {
|
|
2099
2051
|
let p = m ? s.size * (s.curr - 1) : 0;
|
|
2100
|
-
const w = [], T = p + s.size, Q = T > s.total ? s.total : T,
|
|
2052
|
+
const w = [], T = p + s.size, Q = T > s.total ? s.total : T, ce = a.modelValue;
|
|
2101
2053
|
for (; p < Q; p++)
|
|
2102
|
-
|
|
2054
|
+
ce[p]._checked = ce[p]._disabled = !1, w.push(ce[p]);
|
|
2103
2055
|
y.data = w, n("update:selection", []);
|
|
2104
2056
|
}
|
|
2105
|
-
function
|
|
2106
|
-
|
|
2057
|
+
function c() {
|
|
2058
|
+
S(!0);
|
|
2107
2059
|
}
|
|
2108
|
-
function
|
|
2109
|
-
s.size = m, s.curr === 1 &&
|
|
2060
|
+
function M(m) {
|
|
2061
|
+
s.size = m, s.curr === 1 && S();
|
|
2110
2062
|
}
|
|
2111
|
-
function
|
|
2063
|
+
function _(m) {
|
|
2112
2064
|
m !== !0 && (s.curr = 1), J(D);
|
|
2113
2065
|
}
|
|
2114
2066
|
function ae(m, p) {
|
|
@@ -2118,7 +2070,7 @@ const Dt = {
|
|
|
2118
2070
|
}
|
|
2119
2071
|
function le() {
|
|
2120
2072
|
J(() => {
|
|
2121
|
-
const m = window.innerHeight - +a.bottomDis -
|
|
2073
|
+
const m = window.innerHeight - +a.bottomDis - r.value.$el.getBoundingClientRect().top;
|
|
2122
2074
|
y.maxHeight = m > 0 ? m : 0;
|
|
2123
2075
|
});
|
|
2124
2076
|
}
|
|
@@ -2129,7 +2081,7 @@ const Dt = {
|
|
|
2129
2081
|
};
|
|
2130
2082
|
}
|
|
2131
2083
|
let de;
|
|
2132
|
-
function
|
|
2084
|
+
function K(m, p) {
|
|
2133
2085
|
!a.clickToCheck || !m._checkable || m._disabled || (de = !0, m = y.data[p], m._checked = !m._checked, ae(m, m._checked), n("select", a.pure ? Z(m) : m, m._checked), setTimeout(() => {
|
|
2134
2086
|
de = null;
|
|
2135
2087
|
}));
|
|
@@ -2143,18 +2095,18 @@ const Dt = {
|
|
|
2143
2095
|
};
|
|
2144
2096
|
return delete p._checkable, delete p._checked, delete p._disabled, p;
|
|
2145
2097
|
}
|
|
2146
|
-
function
|
|
2098
|
+
function Te() {
|
|
2147
2099
|
if (a.fullscreen) {
|
|
2148
2100
|
f.value ? document.exitFullscreen() : v.value.requestFullscreen();
|
|
2149
2101
|
return;
|
|
2150
2102
|
}
|
|
2151
|
-
f.value = !f.value, f.value ? (setTimeout(le), document.body.classList.add("clip")) : (y.maxHeight = a.maxHeight ??
|
|
2103
|
+
f.value = !f.value, f.value ? (setTimeout(le), document.body.classList.add("clip")) : (y.maxHeight = a.maxHeight ?? u, document.body.classList.remove("clip"));
|
|
2152
2104
|
}
|
|
2153
|
-
function
|
|
2154
|
-
h.value || (a.isLocal ? n("reload") :
|
|
2105
|
+
function Ae() {
|
|
2106
|
+
h.value || (a.isLocal ? n("reload") : _());
|
|
2155
2107
|
}
|
|
2156
|
-
return
|
|
2157
|
-
search:
|
|
2108
|
+
return B({
|
|
2109
|
+
search: _,
|
|
2158
2110
|
setMaxHeight: le,
|
|
2159
2111
|
table: y,
|
|
2160
2112
|
getPage: () => ({
|
|
@@ -2162,18 +2114,18 @@ const Dt = {
|
|
|
2162
2114
|
curr: s.curr,
|
|
2163
2115
|
total: s.total
|
|
2164
2116
|
})
|
|
2165
|
-
}), o(), s.size = a.initSize || a.pageSizeOpts[0],
|
|
2117
|
+
}), o(), s.size = a.initSize || a.pageSizeOpts[0], re(() => {
|
|
2166
2118
|
!a.maxHeight && a.autoMaxHeight && (le(), J(() => {
|
|
2167
|
-
|
|
2119
|
+
u = y.maxHeight;
|
|
2168
2120
|
})), a.fullscreen && (v.value.onfullscreenchange = () => {
|
|
2169
|
-
f.value = !!document.fullscreenElement, f.value ? setTimeout(le) : y.maxHeight = a.maxHeight ??
|
|
2121
|
+
f.value = !!document.fullscreenElement, f.value ? setTimeout(le) : y.maxHeight = a.maxHeight ?? u;
|
|
2170
2122
|
});
|
|
2171
|
-
}),
|
|
2123
|
+
}), $e(() => {
|
|
2172
2124
|
v.value.onfullscreenchange = null;
|
|
2173
2125
|
}), z(() => a.modelValue, (m) => {
|
|
2174
2126
|
const p = Array.isArray(m) ? m : [];
|
|
2175
2127
|
if (a.isLocal) {
|
|
2176
|
-
s.curr = 1, s.total = p.length, d(p),
|
|
2128
|
+
s.curr = 1, s.total = p.length, d(p), i();
|
|
2177
2129
|
return;
|
|
2178
2130
|
}
|
|
2179
2131
|
b || (s.curr = 1, s.total = p.length, y.data = p);
|
|
@@ -2186,49 +2138,49 @@ const Dt = {
|
|
|
2186
2138
|
}), z(() => a.columns, () => {
|
|
2187
2139
|
o();
|
|
2188
2140
|
}), (m, p) => {
|
|
2189
|
-
const w = O("Col"), T = O("Icon"), Q = O("Tooltip"),
|
|
2190
|
-
return V(),
|
|
2141
|
+
const w = O("Col"), T = O("Icon"), Q = O("Tooltip"), ce = O("Row"), Me = O("Table"), Re = O("Page");
|
|
2142
|
+
return V(), N("div", {
|
|
2191
2143
|
ref: "elRef",
|
|
2192
|
-
class:
|
|
2144
|
+
class: ue(["page-table-container", {
|
|
2193
2145
|
"page-table-bordered": t.border && t.showHeader,
|
|
2194
2146
|
"page-table-maximized": f.value,
|
|
2195
2147
|
"page-table-fullscreen": f.value && t.fullscreen
|
|
2196
2148
|
}])
|
|
2197
|
-
}, [t.showHeader ? (V(),
|
|
2149
|
+
}, [t.showHeader ? (V(), L(ce, {
|
|
2198
2150
|
key: 0,
|
|
2199
2151
|
justify: "space-between",
|
|
2200
2152
|
align: "middle",
|
|
2201
2153
|
class: "page-table-header"
|
|
2202
2154
|
}, {
|
|
2203
|
-
default:
|
|
2204
|
-
default:
|
|
2155
|
+
default: C(() => [$(w, null, {
|
|
2156
|
+
default: C(() => [R(m.$slots, "title", {}, () => [te("h1", Ct, I(t.title ?? F(A).t("pageTable.title")), 1)])]),
|
|
2205
2157
|
_: 3
|
|
2206
2158
|
}), $(w, null, {
|
|
2207
|
-
default:
|
|
2159
|
+
default: C(() => [R(m.$slots, "headerAction"), $(Q, {
|
|
2208
2160
|
placement: "top",
|
|
2209
|
-
content:
|
|
2161
|
+
content: F(A).t("pageTable.reload"),
|
|
2210
2162
|
transfer: k.value,
|
|
2211
2163
|
class: "page-table-action"
|
|
2212
2164
|
}, {
|
|
2213
|
-
default:
|
|
2165
|
+
default: C(() => [$(T, {
|
|
2214
2166
|
type: "md-refresh",
|
|
2215
2167
|
size: "20",
|
|
2216
|
-
onClick:
|
|
2168
|
+
onClick: Ae
|
|
2217
2169
|
})]),
|
|
2218
2170
|
_: 1
|
|
2219
2171
|
}, 8, ["content", "transfer"]), $(Q, {
|
|
2220
2172
|
placement: "top",
|
|
2221
|
-
content:
|
|
2173
|
+
content: F(A).t(`pageTable.${f.value ? "restore" : "maxmize"}`),
|
|
2222
2174
|
transfer: k.value,
|
|
2223
2175
|
class: "page-table-action"
|
|
2224
2176
|
}, {
|
|
2225
|
-
default:
|
|
2177
|
+
default: C(() => [$(T, {
|
|
2226
2178
|
type: f.value ? "md-contract" : "md-expand",
|
|
2227
2179
|
size: "20",
|
|
2228
|
-
onClick:
|
|
2180
|
+
onClick: Te
|
|
2229
2181
|
}, null, 8, ["type"])]),
|
|
2230
2182
|
_: 1
|
|
2231
|
-
}, 8, ["content", "transfer"]), $(
|
|
2183
|
+
}, 8, ["content", "transfer"]), $(we, {
|
|
2232
2184
|
modelValue: g.value,
|
|
2233
2185
|
"onUpdate:modelValue": p[0] || (p[0] = (X) => g.value = X),
|
|
2234
2186
|
size: "20",
|
|
@@ -2236,7 +2188,7 @@ const Dt = {
|
|
|
2236
2188
|
"store-at": t.storeAt,
|
|
2237
2189
|
onChange: p[1] || (p[1] = (X) => m.$emit("change-col", X))
|
|
2238
2190
|
}, {
|
|
2239
|
-
default:
|
|
2191
|
+
default: C(() => [$(T, {
|
|
2240
2192
|
type: "md-settings",
|
|
2241
2193
|
size: "20"
|
|
2242
2194
|
})]),
|
|
@@ -2245,94 +2197,88 @@ const Dt = {
|
|
|
2245
2197
|
_: 3
|
|
2246
2198
|
})]),
|
|
2247
2199
|
_: 3
|
|
2248
|
-
})) : W("", !0), te("div",
|
|
2200
|
+
})) : W("", !0), te("div", St, [$(Me, U({
|
|
2249
2201
|
ref: "tableRef"
|
|
2250
|
-
},
|
|
2202
|
+
}, F(l), {
|
|
2251
2203
|
border: t.border,
|
|
2252
2204
|
columns: g.value,
|
|
2253
2205
|
data: y.data,
|
|
2254
2206
|
loading: h.value,
|
|
2255
2207
|
"max-height": y.maxHeight,
|
|
2256
|
-
onOnRowClick:
|
|
2257
|
-
}),
|
|
2208
|
+
onOnRowClick: K
|
|
2209
|
+
}), De({
|
|
2258
2210
|
_: 2
|
|
2259
2211
|
}, [m.$slots.header ? {
|
|
2260
2212
|
name: "header",
|
|
2261
|
-
fn:
|
|
2213
|
+
fn: C(() => [R(m.$slots, "header")]),
|
|
2262
2214
|
key: "0"
|
|
2263
2215
|
} : void 0, ee(x.value, (X) => ({
|
|
2264
2216
|
name: X.slot,
|
|
2265
|
-
fn:
|
|
2217
|
+
fn: C((Ie) => [R(m.$slots, X.slot, ke(Be(Ie)))])
|
|
2266
2218
|
})), m.$slots.footer ? {
|
|
2267
2219
|
name: "footer",
|
|
2268
|
-
fn:
|
|
2220
|
+
fn: C(() => [R(m.$slots, "footer")]),
|
|
2269
2221
|
key: "1"
|
|
2270
|
-
} : void 0]), 1040, ["border", "columns", "data", "loading", "max-height"]), $(
|
|
2271
|
-
modelValue:
|
|
2272
|
-
"onUpdate:modelValue": p[2] || (p[2] = (X) =>
|
|
2273
|
-
total:
|
|
2274
|
-
"page-size":
|
|
2222
|
+
} : void 0]), 1040, ["border", "columns", "data", "loading", "max-height"]), $(Re, {
|
|
2223
|
+
modelValue: F(s).curr,
|
|
2224
|
+
"onUpdate:modelValue": p[2] || (p[2] = (X) => F(s).curr = X),
|
|
2225
|
+
total: F(s).total,
|
|
2226
|
+
"page-size": F(s).size,
|
|
2275
2227
|
"show-total": "",
|
|
2276
2228
|
"show-sizer": "",
|
|
2277
2229
|
"show-elevator": "",
|
|
2278
2230
|
transfer: k.value,
|
|
2279
2231
|
"page-size-opts": t.pageSizeOpts,
|
|
2280
2232
|
class: "page-table-page-right",
|
|
2281
|
-
onOnChange:
|
|
2282
|
-
onOnPageSizeChange:
|
|
2233
|
+
onOnChange: c,
|
|
2234
|
+
onOnPageSizeChange: M
|
|
2283
2235
|
}, null, 8, ["modelValue", "total", "page-size", "transfer", "page-size-opts"])])], 2);
|
|
2284
2236
|
};
|
|
2285
2237
|
}
|
|
2286
|
-
}),
|
|
2287
|
-
|
|
2288
|
-
|
|
2238
|
+
}), $t = [
|
|
2239
|
+
_e,
|
|
2240
|
+
Je,
|
|
2241
|
+
Ze,
|
|
2289
2242
|
at,
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2243
|
+
it,
|
|
2244
|
+
xe,
|
|
2245
|
+
st,
|
|
2246
|
+
rt,
|
|
2247
|
+
mt,
|
|
2295
2248
|
ht,
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
isSameOrAfter: je,
|
|
2303
|
-
isBetween: Ne
|
|
2304
|
-
};
|
|
2305
|
-
for (const t in Ve)
|
|
2306
|
-
!L.prototype[t] && L.extend(Ve[t]);
|
|
2307
|
-
function At(t, S = {}) {
|
|
2308
|
-
if (wt.forEach((e) => {
|
|
2249
|
+
bt,
|
|
2250
|
+
Dt,
|
|
2251
|
+
we
|
|
2252
|
+
], Ot = { iviewSelect: Oe };
|
|
2253
|
+
function xt(t, B = {}) {
|
|
2254
|
+
if ($t.forEach((e) => {
|
|
2309
2255
|
t.component(e.name, e);
|
|
2310
|
-
}), Object.entries(
|
|
2256
|
+
}), Object.entries(Ot).forEach((e) => {
|
|
2311
2257
|
t.directive(e[0], e[1]);
|
|
2312
|
-
}),
|
|
2313
|
-
|
|
2258
|
+
}), B.i18n) {
|
|
2259
|
+
A.i18n = B.i18n, B.msgPrefix && B.msgPrefix !== "d" && (A.prefix = B.msgPrefix);
|
|
2314
2260
|
return;
|
|
2315
2261
|
}
|
|
2316
|
-
|
|
2262
|
+
B.msg && (A.msg = B.msg);
|
|
2317
2263
|
}
|
|
2318
|
-
const
|
|
2319
|
-
install:
|
|
2264
|
+
const Et = {
|
|
2265
|
+
install: xt
|
|
2320
2266
|
};
|
|
2321
2267
|
export {
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2268
|
+
_e as AllCheckbox,
|
|
2269
|
+
Je as BaseSwitch,
|
|
2270
|
+
it as CacheSelect,
|
|
2271
|
+
Ze as Combi,
|
|
2272
|
+
at as CountRange,
|
|
2273
|
+
st as CurdTable,
|
|
2274
|
+
rt as DateRange,
|
|
2275
|
+
mt as DateRangePicker,
|
|
2276
|
+
ht as MCalendar,
|
|
2277
|
+
bt as ModalFooter,
|
|
2278
|
+
Dt as PageTable,
|
|
2279
|
+
xe as RemoteSelect,
|
|
2280
|
+
we as ToggleColumn,
|
|
2281
|
+
Et as default,
|
|
2282
|
+
xt as install,
|
|
2283
|
+
Oe as iviewSelect
|
|
2338
2284
|
};
|