@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.
Files changed (32) hide show
  1. package/dist/package/globalInfo/index.cjs +1 -1
  2. package/dist/package/globalInfo/index.mjs +1 -1
  3. package/dist/package/index-C0I6Ft6Z.cjs +1 -0
  4. package/dist/package/{index-DImDpEoU.js → index-ENX8_eTS.js} +210 -188
  5. package/dist/package/index.cjs +2 -2
  6. package/dist/package/index.mjs +1826 -1412
  7. package/dist/package/style.css +1 -1
  8. package/dist/package/types/src/components/JtConfirmDialog/index.d.ts +1 -1
  9. package/dist/package/types/src/components/JtConfirmDialog/index.vue.d.ts +9 -1
  10. package/dist/package/types/src/components/JtConfirmDialog/types.d.ts +18 -1
  11. package/dist/package/types/src/components/JtDialog/index.vue.d.ts +9 -6
  12. package/dist/package/types/src/components/JtDialog/types.d.ts +6 -0
  13. package/dist/package/types/src/components/JtDrawer/index.vue.d.ts +6 -5
  14. package/dist/package/types/src/components/form/JtForm.vue.d.ts +24 -0
  15. package/dist/package/types/src/components/form/JtFormItem.vue.d.ts +114 -0
  16. package/dist/package/types/src/components/form/JtFormItems.vue.d.ts +33 -2
  17. package/dist/package/types/src/components/form/formChange.d.ts +5 -0
  18. package/dist/package/types/src/components/form/formControl.d.ts +5 -0
  19. package/dist/package/types/src/components/form/formOption.d.ts +18 -0
  20. package/dist/package/types/src/components/form/index.d.ts +6 -4
  21. package/dist/package/types/src/components/form/item/JtPersonSelect/index.d.ts +2 -0
  22. package/dist/package/types/src/components/form/item/JtPersonSelect/index.vue.d.ts +53 -0
  23. package/dist/package/types/src/components/form/item/JtPersonSelect/types.d.ts +21 -0
  24. package/dist/package/types/src/components/form/item/JtSearchSelect/index.vue.d.ts +4 -0
  25. package/dist/package/types/src/components/form/item/JtSearchSelect/types.d.ts +1 -0
  26. package/dist/package/types/src/components/form/item/index.d.ts +2 -0
  27. package/dist/package/types/src/components/form/types.d.ts +86 -5
  28. package/dist/package/types/src/components/index.d.ts +3 -2
  29. package/dist/package/types/src/components/table/JtCrudTable.vue.d.ts +2 -2
  30. package/dist/package/types/src/main.d.ts +2 -2
  31. package/package.json +1 -1
  32. package/dist/package/index-D9uUSmTc.cjs +0 -1
@@ -1,34 +1,34 @@
1
- import { ElButton as V, ElIcon as J, ElDatePicker as A, ElInput as F, ElSelect as N, ElOption as K, ElTooltip as R } from "element-plus/es";
2
- import { defineComponent as v, useAttrs as H, computed as u, openBlock as p, createBlock as f, mergeProps as h, toHandlers as T, withCtx as y, renderSlot as B, resolveDynamicComponent as D, createCommentVNode as Z, withKeys as Y, createElementBlock as x, Fragment as O, renderList as S, ref as j, onMounted as U, nextTick as k, onBeforeUnmount as G, watch as q, normalizeStyle as Q, normalizeClass as X, createTextVNode as P, toDisplayString as b, createElementVNode as _, createVNode as L, h as $ } from "vue";
3
- import { t as d } from "./locale/index.mjs";
4
- import { inputEmits as W, selectEmits as I, ElMessageBox as ee } from "element-plus";
5
- const E = 2, te = 3;
6
- function oe(l) {
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 <= E)
10
+ if (!l.startsWith("on") || l.length <= O)
11
11
  return !1;
12
- const e = l.charCodeAt(E);
12
+ const e = l.charCodeAt(O);
13
13
  return e < 97 || e > 122;
14
14
  }
