@jt-home/mfe-components 8.0.0 → 10.0.0
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/dist/package/globalInfo/index.cjs +1 -1
- package/dist/package/globalInfo/index.mjs +1 -1
- package/dist/package/index-C0I6Ft6Z.cjs +1 -0
- package/dist/package/{index-DImDpEoU.js → index-ENX8_eTS.js} +210 -188
- package/dist/package/index.cjs +2 -2
- package/dist/package/index.mjs +1826 -1412
- package/dist/package/style.css +1 -1
- package/dist/package/types/src/components/JtConfirmDialog/index.d.ts +1 -1
- package/dist/package/types/src/components/JtConfirmDialog/index.vue.d.ts +9 -1
- package/dist/package/types/src/components/JtConfirmDialog/types.d.ts +18 -1
- package/dist/package/types/src/components/JtDialog/index.vue.d.ts +9 -6
- package/dist/package/types/src/components/JtDialog/types.d.ts +6 -0
- package/dist/package/types/src/components/JtDrawer/index.vue.d.ts +6 -5
- package/dist/package/types/src/components/form/JtForm.vue.d.ts +24 -0
- package/dist/package/types/src/components/form/JtFormItem.vue.d.ts +114 -0
- package/dist/package/types/src/components/form/JtFormItems.vue.d.ts +33 -2
- package/dist/package/types/src/components/form/formChange.d.ts +5 -0
- package/dist/package/types/src/components/form/formControl.d.ts +5 -0
- package/dist/package/types/src/components/form/formOption.d.ts +18 -0
- package/dist/package/types/src/components/form/index.d.ts +6 -4
- package/dist/package/types/src/components/form/item/JtPersonSelect/index.d.ts +2 -0
- package/dist/package/types/src/components/form/item/JtPersonSelect/index.vue.d.ts +53 -0
- package/dist/package/types/src/components/form/item/JtPersonSelect/types.d.ts +21 -0
- package/dist/package/types/src/components/form/item/JtSearchSelect/index.vue.d.ts +4 -0
- package/dist/package/types/src/components/form/item/JtSearchSelect/types.d.ts +1 -0
- package/dist/package/types/src/components/form/item/index.d.ts +2 -0
- package/dist/package/types/src/components/form/types.d.ts +86 -5
- package/dist/package/types/src/components/index.d.ts +3 -2
- package/dist/package/types/src/components/table/JtCrudTable.vue.d.ts +2 -2
- package/dist/package/types/src/main.d.ts +2 -2
- package/package.json +1 -1
- package/dist/package/index-D9uUSmTc.cjs +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { ElButton as
|
|
2
|
-
import { defineComponent as v, useAttrs as H, computed as
|
|
3
|
-
import { t as
|
|
4
|
-
import { inputEmits as W, selectEmits as I, ElMessageBox as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
1
|
+
import { ElButton as J, ElIcon as V, ElDatePicker as A, ElInput as F, ElSelect as K, ElOption as N, ElTooltip as R } from "element-plus/es";
|
|
2
|
+
import { defineComponent as v, useAttrs as H, computed as m, openBlock as p, createBlock as d, mergeProps as _, toHandlers as k, withCtx as y, renderSlot as g, resolveDynamicComponent as D, createCommentVNode as j, withKeys as Z, createElementBlock as P, Fragment as L, renderList as S, ref as E, onMounted as Y, nextTick as $, onBeforeUnmount as U, watch as G, normalizeStyle as q, normalizeClass as Q, createTextVNode as T, toDisplayString as B, createElementVNode as h, h as x } from "vue";
|
|
3
|
+
import { t as u } from "./locale/index.mjs";
|
|
4
|
+
import { inputEmits as W, selectEmits as I, ElMessageBox as X } from "element-plus";
|
|
5
|
+
const O = 2, ee = 3;
|
|
6
|
+
function te(l) {
|
|
7
7
|
return l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
8
8
|
}
|
|
9
9
|
function M(l) {
|
|
10
|
-
if (!l.startsWith("on") || l.length <=
|
|
10
|
+
if (!l.startsWith("on") || l.length <= O)
|
|
11
11
|
return !1;
|
|
12
|
-
const e = l.charCodeAt(
|
|
12
|
+
const e = l.charCodeAt(O);
|
|
13
13
|
return e < 97 || e > 122;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function oe(l) {
|
|
16
16
|
if (l.startsWith("on-"))
|
|
17
|
-
return l.slice(
|
|
18
|
-
const [e, t] = l.slice(
|
|
19
|
-
return t ? `${
|
|
17
|
+
return l.slice(ee);
|
|
18
|
+
const [e, t] = l.slice(O).split(":"), s = te(e);
|
|
19
|
+
return t ? `${s}:${t}` : s;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function ne(l, e = /* @__PURE__ */ new Set()) {
|
|
22
22
|
return Object.fromEntries(
|
|
23
|
-
Object.entries(l).filter(([t,
|
|
23
|
+
Object.entries(l).filter(([t, s]) => !e.has(t) && M(t) && typeof s == "function").map(([t, s]) => [oe(t), s])
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function le(l, e = /* @__PURE__ */ new Set()) {
|
|
27
27
|
return Object.fromEntries(
|
|
28
28
|
Object.entries(l).filter(([t]) => !e.has(t) && !M(t))
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const ae = /* @__PURE__ */ v({
|
|
32
32
|
name: "JtButton",
|
|
33
33
|
__name: "index",
|
|
34
34
|
props: {
|
|
@@ -54,43 +54,43 @@ const se = /* @__PURE__ */ v({
|
|
|
54
54
|
gray: { type: Boolean }
|
|
55
55
|
},
|
|
56
56
|
setup(l) {
|
|
57
|
-
const e = l, t = H(),
|
|
58
|
-
[`jt-button--size-${
|
|
59
|
-
"jt-button--type-primary":
|
|
60
|
-
"jt-button--plain":
|
|
57
|
+
const e = l, t = H(), s = m(() => e.type === "primary"), c = m(() => e.plain === !0), a = m(() => e.size ?? "default"), n = m(() => ({
|
|
58
|
+
[`jt-button--size-${a.value}`]: !0,
|
|
59
|
+
"jt-button--type-primary": s.value,
|
|
60
|
+
"jt-button--plain": c.value,
|
|
61
61
|
"jt-button--gray": e.gray,
|
|
62
62
|
"jt-button--border": !0
|
|
63
|
-
})),
|
|
64
|
-
const { gray:
|
|
63
|
+
})), o = m(() => {
|
|
64
|
+
const { gray: i, icon: f, size: b, ...w } = e;
|
|
65
65
|
return {
|
|
66
|
-
...
|
|
66
|
+
...le(t),
|
|
67
67
|
...w
|
|
68
68
|
};
|
|
69
|
-
}), r =
|
|
70
|
-
return (
|
|
71
|
-
const
|
|
72
|
-
return p(),
|
|
73
|
-
class: ["jt-button",
|
|
74
|
-
},
|
|
69
|
+
}), r = m(() => ne(t));
|
|
70
|
+
return (i, f) => {
|
|
71
|
+
const b = V, w = J;
|
|
72
|
+
return p(), d(w, _({
|
|
73
|
+
class: ["jt-button", n.value]
|
|
74
|
+
}, o.value, k(r.value)), {
|
|
75
75
|
default: y(() => [
|
|
76
|
-
|
|
76
|
+
i.$slots.icon ? (p(), d(b, {
|
|
77
77
|
key: 0,
|
|
78
78
|
class: "jt-button__icon"
|
|
79
79
|
}, {
|
|
80
80
|
default: y(() => [
|
|
81
|
-
|
|
81
|
+
g(i.$slots, "icon", {}, void 0, !0)
|
|
82
82
|
]),
|
|
83
83
|
_: 3
|
|
84
|
-
})) : e.icon ? (p(),
|
|
84
|
+
})) : e.icon ? (p(), d(b, {
|
|
85
85
|
key: 1,
|
|
86
86
|
class: "jt-button__icon"
|
|
87
87
|
}, {
|
|
88
88
|
default: y(() => [
|
|
89
|
-
(p(),
|
|
89
|
+
(p(), d(D(e.icon)))
|
|
90
90
|
]),
|
|
91
91
|
_: 1
|
|
92
|
-
})) :
|
|
93
|
-
|
|
92
|
+
})) : j("", !0),
|
|
93
|
+
g(i.$slots, "default", {}, void 0, !0)
|
|
94
94
|
]),
|
|
95
95
|
_: 3
|
|
96
96
|
}, 16, ["class"]);
|
|
@@ -98,10 +98,10 @@ const se = /* @__PURE__ */ v({
|
|
|
98
98
|
}
|
|
99
99
|
}), C = (l, e) => {
|
|
100
100
|
const t = l.__vccOpts || l;
|
|
101
|
-
for (const [
|
|
102
|
-
t[
|
|
101
|
+
for (const [s, c] of e)
|
|
102
|
+
t[s] = c;
|
|
103
103
|
return t;
|
|
104
|
-
}, z = /* @__PURE__ */ C(
|
|
104
|
+
}, z = /* @__PURE__ */ C(ae, [["__scopeId", "data-v-c30ce771"]]), xe = /* @__PURE__ */ v({
|
|
105
105
|
name: "JtDatePicker",
|
|
106
106
|
__name: "index",
|
|
107
107
|
props: {
|
|
@@ -143,7 +143,7 @@ const se = /* @__PURE__ */ v({
|
|
|
143
143
|
size: {},
|
|
144
144
|
readonly: { type: Boolean },
|
|
145
145
|
disabled: { type: Boolean },
|
|
146
|
-
placeholder: { default:
|
|
146
|
+
placeholder: { default: u("common.请选择") },
|
|
147
147
|
popperOptions: {},
|
|
148
148
|
modelValue: {},
|
|
149
149
|
rangeSeparator: {},
|
|
@@ -156,29 +156,29 @@ const se = /* @__PURE__ */ v({
|
|
|
156
156
|
},
|
|
157
157
|
emits: ["update:modelValue"],
|
|
158
158
|
setup(l, { emit: e }) {
|
|
159
|
-
const t = l,
|
|
160
|
-
const { preservePlaceholderWhenDisabled:
|
|
161
|
-
if (t.disabled && !
|
|
162
|
-
const { placeholder: r, startPlaceholder:
|
|
163
|
-
return
|
|
159
|
+
const t = l, s = e, c = m(() => {
|
|
160
|
+
const { preservePlaceholderWhenDisabled: n, ...o } = t;
|
|
161
|
+
if (t.disabled && !n) {
|
|
162
|
+
const { placeholder: r, startPlaceholder: i, endPlaceholder: f, ...b } = o;
|
|
163
|
+
return b;
|
|
164
164
|
}
|
|
165
165
|
return {
|
|
166
|
-
...
|
|
167
|
-
startPlaceholder: t.startPlaceholder ?? (
|
|
168
|
-
endPlaceholder: t.endPlaceholder ?? (
|
|
166
|
+
...o,
|
|
167
|
+
startPlaceholder: t.startPlaceholder ?? (a(t.type) ? u("common.开始日期") : void 0),
|
|
168
|
+
endPlaceholder: t.endPlaceholder ?? (a(t.type) ? u("common.结束日期") : void 0)
|
|
169
169
|
};
|
|
170
170
|
});
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function a(n) {
|
|
172
|
+
return n?.includes("range") ?? !1;
|
|
173
173
|
}
|
|
174
|
-
return (
|
|
174
|
+
return (n, o) => {
|
|
175
175
|
const r = A;
|
|
176
|
-
return p(),
|
|
177
|
-
"onUpdate:modelValue":
|
|
176
|
+
return p(), d(r, _({ class: "jt-date-picker jt-form-control" }, c.value, {
|
|
177
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => s("update:modelValue", i))
|
|
178
178
|
}), null, 16);
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
}),
|
|
181
|
+
}), se = /* @__PURE__ */ v({
|
|
182
182
|
name: "JtInput",
|
|
183
183
|
__name: "index",
|
|
184
184
|
props: {
|
|
@@ -222,29 +222,29 @@ const se = /* @__PURE__ */ v({
|
|
|
222
222
|
enter: () => !0
|
|
223
223
|
},
|
|
224
224
|
setup(l, { emit: e }) {
|
|
225
|
-
const t = l,
|
|
226
|
-
const { preservePlaceholderWhenDisabled:
|
|
225
|
+
const t = l, s = m(() => {
|
|
226
|
+
const { preservePlaceholderWhenDisabled: n, placeholder: o, ...r } = t, i = {
|
|
227
227
|
...r,
|
|
228
228
|
// 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
|
|
229
|
-
placeholder:
|
|
229
|
+
placeholder: o ?? u("common.请输入")
|
|
230
230
|
};
|
|
231
|
-
return !t.disabled ||
|
|
232
|
-
Object.entries(
|
|
231
|
+
return !t.disabled || n ? i : Object.fromEntries(
|
|
232
|
+
Object.entries(i).filter(([f]) => f !== "placeholder")
|
|
233
233
|
);
|
|
234
|
-
}),
|
|
235
|
-
Object.keys(W).map((
|
|
236
|
-
|
|
237
|
-
(...
|
|
234
|
+
}), c = e, a = m(() => Object.fromEntries(
|
|
235
|
+
Object.keys(W).map((n) => [
|
|
236
|
+
n,
|
|
237
|
+
(...o) => c(n, ...o)
|
|
238
238
|
])
|
|
239
239
|
));
|
|
240
|
-
return (
|
|
240
|
+
return (n, o) => {
|
|
241
241
|
const r = F;
|
|
242
|
-
return p(),
|
|
243
|
-
onKeyup:
|
|
242
|
+
return p(), d(r, _({ class: "jt-input jt-form-control" }, s.value, k(a.value), {
|
|
243
|
+
onKeyup: o[0] || (o[0] = Z((i) => c("enter"), ["enter"]))
|
|
244
244
|
}), null, 16);
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
|
-
}),
|
|
247
|
+
}), je = /* @__PURE__ */ C(se, [["__scopeId", "data-v-ddac16c1"]]), re = /* @__PURE__ */ v({
|
|
248
248
|
name: "JtSelect",
|
|
249
249
|
__name: "index",
|
|
250
250
|
props: {
|
|
@@ -304,41 +304,41 @@ const se = /* @__PURE__ */ v({
|
|
|
304
304
|
},
|
|
305
305
|
emits: I,
|
|
306
306
|
setup(l, { emit: e }) {
|
|
307
|
-
const t = l,
|
|
308
|
-
const { options:
|
|
309
|
-
return t.disabled && !r ?
|
|
310
|
-
...
|
|
307
|
+
const t = l, s = m(() => {
|
|
308
|
+
const { options: n, placeholder: o, preservePlaceholderWhenDisabled: r, ...i } = t;
|
|
309
|
+
return t.disabled && !r ? i : {
|
|
310
|
+
...i,
|
|
311
311
|
// 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
|
|
312
|
-
placeholder:
|
|
312
|
+
placeholder: o ?? u("common.请选择")
|
|
313
313
|
};
|
|
314
|
-
}),
|
|
315
|
-
Object.keys(I).map((
|
|
316
|
-
|
|
317
|
-
(...
|
|
314
|
+
}), c = e, a = m(() => Object.fromEntries(
|
|
315
|
+
Object.keys(I).map((n) => [
|
|
316
|
+
n,
|
|
317
|
+
(...o) => c(n, ...o)
|
|
318
318
|
])
|
|
319
319
|
));
|
|
320
|
-
return (
|
|
321
|
-
const r =
|
|
322
|
-
return p(),
|
|
320
|
+
return (n, o) => {
|
|
321
|
+
const r = N, i = K;
|
|
322
|
+
return p(), d(i, _({ class: "jt-select jt-form-control" }, s.value, k(a.value)), {
|
|
323
323
|
default: y(() => [
|
|
324
|
-
|
|
325
|
-
key:
|
|
324
|
+
n.$slots.option ? (p(!0), P(L, { key: 0 }, S(n.options ?? [], (f) => (p(), d(r, _({
|
|
325
|
+
key: f.value,
|
|
326
326
|
ref_for: !0
|
|
327
|
-
},
|
|
327
|
+
}, f), {
|
|
328
328
|
default: y(() => [
|
|
329
|
-
|
|
329
|
+
g(n.$slots, "option", { option: f }, void 0, !0)
|
|
330
330
|
]),
|
|
331
331
|
_: 2
|
|
332
|
-
}, 1040))), 128)) : (p(!0),
|
|
333
|
-
key:
|
|
332
|
+
}, 1040))), 128)) : (p(!0), P(L, { key: 1 }, S(n.options ?? [], (f) => (p(), d(r, _({
|
|
333
|
+
key: f.value,
|
|
334
334
|
ref_for: !0
|
|
335
|
-
},
|
|
335
|
+
}, f), null, 16))), 128))
|
|
336
336
|
]),
|
|
337
337
|
_: 3
|
|
338
338
|
}, 16);
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
}),
|
|
341
|
+
}), Pe = /* @__PURE__ */ C(re, [["__scopeId", "data-v-dc278e7e"]]), ie = /* @__PURE__ */ v({
|
|
342
342
|
name: "JtOverflowTooltipText",
|
|
343
343
|
__name: "index",
|
|
344
344
|
props: {
|
|
@@ -352,52 +352,52 @@ const se = /* @__PURE__ */ v({
|
|
|
352
352
|
textStyle: {}
|
|
353
353
|
},
|
|
354
354
|
setup(l) {
|
|
355
|
-
const e = l, t =
|
|
356
|
-
let
|
|
357
|
-
const
|
|
355
|
+
const e = l, t = E(null), s = E(!1);
|
|
356
|
+
let c = null;
|
|
357
|
+
const a = m(() => ({
|
|
358
358
|
maxWidth: typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth,
|
|
359
359
|
...e.textStyle
|
|
360
360
|
}));
|
|
361
|
-
function
|
|
362
|
-
const
|
|
363
|
-
|
|
361
|
+
function n() {
|
|
362
|
+
const o = t.value;
|
|
363
|
+
o && (s.value = o.scrollWidth > o.clientWidth || o.scrollHeight > o.clientHeight || Array.from(o.children).some(
|
|
364
364
|
(r) => r.scrollWidth > r.clientWidth || r.scrollHeight > r.clientHeight
|
|
365
365
|
));
|
|
366
366
|
}
|
|
367
|
-
return
|
|
368
|
-
await
|
|
369
|
-
}),
|
|
370
|
-
|
|
371
|
-
}),
|
|
367
|
+
return Y(async () => {
|
|
368
|
+
await $(), n(), !(!window.ResizeObserver || !t.value) && (c = new ResizeObserver(n), c.observe(t.value));
|
|
369
|
+
}), U(() => {
|
|
370
|
+
c?.disconnect();
|
|
371
|
+
}), G(
|
|
372
372
|
() => [e.content, e.maxWidth, e.textStyle],
|
|
373
373
|
async () => {
|
|
374
|
-
await
|
|
374
|
+
await $(), n();
|
|
375
375
|
},
|
|
376
376
|
{ deep: !0 }
|
|
377
|
-
), (
|
|
378
|
-
const
|
|
379
|
-
return p(),
|
|
380
|
-
disabled: !
|
|
377
|
+
), (o, r) => {
|
|
378
|
+
const i = R;
|
|
379
|
+
return p(), d(i, _({
|
|
380
|
+
disabled: !s.value || !e.content,
|
|
381
381
|
content: e.content,
|
|
382
382
|
placement: e.placement,
|
|
383
383
|
effect: e.effect,
|
|
384
384
|
"popper-class": e.popperClass,
|
|
385
385
|
"show-arrow": !1
|
|
386
|
-
},
|
|
386
|
+
}, o.$attrs), {
|
|
387
387
|
default: y(() => [
|
|
388
|
-
(p(),
|
|
388
|
+
(p(), d(D(e.tag), {
|
|
389
389
|
ref_key: "textRef",
|
|
390
390
|
ref: t,
|
|
391
|
-
class:
|
|
391
|
+
class: Q([
|
|
392
392
|
"jt-overflow-tooltip-text",
|
|
393
393
|
e.textClass,
|
|
394
|
-
{ "jt-overflow-tooltip-text--custom":
|
|
394
|
+
{ "jt-overflow-tooltip-text--custom": o.$slots.default }
|
|
395
395
|
]),
|
|
396
|
-
style:
|
|
396
|
+
style: q(a.value)
|
|
397
397
|
}, {
|
|
398
398
|
default: y(() => [
|
|
399
|
-
|
|
400
|
-
|
|
399
|
+
g(o.$slots, "default", {}, () => [
|
|
400
|
+
T(B(e.content), 1)
|
|
401
401
|
], !0)
|
|
402
402
|
]),
|
|
403
403
|
_: 3
|
|
@@ -407,109 +407,131 @@ const se = /* @__PURE__ */ v({
|
|
|
407
407
|
}, 16, ["disabled", "content", "placement", "effect", "popper-class"]);
|
|
408
408
|
};
|
|
409
409
|
}
|
|
410
|
-
}),
|
|
410
|
+
}), Ee = /* @__PURE__ */ C(ie, [["__scopeId", "data-v-d71a5e82"]]), ce = "data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%202C6.04082%202%202%206.04082%202%2011C2%2015.9592%206.04082%2020%2011%2020C15.9592%2020%2020%2015.9592%2020%2011C20%206.04082%2015.9592%202%2011%202ZM10.2653%207.78572C10.2653%207.41837%2010.5408%207.05102%2011%207.05102C11.4592%207.05102%2011.7347%207.32653%2011.7347%207.78572V11.4592C11.7347%2011.8265%2011.4592%2012.1939%2011%2012.1939C10.5408%2012.1939%2010.2653%2011.9184%2010.2653%2011.4592V7.78572ZM11%2015.1327C10.5408%2015.1327%2010.0816%2014.6735%2010.0816%2014.2143C10.0816%2013.7551%2010.5408%2013.2959%2011%2013.2959C11.4592%2013.2959%2011.9184%2013.7551%2011.9184%2014.2143C11.9184%2014.6735%2011.4592%2015.1327%2011%2015.1327Z'%20fill='%23E60000'/%3e%3c/svg%3e", pe = "data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='28'%20height='28'%20rx='14'%20fill='%23F9F9F9'/%3e%3cpath%20d='M19.7294%207.21079C20.0223%206.91808%2020.4971%206.91797%2020.79%207.21079C21.0828%207.50362%2021.0827%207.97843%2020.79%208.27134L15.0615%2013.9999L20.79%2019.7284C21.0828%2020.0212%2021.0827%2020.496%2020.79%2020.7889C20.4971%2021.0818%2020.0223%2021.0818%2019.7294%2020.7889L14.0009%2015.0604L8.2724%2020.7889C7.97952%2021.0818%207.50475%2021.0818%207.21186%2020.7889C6.91898%2020.496%206.91897%2020.0213%207.21186%2019.7284L12.9404%2013.9999L7.21186%208.27134C6.91896%207.97844%206.91896%207.50368%207.21186%207.21079C7.50477%206.91808%207.97957%206.91796%208.2724%207.21079L14.0009%2012.9393L19.7294%207.21079Z'%20fill='%23666666'/%3e%3c/svg%3e", de = { class: "jt-confirm-dialog-panel" }, ue = { class: "jt-confirm-dialog-panel__header" }, me = { class: "jt-confirm-dialog-panel__title" }, fe = { class: "jt-confirm-dialog__body" }, ye = { class: "jt-confirm-dialog__desc" }, he = { class: "jt-confirm-dialog__footer" }, _e = /* @__PURE__ */ v({
|
|
411
411
|
name: "JtConfirmDialog",
|
|
412
412
|
__name: "index",
|
|
413
413
|
props: {
|
|
414
|
-
title: { default:
|
|
415
|
-
desc: { default:
|
|
416
|
-
confirmText: { default:
|
|
417
|
-
cancelText: { default:
|
|
414
|
+
title: { default: u("common.数据启用提示", "数据启用提示") },
|
|
415
|
+
desc: { default: u("common.点击确定后,将启用该条数据", "点击确定后,将启用该条数据") },
|
|
416
|
+
confirmText: { default: u("common.确定", "确 定") },
|
|
417
|
+
cancelText: { default: u("common.取 消", "取 消") },
|
|
418
|
+
showCancel: { type: Boolean, default: !0 },
|
|
419
|
+
showConfirm: { type: Boolean, default: !0 },
|
|
418
420
|
confirmLoading: { type: Boolean, default: !1 }
|
|
419
421
|
},
|
|
420
422
|
emits: ["close", "confirm"],
|
|
421
423
|
setup(l, { emit: e }) {
|
|
422
|
-
const t = e;
|
|
423
|
-
return (
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
const t = e, s = () => t("close"), c = () => t("confirm");
|
|
425
|
+
return (a, n) => (p(), P("section", de, [
|
|
426
|
+
h("header", ue, [
|
|
427
|
+
h("div", me, [
|
|
428
|
+
n[1] || (n[1] = h("img", {
|
|
427
429
|
class: "jt-confirm-dialog-panel__icon",
|
|
428
|
-
src:
|
|
430
|
+
src: ce,
|
|
429
431
|
alt: ""
|
|
430
432
|
}, null, -1)),
|
|
431
|
-
|
|
433
|
+
h("span", null, B(a.title), 1)
|
|
432
434
|
]),
|
|
433
|
-
|
|
434
|
-
onClick:
|
|
435
|
+
h("img", {
|
|
436
|
+
onClick: n[0] || (n[0] = (o) => t("close")),
|
|
435
437
|
class: "jt-confirm-dialog-panel__close jt-confirm-dialog-panel__close-icon",
|
|
436
|
-
src:
|
|
438
|
+
src: pe,
|
|
437
439
|
alt: ""
|
|
438
440
|
})
|
|
439
441
|
]),
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
442
|
+
h("div", fe, [
|
|
443
|
+
g(a.$slots, "default", {}, () => [
|
|
444
|
+
h("p", ye, B(a.desc), 1)
|
|
443
445
|
], !0)
|
|
444
446
|
]),
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
disabled:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
447
|
+
h("footer", he, [
|
|
448
|
+
g(a.$slots, "footer", {
|
|
449
|
+
confirm: c,
|
|
450
|
+
cancel: s,
|
|
451
|
+
confirmLoading: a.confirmLoading
|
|
452
|
+
}, () => [
|
|
453
|
+
a.showCancel ? (p(), d(z, {
|
|
454
|
+
key: 0,
|
|
455
|
+
class: "jt-confirm-dialog__button jt-confirm-dialog__button--cancel",
|
|
456
|
+
size: "middle",
|
|
457
|
+
gray: "",
|
|
458
|
+
disabled: a.confirmLoading,
|
|
459
|
+
onClick: s
|
|
460
|
+
}, {
|
|
461
|
+
default: y(() => [
|
|
462
|
+
T(B(a.cancelText), 1)
|
|
463
|
+
]),
|
|
464
|
+
_: 1
|
|
465
|
+
}, 8, ["disabled"])) : j("", !0),
|
|
466
|
+
a.showConfirm ? (p(), d(z, {
|
|
467
|
+
key: 1,
|
|
468
|
+
class: "jt-confirm-dialog__button jt-confirm-dialog__button--confirm",
|
|
469
|
+
size: "middle",
|
|
470
|
+
type: "primary",
|
|
471
|
+
loading: a.confirmLoading,
|
|
472
|
+
disabled: a.confirmLoading,
|
|
473
|
+
onClick: c
|
|
474
|
+
}, {
|
|
475
|
+
default: y(() => [
|
|
476
|
+
T(B(a.confirmText), 1)
|
|
477
|
+
]),
|
|
478
|
+
_: 1
|
|
479
|
+
}, 8, ["loading", "disabled"])) : j("", !0)
|
|
480
|
+
], !0)
|
|
471
481
|
])
|
|
472
482
|
]));
|
|
473
483
|
}
|
|
474
|
-
}),
|
|
475
|
-
title:
|
|
476
|
-
desc:
|
|
477
|
-
confirmText:
|
|
478
|
-
cancelText:
|
|
484
|
+
}), ve = /* @__PURE__ */ C(_e, [["__scopeId", "data-v-0c3d3fd6"]]), ge = {
|
|
485
|
+
title: u("common.数据启用提示", "数据启用提示"),
|
|
486
|
+
desc: u("common.点击确定后,将启用该条数据", "点击确定后,将启用该条数据"),
|
|
487
|
+
confirmText: u("common.确认"),
|
|
488
|
+
cancelText: u("common.取消"),
|
|
489
|
+
showCancel: !0,
|
|
490
|
+
showConfirm: !0
|
|
479
491
|
};
|
|
480
|
-
function
|
|
481
|
-
const e = { ...
|
|
482
|
-
return
|
|
483
|
-
message: ({ confirm: t, cancel:
|
|
484
|
-
const
|
|
492
|
+
function Te(l = {}) {
|
|
493
|
+
const e = { ...ge, ...l };
|
|
494
|
+
return X({
|
|
495
|
+
message: ({ confirm: t, cancel: s }) => {
|
|
496
|
+
const c = v({
|
|
485
497
|
name: "JtConfirmDialogMessage",
|
|
486
498
|
setup() {
|
|
487
|
-
const
|
|
488
|
-
if (!
|
|
489
|
-
|
|
499
|
+
const a = E(!1), n = async () => {
|
|
500
|
+
if (!a.value) {
|
|
501
|
+
a.value = !0;
|
|
490
502
|
try {
|
|
491
503
|
await e.onConfirm?.(), t();
|
|
492
504
|
} finally {
|
|
493
|
-
|
|
505
|
+
a.value = !1;
|
|
494
506
|
}
|
|
495
507
|
}
|
|
496
508
|
};
|
|
497
|
-
return () =>
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
509
|
+
return () => {
|
|
510
|
+
const o = e.footer, r = e.content || o ? {
|
|
511
|
+
...e.content ? { default: e.content } : {},
|
|
512
|
+
...o ? {
|
|
513
|
+
footer: typeof o == "function" ? o : (i) => x(o, i)
|
|
514
|
+
} : {}
|
|
515
|
+
} : void 0;
|
|
516
|
+
return x(
|
|
517
|
+
ve,
|
|
518
|
+
{
|
|
519
|
+
title: e.title,
|
|
520
|
+
desc: e.desc,
|
|
521
|
+
confirmText: e.confirmText,
|
|
522
|
+
cancelText: e.cancelText,
|
|
523
|
+
showCancel: e.showCancel,
|
|
524
|
+
showConfirm: e.showConfirm,
|
|
525
|
+
confirmLoading: a.value,
|
|
526
|
+
onClose: s,
|
|
527
|
+
onConfirm: n
|
|
528
|
+
},
|
|
529
|
+
r
|
|
530
|
+
);
|
|
531
|
+
};
|
|
510
532
|
}
|
|
511
533
|
});
|
|
512
|
-
return
|
|
534
|
+
return x(c);
|
|
513
535
|
},
|
|
514
536
|
customClass: "jt-confirm-message-box-host",
|
|
515
537
|
customStyle: {
|
|
@@ -527,11 +549,11 @@ function Oe(l = {}) {
|
|
|
527
549
|
export {
|
|
528
550
|
z as J,
|
|
529
551
|
C as _,
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
552
|
+
je as a,
|
|
553
|
+
Ee as b,
|
|
554
|
+
Pe as c,
|
|
555
|
+
xe as d,
|
|
556
|
+
Te as e,
|
|
557
|
+
le as o,
|
|
558
|
+
ne as p
|
|
537
559
|
};
|