vue-popup-plus-plugin-preset 1.1.0 → 1.2.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.
@@ -0,0 +1,79 @@
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
+ 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";
6
+ import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const h = { class: "p-confirm" }, v = { class: "content" }, E = /* @__PURE__ */ m({
8
+ name: "PConfirm",
9
+ __name: "PConfirm",
10
+ props: {
11
+ title: {},
12
+ content: {},
13
+ confirmText: {},
14
+ cancelText: {},
15
+ draggable: { type: Boolean }
16
+ },
17
+ setup(o) {
18
+ const c = _(), f = u(g.INSTANCE_ID);
19
+ function l(r) {
20
+ c.destroy(f, r);
21
+ }
22
+ return (r, n) => (P(), p("div", h, [
23
+ e(x, null, {
24
+ header: t(() => [
25
+ e(T, {
26
+ draggable: o.draggable,
27
+ hasCloseButton: !1,
28
+ title: o.title,
29
+ iconClass: "confirm"
30
+ }, null, 8, ["draggable", "title"])
31
+ ]),
32
+ footer: t(() => [
33
+ e(B, null, {
34
+ default: t(() => [
35
+ e(y, {
36
+ align: "right",
37
+ theme: "primary"
38
+ }, {
39
+ default: t(() => [
40
+ e(s, {
41
+ onClick: n[0] || (n[0] = (d) => l(!1)),
42
+ type: "plain"
43
+ }, {
44
+ default: t(() => [
45
+ i(a(o.cancelText), 1)
46
+ ]),
47
+ _: 1
48
+ }),
49
+ e(s, {
50
+ onClick: n[1] || (n[1] = (d) => l(!0))
51
+ }, {
52
+ default: t(() => [
53
+ i(a(o.confirmText), 1)
54
+ ]),
55
+ _: 1
56
+ })
57
+ ]),
58
+ _: 1
59
+ })
60
+ ]),
61
+ _: 1
62
+ })
63
+ ]),
64
+ default: t(() => [
65
+ e(N, null, {
66
+ default: t(() => [
67
+ C("div", v, a(o.content), 1)
68
+ ]),
69
+ _: 1
70
+ })
71
+ ]),
72
+ _: 1
73
+ })
74
+ ]));
75
+ }
76
+ }), $ = /* @__PURE__ */ b(E, [["__scopeId", "data-v-e79500d9"]]);
77
+ export {
78
+ $ as default
79
+ };
@@ -0,0 +1,72 @@
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
+ 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";
4
+ import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const T = /* @__PURE__ */ p({
6
+ name: "PDialog",
7
+ __name: "PDialog",
8
+ props: {
9
+ id: {},
10
+ title: {},
11
+ customComponent: {},
12
+ customComponentProps: {},
13
+ header: { type: Boolean },
14
+ headerCloseButton: { type: Boolean },
15
+ draggable: { type: Boolean },
16
+ debugMode: { type: Boolean }
17
+ },
18
+ setup(e) {
19
+ const m = I(), u = P(S.INSTANCE_ID), l = g(1), r = d(
20
+ () => `${e.id}-${l.value}`
21
+ ), c = d(() => typeof e.customComponent == "function" ? y(e.customComponent) : e.customComponent);
22
+ B(() => {
23
+ });
24
+ function i() {
25
+ l.value++;
26
+ }
27
+ function C() {
28
+ m.destroy(u);
29
+ }
30
+ return (w, o) => (n(), h("div", {
31
+ class: v(["p-dialog", { "no-header": !e.header }])
32
+ }, [
33
+ a(x, null, b({
34
+ default: t(() => [
35
+ a(E, { withPadding: !1 }, {
36
+ default: t(() => [
37
+ (n(), s(k(c.value), N({ key: r.value }, e.customComponentProps), null, 16))
38
+ ]),
39
+ _: 1
40
+ })
41
+ ]),
42
+ _: 2
43
+ }, [
44
+ e.header ? {
45
+ name: "header",
46
+ fn: t(() => [
47
+ a(M, {
48
+ draggable: e.draggable,
49
+ hasCloseButton: e.headerCloseButton,
50
+ title: e.title,
51
+ onClose: o[1] || (o[1] = (f) => C())
52
+ }, {
53
+ buttons: t(() => [
54
+ e.debugMode ? (n(), s($, {
55
+ key: 0,
56
+ onClick: o[0] || (o[0] = (f) => i()),
57
+ iconClass: "reload",
58
+ theme: "success"
59
+ })) : D("", !0)
60
+ ]),
61
+ _: 1
62
+ }, 8, ["draggable", "hasCloseButton", "title"])
63
+ ]),
64
+ key: "0"
65
+ } : void 0
66
+ ]), 1024)
67
+ ], 2));
68
+ }
69
+ }), j = /* @__PURE__ */ O(T, [["__scopeId", "data-v-eaf6b748"]]);
70
+ export {
71
+ j as default
72
+ };
@@ -0,0 +1,61 @@
1
+ import { defineComponent as d, useCssVars as _, createElementBlock as r, openBlock as n, createElementVNode as s, inject as u, createVNode as i, createBlock as m, createCommentVNode as f, withCtx as c, createTextVNode as P } from "vue";
2
+ import { usePopup as g, POPUP_COMPONENT_INJECTS as x } from "vue-popup-plus";
3
+ import { _ as p } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import { P as C, a as N } from "./PButtonGroup-DOwvv6ZF.js";
5
+ const k = { class: "p-loading" }, v = /* @__PURE__ */ d({
6
+ name: "PLoading",
7
+ __name: "PLoading",
8
+ props: {
9
+ size: { default: 60 }
10
+ },
11
+ setup(t) {
12
+ return _((e) => ({
13
+ v3d51c802: `${e.size}px`
14
+ })), (e, o) => (n(), r("div", k, [...o[0] || (o[0] = [
15
+ s("svg", { viewBox: "25 25 50 50" }, [
16
+ s("circle", {
17
+ cx: "50",
18
+ cy: "50",
19
+ fill: "none",
20
+ r: "20"
21
+ })
22
+ ], -1)
23
+ ])]));
24
+ }
25
+ }), B = /* @__PURE__ */ p(v, [["__scopeId", "data-v-279e128a"]]), z = { class: "p-loading-mask" }, I = /* @__PURE__ */ d({
26
+ name: "PLoading",
27
+ __name: "PLoadingMask",
28
+ props: {
29
+ debugMode: { type: Boolean },
30
+ iconSize: { default: 60 }
31
+ },
32
+ setup(t) {
33
+ const e = g(), o = u(x.INSTANCE_ID);
34
+ function l() {
35
+ e.destroy(o);
36
+ }
37
+ return (L, a) => (n(), r("div", z, [
38
+ i(B, { size: t.iconSize }, null, 8, ["size"]),
39
+ t.debugMode ? (n(), m(C, {
40
+ key: 0,
41
+ align: "center"
42
+ }, {
43
+ default: c(() => [
44
+ i(N, {
45
+ onClick: l,
46
+ theme: "primary"
47
+ }, {
48
+ default: c(() => [...a[0] || (a[0] = [
49
+ P("强制关闭遮罩(仅在调试模式下可用)", -1)
50
+ ])]),
51
+ _: 1
52
+ })
53
+ ]),
54
+ _: 1
55
+ })) : f("", !0)
56
+ ]));
57
+ }
58
+ }), b = /* @__PURE__ */ p(I, [["__scopeId", "data-v-19c7bbd7"]]);
59
+ export {
60
+ b as default
61
+ };
@@ -1,14 +1,14 @@
1
- import { defineComponent as C, inject as x, ref as N, computed as T, createElementBlock as r, openBlock as s, createVNode as o, withCtx as a, createCommentVNode as d, createElementVNode as V, toDisplayString as p, withDirectives as f, vModelText as c, createTextVNode as g } from "vue";
2
- import { usePopup as _, POPUP_COMPONENT_INJECTS as B } from "vue-popup-plus";
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";
3
3
  import "./vue-popup-plus-plugin-preset.js";
