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