15
- function ne(l) {
15
+ function oe(l) {
16
16
  if (l.startsWith("on-"))
17
- return l.slice(te);
18
- const [e, t] = l.slice(E).split(":"), o = oe(e);
19
- return t ? `${o}:${t}` : o;
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 le(l, e = /* @__PURE__ */ new Set()) {
21
+ function ne(l, e = /* @__PURE__ */ new Set()) {
22
22
  return Object.fromEntries(
23
- Object.entries(l).filter(([t, o]) => !e.has(t) && M(t) && typeof o == "function").map(([t, o]) => [ne(t), o])
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 ae(l, e = /* @__PURE__ */ new Set()) {
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 se = /* @__PURE__ */ v({
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(), o = u(() => e.type === "primary"), s = u(() => e.plain === !0), i = u(() => e.size ?? "default"), a = u(() => ({
58
- [`jt-button--size-${i.value}`]: !0,
59
- "jt-button--type-primary": o.value,
60
- "jt-button--plain": s.value,
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
- })), n = u(() => {
64
- const { gray: c, icon: m, size: g, ...w } = e;
63
+ })), o = m(() => {
64
+ const { gray: i, icon: f, size: b, ...w } = e;
65
65
  return {
66
- ...ae(t),
66
+ ...le(t),
67
67
  ...w
68
68
  };
69
- }), r = u(() => le(t));
70
- return (c, m) => {
71
- const g = J, w = V;
72
- return p(), f(w, h({
73
- class: ["jt-button", a.value]
74
- }, n.value, T(r.value)), {
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
- c.$slots.icon ? (p(), f(g, {
76
+ i.$slots.icon ? (p(), d(b, {
77
77
  key: 0,
78
78
  class: "jt-button__icon"
79
79
  }, {
80
80
  default: y(() => [
81
- B(c.$slots, "icon", {}, void 0, !0)
81
+ g(i.$slots, "icon", {}, void 0, !0)
82
82
  ]),
83
83
  _: 3
84
- })) : e.icon ? (p(), f(g, {
84
+ })) : e.icon ? (p(), d(b, {
85
85
  key: 1,
86
86
  class: "jt-button__icon"
87
87
  }, {
88
88
  default: y(() => [
89
- (p(), f(D(e.icon)))
89
+ (p(), d(D(e.icon)))
90
90
  ]),
91
91
  _: 1
92
- })) : Z("", !0),
93
- B(c.$slots, "default", {}, void 0, !0)
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 [o, s] of e)
102
- t[o] = s;
101
+ for (const [s, c] of e)
102
+ t[s] = c;
103
103
  return t;
104
- }, z = /* @__PURE__ */ C(se, [["__scopeId", "data-v-c30ce771"]]), je = /* @__PURE__ */ v({
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: d("common.请选择") },
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, o = e, s = u(() => {
160
- const { preservePlaceholderWhenDisabled: a, ...n } = t;
161
- if (t.disabled && !a) {
162
- const { placeholder: r, startPlaceholder: c, endPlaceholder: m, ...g } = n;
163
- return g;
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
- ...n,
167
- startPlaceholder: t.startPlaceholder ?? (i(t.type) ? d("common.开始日期") : void 0),
168
- endPlaceholder: t.endPlaceholder ?? (i(t.type) ? d("common.结束日期") : void 0)
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 i(a) {
172
- return a?.includes("range") ?? !1;
171
+ function a(n) {
172
+ return n?.includes("range") ?? !1;
173
173
  }
174
- return (a, n) => {
174
+ return (n, o) => {
175
175
  const r = A;
176
- return p(), f(r, h({ class: "jt-date-picker jt-form-control" }, s.value, {
177
- "onUpdate:modelValue": n[0] || (n[0] = (c) => o("update:modelValue", c))
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
- }), re = /* @__PURE__ */ v({
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, o = u(() => {
226
- const { preservePlaceholderWhenDisabled: a, placeholder: n, ...r } = t, c = {
225
+ const t = l, s = m(() => {
226
+ const { preservePlaceholderWhenDisabled: n, placeholder: o, ...r } = t, i = {
227
227
  ...r,
228
228
  // 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
229
- placeholder: n ?? d("common.请输入")
229
+ placeholder: o ?? u("common.请输入")
230
230
  };
231
- return !t.disabled || a ? c : Object.fromEntries(
232
- Object.entries(c).filter(([m]) => m !== "placeholder")
231
+ return !t.disabled || n ? i : Object.fromEntries(
232
+ Object.entries(i).filter(([f]) => f !== "placeholder")
233
233
  );
234
- }), s = e, i = u(() => Object.fromEntries(
235
- Object.keys(W).map((a) => [
236
- a,
237
- (...n) => s(a, ...n)
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 (a, n) => {
240
+ return (n, o) => {
241
241
  const r = F;
242
- return p(), f(r, h({ class: "jt-input jt-form-control" }, o.value, T(i.value), {
243
- onKeyup: n[0] || (n[0] = Y((c) => s("enter"), ["enter"]))
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
- }), Pe = /* @__PURE__ */ C(re, [["__scopeId", "data-v-ddac16c1"]]), ie = /* @__PURE__ */ v({
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, o = u(() => {
308
- const { options: a, placeholder: n, preservePlaceholderWhenDisabled: r, ...c } = t;
309
- return t.disabled && !r ? c : {
310
- ...c,
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: n ?? d("common.请选择")
312
+ placeholder: o ?? u("common.请选择")
313
313
  };
314
- }), s = e, i = u(() => Object.fromEntries(
315
- Object.keys(I).map((a) => [
316
- a,
317
- (...n) => s(a, ...n)
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 (a, n) => {
321
- const r = K, c = N;
322
- return p(), f(c, h({ class: "jt-select jt-form-control" }, o.value, T(i.value)), {
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
- a.$slots.option ? (p(!0), x(O, { key: 0 }, S(a.options ?? [], (m) => (p(), f(r, h({
325
- key: m.value,
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
- }, m), {
327
+ }, f), {
328
328
  default: y(() => [
329
- B(a.$slots, "option", { option: m }, void 0, !0)
329
+ g(n.$slots, "option", { option: f }, void 0, !0)
330
330
  ]),
331
331
  _: 2
332
- }, 1040))), 128)) : (p(!0), x(O, { key: 1 }, S(a.options ?? [], (m) => (p(), f(r, h({
333
- key: m.value,
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
- }, m), null, 16))), 128))
335
+ }, f), null, 16))), 128))
336
336
  ]),
337
337
  _: 3
338
338
  }, 16);
339
339
  };
340
340
  }
341
- }), Ee = /* @__PURE__ */ C(ie, [["__scopeId", "data-v-dc278e7e"]]), ce = /* @__PURE__ */ v({
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 = j(null), o = j(!1);
356
- let s = null;
357
- const i = u(() => ({
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 a() {
362
- const n = t.value;
363
- n && (o.value = n.scrollWidth > n.clientWidth || n.scrollHeight > n.clientHeight || Array.from(n.children).some(
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 U(async () => {
368
- await k(), a(), !(!window.ResizeObserver || !t.value) && (s = new ResizeObserver(a), s.observe(t.value));
369
- }), G(() => {
370
- s?.disconnect();
371
- }), q(
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 k(), a();
374
+ await $(), n();
375
375
  },
376
376
  { deep: !0 }
377
- ), (n, r) => {
378
- const c = R;
379
- return p(), f(c, h({
380
- disabled: !o.value || !e.content,
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
- }, n.$attrs), {
386
+ }, o.$attrs), {
387
387
  default: y(() => [
388
- (p(), f(D(e.tag), {
388
+ (p(), d(D(e.tag), {
389
389
  ref_key: "textRef",
390
390
  ref: t,
391
- class: X([
391
+ class: Q([
392
392
  "jt-overflow-tooltip-text",
393
393
  e.textClass,
394
- { "jt-overflow-tooltip-text--custom": n.$slots.default }
394
+ { "jt-overflow-tooltip-text--custom": o.$slots.default }
395
395
  ]),
396
- style: Q(i.value)
396
+ style: q(a.value)
397
397
  }, {
398
398
  default: y(() => [
399
- B(n.$slots, "default", {}, () => [
400
- P(b(e.content), 1)
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
- }), Te = /* @__PURE__ */ C(ce, [["__scopeId", "data-v-d71a5e82"]]), pe = "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", de = "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", ue = { class: "jt-confirm-dialog-panel" }, me = { class: "jt-confirm-dialog-panel__header" }, fe = { class: "jt-confirm-dialog-panel__title" }, ye = { class: "jt-confirm-dialog__body" }, _e = { class: "jt-confirm-dialog__desc" }, he = { class: "jt-confirm-dialog__footer" }, ve = /* @__PURE__ */ v({
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: d("common.数据启用提示", "数据启用提示") },
415
- desc: { default: d("common.点击确定后,将启用该条数据", "点击确定后,将启用该条数据") },
416
- confirmText: { default: d("common.确定", "确 定") },
417
- cancelText: { default: d("common.取 消", "取 消") },
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 (o, s) => (p(), x("section", ue, [
424
- _("header", me, [
425
- _("div", fe, [
426
- s[3] || (s[3] = _("img", {
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: pe,
430
+ src: ce,
429
431
  alt: ""
430
432
  }, null, -1)),
431
- _("span", null, b(o.title), 1)
433
+ h("span", null, B(a.title), 1)
432
434
  ]),
433
- _("img", {
434
- onClick: s[0] || (s[0] = (i) => t("close")),
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: de,
438
+ src: pe,
437
439
  alt: ""
438
440
  })
439
441
  ]),
440
- _("div", ye, [
441
- B(o.$slots, "default", {}, () => [
442
- _("p", _e, b(o.desc), 1)
442
+ h("div", fe, [
443
+ g(a.$slots, "default", {}, () => [
444
+ h("p", ye, B(a.desc), 1)
443
445
  ], !0)
444
446
  ]),
445
- _("footer", he, [
446
- L(z, {
447
- class: "jt-confirm-dialog__button jt-confirm-dialog__button--cancel",
448
- size: "middle",
449
- gray: "",
450
- disabled: o.confirmLoading,
451
- onClick: s[1] || (s[1] = (i) => t("close"))
452
- }, {
453
- default: y(() => [
454
- P(b(o.cancelText), 1)
455
- ]),
456
- _: 1
457
- }, 8, ["disabled"]),
458
- L(z, {
459
- class: "jt-confirm-dialog__button jt-confirm-dialog__button--confirm",
460
- size: "middle",
461
- type: "primary",
462
- loading: o.confirmLoading,
463
- disabled: o.confirmLoading,
464
- onClick: s[2] || (s[2] = (i) => t("confirm"))
465
- }, {
466
- default: y(() => [
467
- P(b(o.confirmText), 1)
468
- ]),
469
- _: 1
470
- }, 8, ["loading", "disabled"])
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
- }), ge = /* @__PURE__ */ C(ve, [["__scopeId", "data-v-e320b303"]]), be = {
475
- title: d("common.数据启用提示", "数据启用提示"),
476
- desc: d("common.点击确定后,将启用该条数据", "点击确定后,将启用该条数据"),
477
- confirmText: d("common.确认"),
478
- cancelText: d("common.取消")
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 Oe(l = {}) {
481
- const e = { ...be, ...l };
482
- return ee({
483
- message: ({ confirm: t, cancel: o }) => {
484
- const s = v({
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 i = j(!1), a = async () => {
488
- if (!i.value) {
489
- i.value = !0;
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
- i.value = !1;
505
+ a.value = !1;
494
506
  }
495
507
  }
496
508
  };
497
- return () => $(
498
- ge,
499
- {
500
- title: e.title,
501
- desc: e.desc,
502
- confirmText: e.confirmText,
503
- cancelText: e.cancelText,
504
- confirmLoading: i.value,
505
- onClose: o,
506
- onConfirm: a
507
- },
508
- e.content ? { default: e.content } : void 0
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 $(s);
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
- Pe as a,
531
- Te as b,
532
- Ee as c,
533
- je as d,
534
- Oe as e,
535
- ae as o,
536
- le as p
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
  };