vue-popup-plus-plugin-preset 1.2.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -380,7 +380,7 @@ const be = ["src"], he = ["poster", "src"], we = {
380
380
  ]))
381
381
  ], 32));
382
382
  }
383
- }), Le = /* @__PURE__ */ de(Ce, [["__scopeId", "data-v-bdd4da57"]]);
383
+ }), Le = /* @__PURE__ */ de(Ce, [["__scopeId", "data-v-9ef9f86f"]]);
384
384
  export {
385
385
  Le as default
386
386
  };
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as d, inject as c, createElementBlock as m, openBlock as f, createVNode as e, withCtx as t, createElementVNode as u, toDisplayString as r, createTextVNode as p } from "vue";
2
2
  import { usePopup as P, POPUP_COMPONENT_INJECTS as _ } from "vue-popup-plus";
3
- import { P as g, a as C, b as N } from "./PBody-Ch7KaMyj.js";
4
- import { P as x } from "./PFooter-Dd8fzezl.js";
5
- import { P as B, a as T } from "./PButtonGroup-DOwvv6ZF.js";
6
- import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ import { P as g, a as C, b as N } from "./PBody-CggbeZs9.js";
4
+ import { P as x } from "./PFooter-Cp_J7xg-.js";
5
+ import { P as b, a as B } from "./PButtonGroup-C-RNjqPq.js";
6
+ import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const v = { class: "p-alert" }, y = { class: "content" }, E = /* @__PURE__ */ d({
8
8
  name: "PAlert",
9
9
  __name: "PAlert",
@@ -31,9 +31,9 @@ const v = { class: "p-alert" }, y = { class: "content" }, E = /* @__PURE__ */ d(
31
31
  footer: t(() => [
32
32
  e(x, null, {
33
33
  default: t(() => [
34
- e(B, { align: "right" }, {
34
+ e(b, { align: "right" }, {
35
35
  default: t(() => [
36
- e(T, {
36
+ e(B, {
37
37
  onClick: n[1] || (n[1] = (s) => a()),
38
38
  theme: "primary"
39
39
  }, {
@@ -61,7 +61,7 @@ const v = { class: "p-alert" }, y = { class: "content" }, E = /* @__PURE__ */ d(
61
61
  })
62
62
  ]));
63
63
  }
64
- }), D = /* @__PURE__ */ b(E, [["__scopeId", "data-v-1501446e"]]);
64
+ }), D = /* @__PURE__ */ T(E, [["__scopeId", "data-v-9b975218"]]);
65
65
  export {
66
66
  D as default
67
67
  };
@@ -13,7 +13,7 @@ const V = { class: "p-scaffold" }, x = { class: "body" }, j = /* @__PURE__ */ p(
13
13
  c(a.$slots, "footer", {}, void 0, !0)
14
14
  ]));
15
15
  }
16
- }), Z = /* @__PURE__ */ g(j, [["__scopeId", "data-v-04880725"]]), U = /* @__PURE__ */ p({
16
+ }), Z = /* @__PURE__ */ g(j, [["__scopeId", "data-v-1e341233"]]), U = /* @__PURE__ */ p({
17
17
  name: "PHeaderButton",
18
18
  __name: "PHeaderButton",
19
19
  props: {
@@ -26,8 +26,8 @@ const V = { class: "p-scaffold" }, x = { class: "body" }, j = /* @__PURE__ */ p(
26
26
  emits: ["click"],
27
27
  setup(e, { emit: a }) {
28
28
  I((i) => ({
29
- v2f05293a: `${i.size}px`,
30
- v45c9dc5a: `${v.value}px`
29
+ a2481b06: `${i.size}px`,
30
+ d3d4fcd4: `${v.value}px`
31
31
  }));
32
32
  const l = a, h = w(() => ({
33
33
  [`is-theme-${e.theme}`]: !0,
@@ -46,7 +46,7 @@ const V = { class: "p-scaffold" }, x = { class: "body" }, j = /* @__PURE__ */ p(
46
46
  }, null, 2)
47
47
  ], 2));
48
48
  }
49
- }), A = /* @__PURE__ */ g(U, [["__scopeId", "data-v-1eaab056"]]), J = {
49
+ }), A = /* @__PURE__ */ g(U, [["__scopeId", "data-v-4c24ccc2"]]), J = {
50
50
  key: 0,
51
51
  class: "icon"
52
52
  }, W = { class: "title" }, q = { class: "btn-ctn" }, F = /* @__PURE__ */ p({
@@ -62,28 +62,28 @@ const V = { class: "p-scaffold" }, x = { class: "body" }, j = /* @__PURE__ */ p(
62
62
  emits: ["close"],
63
63
  setup(e, { emit: a }) {
64
64
  I((t) => ({
65
- v3b2e1e40: `${t.height}px`
65
+ v7e42c502: `${t.height}px`
66
66
  }));
67
- const l = L(), h = E(k.INSTANCE_ID), v = E(k.COMPUTED_VIEW_STYLE), C = a, i = s(0), d = s(0), P = s(0), $ = s(0), _ = s(0), b = s(0), B = s(!1), Y = w(() => !!e.iconClass);
68
- T([_, b], M);
67
+ const l = L(), h = E(k.INSTANCE_ID), v = E(k.COMPUTED_VIEW_STYLE), C = a, i = s(0), d = s(0), P = s(0), $ = s(0), _ = s(0), B = s(0), b = s(!1), Y = w(() => !!e.iconClass);
68
+ T([_, B], M);
69
69
  function D() {
70
70
  e.hasCloseButton && C("close");
71
71
  }
72
72
  function X(t) {
73
- e.draggable && (i.value = t.clientX, d.value = t.clientY, P.value = v.value.translateX, $.value = v.value.translateY, B.value = !0, t.preventDefault(), window.addEventListener("mousemove", y), window.addEventListener("mouseup", O));
73
+ e.draggable && (i.value = t.clientX, d.value = t.clientY, P.value = v.value.translateX, $.value = v.value.translateY, b.value = !0, t.preventDefault(), window.addEventListener("mousemove", y), window.addEventListener("mouseup", O));
74
74
  }
75
75
  function y(t) {
76
- if (!B.value) return;
76
+ if (!b.value) return;
77
77
  const n = t.clientX - i.value, m = t.clientY - d.value;
78
- _.value = P.value + n, b.value = $.value + m;
78
+ _.value = P.value + n, B.value = $.value + m;
79
79
  }
80
80
  function O(t) {
81
- B.value = !1, window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", O);
81
+ b.value = !1, window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", O);
82
82
  }
83
83
  function M() {
84
84
  l.update(h, {
85
85
  viewTranslateX: _.value,
86
- viewTranslateY: b.value
86
+ viewTranslateY: B.value
87
87
  });
88
88
  }
89
89
  return (t, n) => (o(), r("div", {
@@ -107,7 +107,7 @@ const V = { class: "p-scaffold" }, x = { class: "body" }, j = /* @__PURE__ */ p(
107
107
  ])
108
108
  ], 34));
109
109
  }
110
- }), ee = /* @__PURE__ */ g(F, [["__scopeId", "data-v-fcc3fa94"]]), G = /* @__PURE__ */ p({
110
+ }), ee = /* @__PURE__ */ g(F, [["__scopeId", "data-v-471f11e1"]]), G = /* @__PURE__ */ p({
111
111
  name: "PBody",
112
112
  __name: "PBody",
113
113
  props: {
@@ -120,7 +120,7 @@ const V = { class: "p-scaffold" }, x = { class: "body" }, j = /* @__PURE__ */ p(
120
120
  c(a.$slots, "default", {}, void 0, !0)
121
121
  ], 2));
122
122
  }
123
- }), te = /* @__PURE__ */ g(G, [["__scopeId", "data-v-a8f5570e"]]);
123
+ }), te = /* @__PURE__ */ g(G, [["__scopeId", "data-v-f676093f"]]);
124
124
  export {
125
125
  Z as P,
126
126
  te as a,
@@ -12,11 +12,11 @@ const I = ["disabled"], M = /* @__PURE__ */ b({
12
12
  emits: ["click"],
13
13
  setup(e, { emit: u }) {
14
14
  r(t.inButtonGroup, !1);
15
- const l = r(t.groupType, "default"), p = r(t.groupTheme, "default"), m = r(t.groupSize, "default"), s = T("button"), a = u, f = d(() => window.innerWidth <= 600), i = d(() => ({
15
+ const l = r(t.groupType, "default"), p = r(t.groupTheme, "default"), f = r(t.groupSize, "default"), s = T("button"), a = u, m = d(() => window.innerWidth <= 600), i = d(() => ({
16
16
  [`is-type-${e.type || l}`]: !0,
17
17
  [`is-theme-${e.theme || p}`]: !0,
18
- [`is-size-${e.size || m}`]: !0,
19
- "is-mobile": f.value
18
+ [`is-size-${e.size || f}`]: !0,
19
+ "is-mobile": m.value
20
20
  }));
21
21
  function k(g) {
22
22
  a("click", g), s.value?.blur();
@@ -30,7 +30,7 @@ const I = ["disabled"], M = /* @__PURE__ */ b({
30
30
  v(g.$slots, "default", {}, void 0, !0)
31
31
  ], 10, I));
32
32
  }
33
- }), O = /* @__PURE__ */ S(M, [["__scopeId", "data-v-cc483dcd"]]), R = {
33
+ }), O = /* @__PURE__ */ S(M, [["__scopeId", "data-v-9a54c761"]]), R = {
34
34
  key: 0,
35
35
  class: "cutline"
36
36
  }, t = {
@@ -56,9 +56,9 @@ const I = ["disabled"], M = /* @__PURE__ */ b({
56
56
  "has-cutline": l.value
57
57
  }));
58
58
  c(t.inButtonGroup, !0), c(t.groupType, e.type), c(t.groupTheme, e.theme), c(t.groupSize, e.size), P(() => {
59
- m();
59
+ f();
60
60
  });
61
- function m() {
61
+ function f() {
62
62
  u.default().some((a) => {
63
63
  a.type;
64
64
  }) && console.warn("PButtonGroup 只能包含 PButton 组件");
@@ -67,13 +67,13 @@ const I = ["disabled"], M = /* @__PURE__ */ b({
67
67
  class: B(["p-button-group", p.value]),
68
68
  ref: "group"
69
69
  }, [
70
- l.value ? (o(!0), n(h, { key: 0 }, $(u.default?.(), (f, i) => (o(), n(h, { key: i }, [
71
- (o(), C(w(f))),
70
+ l.value ? (o(!0), n(h, { key: 0 }, $(u.default?.(), (m, i) => (o(), n(h, { key: i }, [
71
+ (o(), C(w(m))),
72
72
  i < (u.default?.() || []).length - 1 ? (o(), n("div", R)) : j("", !0)
73
73
  ], 64))), 128)) : v(s.$slots, "default", { key: 1 }, void 0, !0)
74
74
  ], 2));
75
75
  }
76
- }), F = /* @__PURE__ */ S(x, [["__scopeId", "data-v-8d80b617"]]);
76
+ }), F = /* @__PURE__ */ S(x, [["__scopeId", "data-v-fb8cc66f"]]);
77
77
  export {
78
78
  F as P,
79
79
  O as a
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as m, inject as u, createElementBlock as p, openBlock as P, createVNode as e, withCtx as t, createElementVNode as C, toDisplayString as a, createTextVNode as i } from "vue";
2
2
  import { usePopup as _, POPUP_COMPONENT_INJECTS as g } from "vue-popup-plus";
3
- import { P as x, a as N, b as T } from "./PBody-Ch7KaMyj.js";
4
- import { P as B } from "./PFooter-Dd8fzezl.js";
5
- import { P as y, a as s } from "./PButtonGroup-DOwvv6ZF.js";
3
+ import { P as x, a as N, b as T } from "./PBody-CggbeZs9.js";
4
+ import { P as B } from "./PFooter-Cp_J7xg-.js";
5
+ import { P as y, a as f } from "./PButtonGroup-C-RNjqPq.js";
6
6
  import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const h = { class: "p-confirm" }, v = { class: "content" }, E = /* @__PURE__ */ m({
8
8
  name: "PConfirm",
@@ -15,9 +15,9 @@ const h = { class: "p-confirm" }, v = { class: "content" }, E = /* @__PURE__ */
15
15
  draggable: { type: Boolean }
16
16
  },
17
17
  setup(o) {
18
- const c = _(), f = u(g.INSTANCE_ID);
18
+ const s = _(), c = u(g.INSTANCE_ID);
19
19
  function l(r) {
20
- c.destroy(f, r);
20
+ s.destroy(c, r);
21
21
  }
22
22
  return (r, n) => (P(), p("div", h, [
23
23
  e(x, null, {
@@ -37,7 +37,7 @@ const h = { class: "p-confirm" }, v = { class: "content" }, E = /* @__PURE__ */
37
37
  theme: "primary"
38
38
  }, {
39
39
  default: t(() => [
40
- e(s, {
40
+ e(f, {
41
41
  onClick: n[0] || (n[0] = (d) => l(!1)),
42
42
  type: "plain"
43
43
  }, {
@@ -46,7 +46,7 @@ const h = { class: "p-confirm" }, v = { class: "content" }, E = /* @__PURE__ */
46
46
  ]),
47
47
  _: 1
48
48
  }),
49
- e(s, {
49
+ e(f, {
50
50
  onClick: n[1] || (n[1] = (d) => l(!0))
51
51
  }, {
52
52
  default: t(() => [
@@ -73,7 +73,7 @@ const h = { class: "p-confirm" }, v = { class: "content" }, E = /* @__PURE__ */
73
73
  })
74
74
  ]));
75
75
  }
76
- }), $ = /* @__PURE__ */ b(E, [["__scopeId", "data-v-e79500d9"]]);
76
+ }), $ = /* @__PURE__ */ b(E, [["__scopeId", "data-v-d5394afa"]]);
77
77
  export {
78
78
  $ as default
79
79
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as p, inject as P, ref as g, computed as d, defineAsyncComponent as y, onMounted as B, createElementBlock as h, openBlock as n, normalizeClass as v, createVNode as a, createSlots as b, withCtx as t, createBlock as s, resolveDynamicComponent as k, mergeProps as N, createCommentVNode as D } from "vue";
2
2
  import { usePopup as I, POPUP_COMPONENT_INJECTS as S } from "vue-popup-plus";
3
- import { P as x, a as E, b as M, c as $ } from "./PBody-Ch7KaMyj.js";
3
+ import { P as x, a as E, b as M, c as $ } from "./PBody-CggbeZs9.js";
4
4
  import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const T = /* @__PURE__ */ p({
6
6
  name: "PDialog",
@@ -66,7 +66,7 @@ const T = /* @__PURE__ */ p({
66
66
  ]), 1024)
67
67
  ], 2));
68
68
  }
69
- }), j = /* @__PURE__ */ O(T, [["__scopeId", "data-v-eaf6b748"]]);
69
+ }), j = /* @__PURE__ */ O(T, [["__scopeId", "data-v-574a655b"]]);
70
70
  export {
71
71
  j as default
72
72
  };
@@ -8,7 +8,7 @@ const _ = { class: "p-footer" }, c = /* @__PURE__ */ e({
8
8
  s(o.$slots, "default", {}, void 0, !0)
9
9
  ]));
10
10
  }
11
- }), f = /* @__PURE__ */ n(c, [["__scopeId", "data-v-cad2ef65"]]);
11
+ }), f = /* @__PURE__ */ n(c, [["__scopeId", "data-v-92c20b30"]]);
12
12
  export {
13
13
  f as P
14
14
  };