4
- import { P as k, a as L, b } from "./PBody-B8SE3ACJ.js";
4
+ import { P as k, a as L, b } from "./PBody-Ch7KaMyj.js";
5
5
  import { P as E } from "./PFooter-Dd8fzezl.js";
6
- import { P as I, a as h } from "./PButtonGroup-CfAPVmCi.js";
6
+ import { P as I, a as g } from "./PButtonGroup-DOwvv6ZF.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__ */ C({
11
+ }, O = { class: "input" }, U = ["maxLength", "placeholder"], w = ["maxLength", "placeholder"], $ = /* @__PURE__ */ y({
12
12
  name: "PPrompt",
13
13
  __name: "PPrompt",
14
14
  props: {
@@ -22,18 +22,18 @@ const D = { class: "p-prompt" }, M = {
22
22
  cancelText: {},
23
23
  draggable: { type: Boolean }
24
24
  },
25
- setup(i) {
26
- const u = _(), m = x(B.INSTANCE_ID), l = N(i.defaultValue), P = T(() => i.message !== !1);
27
- function y() {
28
- u.destroy(m, l.value);
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);
29
29
  }
30
- function v() {
31
- u.destroy(m, null);
30
+ function P() {
31
+ s.destroy(m, null);
32
32
  }
33
- return (e, t) => (s(), r("div", D, [
34
- o(k, null, {
33
+ return (j, t) => (r(), d("div", D, [
34
+ l(k, null, {
35
35
  header: a(() => [
36
- o(b, {
36
+ l(b, {
37
37
  draggable: e.draggable,
38
38
  hasCloseButton: !1,
39
39
  title: e.title,
@@ -41,27 +41,27 @@ const D = { class: "p-prompt" }, M = {
41
41
  }, null, 8, ["draggable", "title"])
42
42
  ]),
43
43
  footer: a(() => [
44
- o(E, null, {
44
+ l(E, null, {
45
45
  default: a(() => [
46
- o(I, {
46
+ l(I, {
47
47
  align: "right",
48
48
  theme: "primary"
49
49
  }, {
50
50
  default: a(() => [
51
- o(h, {
52
- onClick: t[2] || (t[2] = (n) => v()),
51
+ l(g, {
52
+ onClick: t[2] || (t[2] = (n) => P()),
53
53
  type: "plain"
54
54
  }, {
55
55
  default: a(() => [
56
- g(p(e.cancelText), 1)
56
+ p(u(e.cancelText), 1)
57
57
  ]),
58
58
  _: 1
59
59
  }),
60
- o(h, {
61
- onClick: t[3] || (t[3] = (n) => y())
60
+ l(g, {
61
+ onClick: t[3] || (t[3] = (n) => x())
62
62
  }, {
63
63
  default: a(() => [
64
- g(p(e.confirmText), 1)
64
+ p(u(e.confirmText), 1)
65
65
  ]),
66
66
  _: 1
67
67
  })
@@ -73,27 +73,27 @@ const D = { class: "p-prompt" }, M = {
73
73
  })
74
74
  ]),
75
75
  default: a(() => [
76
- o(L, null, {
76
+ l(L, null, {
77
77
  default: a(() => [
78
- P.value ? (s(), r("div", M, p(e.message), 1)) : d("", !0),
79
- V("div", O, [
80
- e.type === "input" ? f((s(), r("input", {
78
+ h.value ? (r(), d("div", M, u(e.message), 1)) : i("", !0),
79
+ T("div", O, [
80
+ e.type === "input" ? c((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) => l.value = n)
85
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n)
86
86
  }, null, 8, U)), [
87
- [c, l.value]
88
- ]) : d("", !0),
89
- e.type === "textarea" ? f((s(), r("textarea", {
87
+ [f, o.value]
88
+ ]) : i("", !0),
89
+ e.type === "textarea" ? c((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) => l.value = n)
93
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => o.value = n)
94
94
  }, null, 8, w)), [
95
- [c, l.value]
96
- ]) : d("", !0)
95
+ [f, o.value]
96
+ ]) : i("", !0)
97
97
  ])
98
98
  ]),
99
99
  _: 1
@@ -103,7 +103,7 @@ const D = { class: "p-prompt" }, M = {
103
103
  })
104
104
  ]));
105
105
  }
106
- }), q = /* @__PURE__ */ S($, [["__scopeId", "data-v-7962dc89"]]);
106
+ }), z = /* @__PURE__ */ S($, [["__scopeId", "data-v-7962dc89"]]);
107
107
  export {
108
- q as default
108
+ z as default
109
109
  };
@@ -0,0 +1,24 @@
1
+ import { defineComponent as n, inject as s, onMounted as c, createElementBlock as a, openBlock as r, createElementVNode as i, toDisplayString as p } from "vue";
2
+ import { usePopup as _, POPUP_COMPONENT_INJECTS as d } from "vue-popup-plus";
3
+ import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const u = { class: "p-message" }, l = { class: "content" }, P = /* @__PURE__ */ n({
5
+ name: "PToast",
6
+ __name: "PToast",
7
+ props: {
8
+ content: {},
9
+ duration: {}
10
+ },
11
+ setup(t) {
12
+ const o = _(), e = s(d.INSTANCE_ID);
13
+ return c(() => {
14
+ window.setTimeout(() => {
15
+ o.destroy(e);
16
+ }, t.duration);
17
+ }), (f, T) => (r(), a("div", u, [
18
+ i("div", l, p(t.content), 1)
19
+ ]));
20
+ }
21
+ }), C = /* @__PURE__ */ m(P, [["__scopeId", "data-v-b7038c7b"]]);
22
+ export {
23
+ C as default
24
+ };
@@ -372,6 +372,13 @@ declare module 'vue-popup-plus' {
372
372
  }
373
373
 
374
374
 
375
+ declare module 'vue-popup-plus' {
376
+ interface PopupCustomProperties {
377
+ dialog: IDialog;
378
+ }
379
+ }
380
+
381
+
375
382
  declare module 'vue-popup-plus' {
376
383
  interface PopupCustomProperties {
377
384
  confirm: IConfirm;
@@ -381,7 +388,7 @@ declare module 'vue-popup-plus' {
381
388
 
382
389
  declare module 'vue-popup-plus' {
383
390
  interface PopupCustomProperties {
384
- prompt: IPrompt;
391
+ album: IAlbum;
385
392
  }
386
393
  }
387
394
 
@@ -395,13 +402,13 @@ declare module 'vue-popup-plus' {
395
402
 
396
403
  declare module 'vue-popup-plus' {
397
404
  interface PopupCustomProperties {
398
- toast: IToast;
405
+ prompt: IPrompt;
399
406
  }
400
407
  }
401
408
 
402
409
 
403
410
  declare module 'vue-popup-plus' {
404
411
  interface PopupCustomProperties {
405
- dialog: IDialog;
412
+ toast: IToast;
406
413
  }
407
414
  }