@@ -0,0 +1,62 @@
1
+ import { defineComponent as r, useCssVars as u, createElementBlock as c, openBlock as s, createElementVNode as a, inject as m, createVNode as i, createBlock as _, createCommentVNode as f, withCtx as d, createTextVNode as P } from "vue";
2
+ import { usePopup as g, POPUP_COMPONENT_INJECTS as k } from "vue-popup-plus";
3
+ import { _ as l } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import { P as x, a as C } from "./PButtonGroup-C-RNjqPq.js";
5
+ const N = { class: "p-loading" }, v = /* @__PURE__ */ r({
6
+ name: "PLoading",
7
+ __name: "PLoading",
8
+ props: {
9
+ size: { default: 60 }
10
+ },
11
+ setup(n) {
12
+ return u((e) => ({
13
+ v083770df: `${e.size}px`
14
+ })), (e, o) => (s(), c("div", N, [...o[0] || (o[0] = [
15
+ a("svg", { viewBox: "25 25 50 50" }, [
16
+ a("circle", {
17
+ cx: "50",
18
+ cy: "50",
19
+ fill: "none",
20
+ r: "20"
21
+ })
22
+ ], -1)
23
+ ])]));
24
+ }
25
+ }), B = /* @__PURE__ */ l(v, [["__scopeId", "data-v-82e7b730"]]), z = { class: "p-loading-mask" }, I = /* @__PURE__ */ r({
26
+ name: "PLoading",
27
+ __name: "PLoadingMask",
28
+ props: {
29
+ debugMode: { type: Boolean },
30
+ iconSize: { default: 60 }
31
+ },
32
+ setup(n) {
33
+ const e = g(), o = m(k.INSTANCE_ID);
34
+ function p() {
35
+ e.destroy(o);
36
+ }
37
+ return (L, t) => (s(), c("div", z, [
38
+ t[1] || (t[1] = a("div", { class: "mask" }, null, -1)),
39
+ i(B, { size: n.iconSize }, null, 8, ["size"]),
40
+ n.debugMode ? (s(), _(x, {
41
+ key: 0,
42
+ align: "center"
43
+ }, {
44
+ default: d(() => [
45
+ i(C, {
46
+ onClick: p,
47
+ theme: "primary"
48
+ }, {
49
+ default: d(() => [...t[0] || (t[0] = [
50
+ P("强制关闭遮罩(仅在调试模式下可用)", -1)
51
+ ])]),
52
+ _: 1
53
+ })
54
+ ]),
55
+ _: 1
56
+ })) : f("", !0)
57
+ ]));
58
+ }
59
+ }), S = /* @__PURE__ */ l(I, [["__scopeId", "data-v-27933c63"]]);
60
+ export {
61
+ S as default
62
+ };
@@ -1,14 +1,14 @@
1
- import { defineComponent as y, inject as v, ref as C, computed as N, createElementBlock as d, openBlock as r, createVNode as l, withCtx as a, createCommentVNode as i, createElementVNode as T, toDisplayString as u, withDirectives as c, vModelText as f, createTextVNode as p } from "vue";
2
- import { usePopup as V, POPUP_COMPONENT_INJECTS as B } from "vue-popup-plus";
1
+ import { defineComponent as v, inject as y, ref as C, computed as N, createElementBlock as d, openBlock as r, createVNode as l, withCtx as a, createCommentVNode as i, createElementVNode as T, toDisplayString as u, withDirectives as f, vModelText as p, createTextVNode as g } from "vue";
2
+ import { usePopup as V, POPUP_COMPONENT_INJECTS as k } from "vue-popup-plus";
3
3
  import "./vue-popup-plus-plugin-preset.js";
4
- import { P as k, a as L, b } from "./PBody-Ch7KaMyj.js";
5
- import { P as E } from "./PFooter-Dd8fzezl.js";
6
- import { P as I, a as g } from "./PButtonGroup-DOwvv6ZF.js";
4
+ import { P as B, a as L, b } from "./PBody-CggbeZs9.js";
5
+ import { P as E } from "./PFooter-Cp_J7xg-.js";
6
+ import { P as I, a as x } from "./PButtonGroup-C-RNjqPq.js";
7
7
  import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const D = { class: "p-prompt" }, M = {
9
9
  key: 0,
10
10
  class: "message"
11
- }, O = { class: "input" }, U = ["maxLength", "placeholder"], w = ["maxLength", "placeholder"], $ = /* @__PURE__ */ y({
11
+ }, O = { class: "input" }, U = ["maxLength", "placeholder"], $ = ["maxLength", "placeholder"], w = /* @__PURE__ */ v({
12
12
  name: "PPrompt",
13
13
  __name: "PPrompt",
14
14
  props: {
@@ -23,20 +23,20 @@ const D = { class: "p-prompt" }, M = {
23
23
  draggable: { type: Boolean }
24
24
  },
25
25
  setup(e) {
26
- const s = V(), m = v(B.INSTANCE_ID), o = C(e.defaultValue), h = N(() => e.message !== !1);
27
- function x() {
28
- s.destroy(m, o.value);
26
+ const m = V(), s = y(k.INSTANCE_ID), n = C(e.defaultValue), P = N(() => e.message !== !1);
27
+ function h() {
28
+ m.destroy(s, n.value);
29
29
  }
30
- function P() {
31
- s.destroy(m, null);
30
+ function c() {
31
+ m.destroy(s, null);
32
32
  }
33
33
  return (j, t) => (r(), d("div", D, [
34
- l(k, null, {
34
+ l(B, null, {
35
35
  header: a(() => [
36
36
  l(b, {
37
37
  draggable: e.draggable,
38
- hasCloseButton: !1,
39
38
  title: e.title,
39
+ onClose: t[0] || (t[0] = (o) => c()),
40
40
  iconClass: "prompt"
41
41
  }, null, 8, ["draggable", "title"])
42
42
  ]),
@@ -48,20 +48,20 @@ const D = { class: "p-prompt" }, M = {
48
48
  theme: "primary"
49
49
  }, {
50
50
  default: a(() => [
51
- l(g, {
52
- onClick: t[2] || (t[2] = (n) => P()),
51
+ l(x, {
52
+ onClick: t[3] || (t[3] = (o) => c()),
53
53
  type: "plain"
54
54
  }, {
55
55
  default: a(() => [
56
- p(u(e.cancelText), 1)
56
+ g(u(e.cancelText), 1)
57
57
  ]),
58
58
  _: 1
59
59
  }),
60
- l(g, {
61
- onClick: t[3] || (t[3] = (n) => x())
60
+ l(x, {
61
+ onClick: t[4] || (t[4] = (o) => h())
62
62
  }, {
63
63
  default: a(() => [
64
- p(u(e.confirmText), 1)
64
+ g(u(e.confirmText), 1)
65
65
  ]),
66
66
  _: 1
67
67
  })
@@ -75,24 +75,24 @@ const D = { class: "p-prompt" }, M = {
75
75
  default: a(() => [
76
76
  l(L, null, {
77
77
  default: a(() => [
78
- h.value ? (r(), d("div", M, u(e.message), 1)) : i("", !0),
78
+ P.value ? (r(), d("div", M, u(e.message), 1)) : i("", !0),
79
79
  T("div", O, [
80
- e.type === "input" ? c((r(), d("input", {
80
+ e.type === "input" ? f((r(), d("input", {
81
81
  key: 0,
82
82
  maxLength: e.maxLength,
83
83
  placeholder: e.placeholder,
84
84
  type: "text",
85
- "onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n)
85
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => n.value = o)
86
86
  }, null, 8, U)), [
87
- [f, o.value]
87
+ [p, n.value]
88
88
  ]) : i("", !0),
89
- e.type === "textarea" ? c((r(), d("textarea", {
89
+ e.type === "textarea" ? f((r(), d("textarea", {
90
90
  key: 1,
91
91
  maxLength: e.maxLength,
92
92
  placeholder: e.placeholder,
93
- "onUpdate:modelValue": t[1] || (t[1] = (n) => o.value = n)
94
- }, null, 8, w)), [
95
- [f, o.value]
93
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => n.value = o)
94
+ }, null, 8, $)), [
95
+ [p, n.value]
96
96
  ]) : i("", !0)
97
97
  ])
98
98
  ]),
@@ -103,7 +103,7 @@ const D = { class: "p-prompt" }, M = {
103
103
  })
104
104
  ]));
105
105
  }
106
- }), z = /* @__PURE__ */ S($, [["__scopeId", "data-v-7962dc89"]]);
106
+ }), z = /* @__PURE__ */ S(w, [["__scopeId", "data-v-4fd5ae58"]]);
107
107
  export {
108
108
  z as default
109
109
  };
@@ -0,0 +1,30 @@
1
+ import { defineComponent as a, inject as i, onMounted as m, createElementBlock as r, openBlock as c, normalizeClass as d, createElementVNode as o, toDisplayString as l } from "vue";
2
+ import { usePopup as p, POPUP_COMPONENT_INJECTS as u } from "vue-popup-plus";
3
+ import "./vue-popup-plus-plugin-preset.js";
4
+ import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const _ = { class: "content" }, f = /* @__PURE__ */ a({
6
+ name: "PToast",
7
+ __name: "PToast",
8
+ props: {
9
+ content: {},
10
+ theme: {},
11
+ duration: {}
12
+ },
13
+ setup(e) {
14
+ const n = p(), s = i(u.INSTANCE_ID);
15
+ return m(() => {
16
+ window.setTimeout(() => {
17
+ n.destroy(s);
18
+ }, e.duration);
19
+ }), (T, t) => (c(), r("div", {
20
+ class: d(["p-message", `is-theme-${e.theme}`])
21
+ }, [
22
+ t[0] || (t[0] = o("div", { class: "mask" }, null, -1)),
23
+ t[1] || (t[1] = o("div", { class: "mask-background" }, null, -1)),
24
+ o("div", _, l(e.content), 1)
25
+ ], 2));
26
+ }
27
+ }), E = /* @__PURE__ */ P(f, [["__scopeId", "data-v-b911c797"]]);
28
+ export {
29
+ E as default
30
+ };
@@ -290,7 +290,7 @@ declare type PopupDialogOption = {
290
290
  * 是否点击遮罩层关闭对话框
291
291
  * - 默认值为 `false`
292
292
  */
293
- maskClickCloseEnabled?: boolean;
293
+ maskClickClose?: boolean;
294
294
  /**
295
295
  * 是否可拖拽
296
296
  * - 默认值为 `false`
@@ -355,13 +355,22 @@ declare type PromptOption = {
355
355
  declare type PromptType = 'input' | 'textarea';
356
356
 
357
357
  declare type ToastOption = {
358
+ /**
359
+ * 消息主题
360
+ * - 默认值: 'default'
361
+ * - 具体的可选主题请参考 {@link ToastTheme }
362
+ */
363
+ theme?: ToastTheme;
358
364
  /**
359
365
  * 消息显示时间,单位毫秒
366
+ * - 默认值: 2000 毫秒
360
367
  * @default 2000
361
368
  */
362
369
  duration?: number;
363
370
  };
364
371
 
372
+ declare type ToastTheme = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
373
+
365
374
  export { }
366
375
 
367
376
 
@@ -374,41 +383,41 @@ declare module 'vue-popup-plus' {
374
383
 
375
384
  declare module 'vue-popup-plus' {
376
385
  interface PopupCustomProperties {
377
- dialog: IDialog;
386
+ loading: ILoading;
378
387
  }
379
388
  }
380
389
 
381
390
 
382
391
  declare module 'vue-popup-plus' {
383
392
  interface PopupCustomProperties {
384
- confirm: IConfirm;
393
+ dialog: IDialog;
385
394
  }
386
395
  }
387
396
 
388
397
 
389
398
  declare module 'vue-popup-plus' {
390
399
  interface PopupCustomProperties {
391
- album: IAlbum;
400
+ confirm: IConfirm;
392
401
  }
393
402
  }
394
403
 
395
404
 
396
405
  declare module 'vue-popup-plus' {
397
406
  interface PopupCustomProperties {
398
- loading: ILoading;
407
+ album: IAlbum;
399
408
  }
400
409
  }
401
410
 
402
411
 
403
412
  declare module 'vue-popup-plus' {
404
413
  interface PopupCustomProperties {
405
- prompt: IPrompt;
414
+ toast: IToast;
406
415
  }
407
416
  }
408
417
 
409
418
 
410
419
  declare module 'vue-popup-plus' {
411
420
  interface PopupCustomProperties {
412
- toast: IToast;
421
+ prompt: IPrompt;
413
422
  }
414
423
  }