vue-popup-plus-plugin-preset 1.4.0 → 1.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-popup-plus-plugin-preset",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "keywords": [
5
5
  "vue",
6
6
  "vue3",
@@ -25,7 +25,8 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "vue": "^3.5.22",
28
- "vue-popup-plus": "^1.4.0"
28
+ "utils": "1.0.0",
29
+ "vue-popup-plus": "1.5.0"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@prettier/plugin-pug": "^3.4.2",
@@ -46,7 +47,7 @@
46
47
  "npm-run-all2": "^8.0.4",
47
48
  "prettier": "3.6.2",
48
49
  "pug": "^3.0.3",
49
- "stylus": "^0.64.0",
50
+ "sass": "^1.97.0",
50
51
  "typescript": "~5.8.0",
51
52
  "vite": "^7.0.6",
52
53
  "vite-plugin-css-injected-by-js": "^3.5.2",
@@ -1,69 +0,0 @@
1
- import { defineComponent as i, inject as c, createElementBlock as f, openBlock as m, createVNode as t, withCtx as e, createElementVNode as u, toDisplayString as l, createTextVNode as p } from "vue";
2
- import { usePopup as P, POPUP_COMPONENT_INJECTS as C } from "vue-popup-plus";
3
- import { P as g, a as _, b as B } from "./PBody-dDV4yMXv.js";
4
- import { P as h } from "./PFooter-Cp_J7xg-.js";
5
- import { P as N, a as x } from "./PButtonGroup-C-RNjqPq.js";
6
- import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
- const T = { class: "p-alert" }, b = { class: "content" }, v = /* @__PURE__ */ i({
8
- name: "PAlert",
9
- __name: "PAlert",
10
- props: {
11
- title: {},
12
- headerClose: { type: Boolean },
13
- content: {},
14
- confirmText: {},
15
- draggable: { type: Boolean }
16
- },
17
- setup(o) {
18
- const r = P(), s = c(C.INSTANCE_ID);
19
- function n() {
20
- r.destroy(s);
21
- }
22
- return (E, a) => (m(), f("div", T, [
23
- t(g, null, {
24
- header: e(() => [
25
- t(B, {
26
- draggable: o.draggable,
27
- hasCloseButton: o.headerClose,
28
- title: o.title,
29
- onClose: a[0] || (a[0] = (d) => n()),
30
- iconClass: "alert"
31
- }, null, 8, ["draggable", "hasCloseButton", "title"])
32
- ]),
33
- footer: e(() => [
34
- t(h, null, {
35
- default: e(() => [
36
- t(N, { align: "right" }, {
37
- default: e(() => [
38
- t(x, {
39
- onClick: a[1] || (a[1] = (d) => n()),
40
- theme: "primary"
41
- }, {
42
- default: e(() => [
43
- p(l(o.confirmText), 1)
44
- ]),
45
- _: 1
46
- })
47
- ]),
48
- _: 1
49
- })
50
- ]),
51
- _: 1
52
- })
53
- ]),
54
- default: e(() => [
55
- t(_, null, {
56
- default: e(() => [
57
- u("div", b, l(o.content), 1)
58
- ]),
59
- _: 1
60
- })
61
- ]),
62
- _: 1
63
- })
64
- ]));
65
- }
66
- }), D = /* @__PURE__ */ y(v, [["__scopeId", "data-v-a4cda4ff"]]);
67
- export {
68
- D as default
69
- };
@@ -1,129 +0,0 @@
1
- import { defineComponent as p, createElementBlock as r, openBlock as o, renderSlot as c, createElementVNode as u, useCssVars as I, computed as w, withModifiers as N, normalizeClass as f, inject as E, ref as s, watch as T, createCommentVNode as S, toDisplayString as H, createBlock as z } from "vue";
2
- import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { usePopup as L, POPUP_COMPONENT_INJECTS as k } from "vue-popup-plus";
4
- const V = { class: "p-scaffold" }, x = { class: "body" }, j = /* @__PURE__ */ p({
5
- name: "PScaffold",
6
- __name: "PScaffold",
7
- setup(e) {
8
- return (a, l) => (o(), r("div", V, [
9
- c(a.$slots, "header", {}, void 0, !0),
10
- u("div", x, [
11
- c(a.$slots, "default", {}, void 0, !0)
12
- ]),
13
- c(a.$slots, "footer", {}, void 0, !0)
14
- ]));
15
- }
16
- }), Z = /* @__PURE__ */ g(j, [["__scopeId", "data-v-001c1189"]]), U = /* @__PURE__ */ p({
17
- name: "PHeaderButton",
18
- __name: "PHeaderButton",
19
- props: {
20
- iconClass: { default: "" },
21
- theme: { default: "primary" },
22
- size: { default: 40 },
23
- disabled: { type: Boolean, default: !1 },
24
- actived: { type: Boolean, default: !1 }
25
- },
26
- emits: ["click"],
27
- setup(e, { emit: a }) {
28
- I((i) => ({
29
- a2481b06: `${i.size}px`,
30
- d3d4fcd4: `${v.value}px`
31
- }));
32
- const l = a, h = w(() => ({
33
- [`is-theme-${e.theme}`]: !0,
34
- "is-disabled": e.disabled,
35
- "is-active": e.actived
36
- })), v = w(() => e.size * 0.4);
37
- function C() {
38
- e.disabled || l("click");
39
- }
40
- return (i, d) => (o(), r("div", {
41
- class: f(["p-header-button", h.value]),
42
- onClick: d[0] || (d[0] = N((P) => C(), ["stop"]))
43
- }, [
44
- u("i", {
45
- class: f(["iconfont-popup-plugin-preset", e.iconClass])
46
- }, null, 2)
47
- ], 2));
48
- }
49
- }), A = /* @__PURE__ */ g(U, [["__scopeId", "data-v-4c24ccc2"]]), J = {
50
- key: 0,
51
- class: "icon"
52
- }, W = { class: "title" }, q = { class: "btn-ctn" }, F = /* @__PURE__ */ p({
53
- name: "PHeader",
54
- __name: "PHeader",
55
- props: {
56
- title: { default: "" },
57
- height: { default: 40 },
58
- iconClass: { default: "" },
59
- hasCloseButton: { type: Boolean, default: !0 },
60
- draggable: { type: Boolean, default: !1 }
61
- },
62
- emits: ["close"],
63
- setup(e, { emit: a }) {
64
- I((t) => ({
65
- v7e42c502: `${t.height}px`
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);
69
- function D() {
70
- e.hasCloseButton && C("close");
71
- }
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));
74
- }
75
- function y(t) {
76
- if (!B.value) return;
77
- const n = t.clientX - i.value, m = t.clientY - d.value;
78
- _.value = P.value + n, b.value = $.value + m;
79
- }
80
- function O(t) {
81
- B.value = !1, window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", O);
82
- }
83
- function M() {
84
- l.update(h, {
85
- viewTranslateX: _.value,
86
- viewTranslateY: b.value
87
- });
88
- }
89
- return (t, n) => (o(), r("div", {
90
- class: f(["p-header", { "is-draggable": e.draggable }]),
91
- onMousedown: n[1] || (n[1] = (m) => X(m))
92
- }, [
93
- Y.value ? (o(), r("div", J, [
94
- u("i", {
95
- class: f(["iconfont-popup-plugin-preset", e.iconClass])
96
- }, null, 2)
97
- ])) : S("", !0),
98
- u("div", W, H(e.title), 1),
99
- u("div", q, [
100
- c(t.$slots, "buttons", {}, void 0, !0),
101
- e.hasCloseButton ? (o(), z(A, {
102
- key: 0,
103
- onClick: n[0] || (n[0] = (m) => D()),
104
- iconClass: "close",
105
- theme: "danger"
106
- })) : S("", !0)
107
- ])
108
- ], 34));
109
- }
110
- }), ee = /* @__PURE__ */ g(F, [["__scopeId", "data-v-471f11e1"]]), G = /* @__PURE__ */ p({
111
- name: "PBody",
112
- __name: "PBody",
113
- props: {
114
- withPadding: { type: Boolean, default: !0 }
115
- },
116
- setup(e) {
117
- return (a, l) => (o(), r("div", {
118
- class: f(["p-body", { "has-padding": e.withPadding }])
119
- }, [
120
- c(a.$slots, "default", {}, void 0, !0)
121
- ], 2));
122
- }
123
- }), te = /* @__PURE__ */ g(G, [["__scopeId", "data-v-109bf0c1"]]);
124
- export {
125
- Z as P,
126
- te as a,
127
- ee as b,
128
- A as c
129
- };
@@ -1,80 +0,0 @@
1
- import { defineComponent as b, inject as r, useTemplateRef as T, computed as d, createElementBlock as n, openBlock as o, normalizeClass as B, renderSlot as v, useSlots as G, provide as c, onMounted as P, Fragment as h, renderList as $, createBlock as C, createCommentVNode as j, resolveDynamicComponent as w } from "vue";
2
- import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- const I = ["disabled"], M = /* @__PURE__ */ b({
4
- name: "PButton",
5
- __name: "PButton",
6
- props: {
7
- type: {},
8
- theme: {},
9
- size: {},
10
- disabled: { type: Boolean, default: !1 }
11
- },
12
- emits: ["click"],
13
- setup(e, { emit: u }) {
14
- r(t.inButtonGroup, !1);
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
- [`is-type-${e.type || l}`]: !0,
17
- [`is-theme-${e.theme || p}`]: !0,
18
- [`is-size-${e.size || f}`]: !0,
19
- "is-mobile": m.value
20
- }));
21
- function k(g) {
22
- a("click", g), s.value?.blur();
23
- }
24
- return (g, y) => (o(), n("button", {
25
- class: B(["p-button", i.value]),
26
- disabled: e.disabled,
27
- onClick: y[0] || (y[0] = (z) => k(z)),
28
- ref: "button"
29
- }, [
30
- v(g.$slots, "default", {}, void 0, !0)
31
- ], 10, I));
32
- }
33
- }), O = /* @__PURE__ */ S(M, [["__scopeId", "data-v-9a54c761"]]), R = {
34
- key: 0,
35
- class: "cutline"
36
- }, t = {
37
- inButtonGroup: Symbol("inButtonGroup"),
38
- groupType: Symbol("groupType"),
39
- groupTheme: Symbol("groupTheme"),
40
- groupSize: Symbol("groupSize")
41
- }, x = /* @__PURE__ */ b({
42
- name: "PButtonGroup",
43
- __name: "PButtonGroup",
44
- props: {
45
- type: { default: "default" },
46
- theme: { default: "default" },
47
- size: { default: "default" },
48
- align: { default: "left" },
49
- tight: { type: Boolean, default: !1 },
50
- cutline: { type: Boolean, default: !1 }
51
- },
52
- setup(e) {
53
- const u = G(), l = d(() => e.cutline && !e.tight), p = d(() => ({
54
- [`align-${e.align}`]: !0,
55
- "is-tight": e.tight,
56
- "has-cutline": l.value
57
- }));
58
- c(t.inButtonGroup, !0), c(t.groupType, e.type), c(t.groupTheme, e.theme), c(t.groupSize, e.size), P(() => {
59
- f();
60
- });
61
- function f() {
62
- u.default().some((a) => {
63
- a.type;
64
- }) && console.warn("PButtonGroup 只能包含 PButton 组件");
65
- }
66
- return (s, a) => (o(), n("div", {
67
- class: B(["p-button-group", p.value]),
68
- ref: "group"
69
- }, [
70
- l.value ? (o(!0), n(h, { key: 0 }, $(u.default?.(), (m, i) => (o(), n(h, { key: i }, [
71
- (o(), C(w(m))),
72
- i < (u.default?.() || []).length - 1 ? (o(), n("div", R)) : j("", !0)
73
- ], 64))), 128)) : v(s.$slots, "default", { key: 1 }, void 0, !0)
74
- ], 2));
75
- }
76
- }), F = /* @__PURE__ */ S(x, [["__scopeId", "data-v-fb8cc66f"]]);
77
- export {
78
- F as P,
79
- O as a
80
- };
@@ -1,84 +0,0 @@
1
- import { defineComponent as m, inject as u, createElementBlock as C, openBlock as p, createVNode as t, withCtx as e, createElementVNode as P, toDisplayString as a, createTextVNode as d } from "vue";
2
- import { usePopup as g, POPUP_COMPONENT_INJECTS as x } from "vue-popup-plus";
3
- import { P as B, a as y, b as N } from "./PBody-dDV4yMXv.js";
4
- import { P as T } from "./PFooter-Cp_J7xg-.js";
5
- import { P as _, a as f } from "./PButtonGroup-C-RNjqPq.js";
6
- import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
- const v = { class: "p-confirm" }, b = { class: "content" }, E = /* @__PURE__ */ m({
8
- name: "PConfirm",
9
- __name: "PConfirm",
10
- props: {
11
- title: {},
12
- headerClose: { type: Boolean },
13
- content: {},
14
- confirmText: {},
15
- cancelText: {},
16
- draggable: { type: Boolean }
17
- },
18
- setup(o) {
19
- const l = g(), r = u(x.INSTANCE_ID);
20
- function c() {
21
- l.destroy(r, !0);
22
- }
23
- function i() {
24
- l.destroy(r, !1);
25
- }
26
- return (I, n) => (p(), C("div", v, [
27
- t(B, null, {
28
- header: e(() => [
29
- t(N, {
30
- draggable: o.draggable,
31
- hasCloseButton: o.headerClose,
32
- title: o.title,
33
- onClose: n[0] || (n[0] = (s) => i()),
34
- iconClass: "confirm"
35
- }, null, 8, ["draggable", "hasCloseButton", "title"])
36
- ]),
37
- footer: e(() => [
38
- t(T, null, {
39
- default: e(() => [
40
- t(_, {
41
- align: "right",
42
- theme: "primary"
43
- }, {
44
- default: e(() => [
45
- t(f, {
46
- onClick: n[1] || (n[1] = (s) => i()),
47
- type: "plain"
48
- }, {
49
- default: e(() => [
50
- d(a(o.cancelText), 1)
51
- ]),
52
- _: 1
53
- }),
54
- t(f, {
55
- onClick: n[2] || (n[2] = (s) => c())
56
- }, {
57
- default: e(() => [
58
- d(a(o.confirmText), 1)
59
- ]),
60
- _: 1
61
- })
62
- ]),
63
- _: 1
64
- })
65
- ]),
66
- _: 1
67
- })
68
- ]),
69
- default: e(() => [
70
- t(y, null, {
71
- default: e(() => [
72
- P("div", b, a(o.content), 1)
73
- ]),
74
- _: 1
75
- })
76
- ]),
77
- _: 1
78
- })
79
- ]));
80
- }
81
- }), j = /* @__PURE__ */ h(E, [["__scopeId", "data-v-35effe8a"]]);
82
- export {
83
- j as default
84
- };
@@ -1,72 +0,0 @@
1
- import { defineComponent as y, inject as m, ref as h, computed as t, defineAsyncComponent as v, onMounted as B, createElementBlock as b, openBlock as a, normalizeClass as k, createVNode as l, createSlots as E, withCtx as n, createBlock as u, resolveDynamicComponent as N, mergeProps as S, createCommentVNode as D } from "vue";
2
- import { usePopup as I, POPUP_COMPONENT_INJECTS as c } from "vue-popup-plus";
3
- import { P as M, a as T, b as w, c as x } from "./PBody-dDV4yMXv.js";
4
- import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const V = /* @__PURE__ */ y({
6
- name: "PDialog",
7
- __name: "PDialog",
8
- props: {
9
- id: {},
10
- title: {},
11
- customComponent: {},
12
- customComponentProps: {},
13
- header: { type: Boolean },
14
- headerClose: { type: Boolean },
15
- draggable: { type: Boolean },
16
- debugMode: { type: Boolean }
17
- },
18
- setup(e) {
19
- const r = I(), i = m(c.INSTANCE_ID), d = m(c.COMPUTED_VIEW_STYLE), s = h(1), C = t(
20
- () => `${e.id}-${s.value}`
21
- ), f = t(() => typeof e.customComponent == "function" ? v(e.customComponent) : e.customComponent);
22
- t(() => d.value.width), t(() => d.value.height), B(() => {
23
- });
24
- function p() {
25
- s.value++;
26
- }
27
- function P() {
28
- r.destroy(i);
29
- }
30
- return ($, o) => (a(), b("div", {
31
- class: k(["p-dialog", { "no-header": !e.header }])
32
- }, [
33
- l(M, null, E({
34
- default: n(() => [
35
- l(T, { withPadding: !1 }, {
36
- default: n(() => [
37
- (a(), u(N(f.value), S({ key: C.value }, e.customComponentProps), null, 16))
38
- ]),
39
- _: 1
40
- })
41
- ]),
42
- _: 2
43
- }, [
44
- e.header ? {
45
- name: "header",
46
- fn: n(() => [
47
- l(w, {
48
- draggable: e.draggable,
49
- hasCloseButton: e.headerClose,
50
- title: e.title,
51
- onClose: o[1] || (o[1] = (g) => P())
52
- }, {
53
- buttons: n(() => [
54
- e.debugMode ? (a(), u(x, {
55
- key: 0,
56
- onClick: o[0] || (o[0] = (g) => p()),
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(V, [["__scopeId", "data-v-5a6ff495"]]);
70
- export {
71
- j as default
72
- };
@@ -1,14 +0,0 @@
1
- import { defineComponent as e, createElementBlock as t, openBlock as r, renderSlot as s } from "vue";
2
- import { _ as n } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- const _ = { class: "p-footer" }, c = /* @__PURE__ */ e({
4
- name: "PFooter",
5
- __name: "PFooter",
6
- setup(a) {
7
- return (o, p) => (r(), t("div", _, [
8
- s(o.$slots, "default", {}, void 0, !0)
9
- ]));
10
- }
11
- }), f = /* @__PURE__ */ n(c, [["__scopeId", "data-v-92c20b30"]]);
12
- export {
13
- f as P
14
- };
@@ -1,73 +0,0 @@
1
- import { defineComponent as l, useCssVars as p, createElementBlock as i, openBlock as n, normalizeClass as _, createElementVNode as s, inject as f, createVNode as c, createCommentVNode as r, createBlock as P, toDisplayString as g, withCtx as d, createTextVNode as h } from "vue";
2
- import { usePopup as C, POPUP_COMPONENT_INJECTS as x } from "vue-popup-plus";
3
- import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import { P as I, a as N } from "./PButtonGroup-C-RNjqPq.js";
5
- const v = /* @__PURE__ */ l({
6
- name: "PLoadingIcon",
7
- __name: "PLoadingIcon",
8
- props: {
9
- theme: { default: "primary" },
10
- size: { default: 60 }
11
- },
12
- setup(e) {
13
- return p((t) => ({
14
- v35198121: `${t.size}px`
15
- })), (t, o) => (n(), i("div", {
16
- class: _(["p-loading-icon", `is-theme-${e.theme}`])
17
- }, [...o[0] || (o[0] = [
18
- s("svg", { viewBox: "25 25 50 50" }, [
19
- s("circle", {
20
- cx: "50",
21
- cy: "50",
22
- fill: "none",
23
- r: "20"
24
- })
25
- ], -1)
26
- ])], 2));
27
- }
28
- }), y = /* @__PURE__ */ m(v, [["__scopeId", "data-v-2c246d61"]]), z = { class: "p-loading" }, B = {
29
- key: 0,
30
- class: "title"
31
- }, k = /* @__PURE__ */ l({
32
- name: "PLoading",
33
- __name: "PLoading",
34
- props: {
35
- theme: {},
36
- title: {},
37
- iconSize: {},
38
- debugMode: { type: Boolean }
39
- },
40
- setup(e) {
41
- const t = C(), o = f(x.INSTANCE_ID);
42
- function u() {
43
- t.destroy(o);
44
- }
45
- return (L, a) => (n(), i("div", z, [
46
- c(y, {
47
- size: e.iconSize,
48
- theme: e.theme
49
- }, null, 8, ["size", "theme"]),
50
- e.title ? (n(), i("div", B, g(e.title), 1)) : r("", !0),
51
- e.debugMode ? (n(), P(I, {
52
- key: 1,
53
- align: "center"
54
- }, {
55
- default: d(() => [
56
- c(N, {
57
- onClick: u,
58
- theme: "primary"
59
- }, {
60
- default: d(() => [...a[0] || (a[0] = [
61
- h("强制关闭遮罩(仅在调试模式下可用)", -1)
62
- ])]),
63
- _: 1
64
- })
65
- ]),
66
- _: 1
67
- })) : r("", !0)
68
- ]));
69
- }
70
- }), M = /* @__PURE__ */ m(k, [["__scopeId", "data-v-c71a204e"]]);
71
- export {
72
- M as default
73
- };
@@ -1,111 +0,0 @@
1
- import { defineComponent as y, inject as C, ref as v, computed as B, createElementBlock as d, openBlock as r, createVNode as l, withCtx as a, createCommentVNode as s, createElementVNode as N, toDisplayString as i, withDirectives as f, vModelText as p, createTextVNode as g } from "vue";
2
- import { usePopup as T, POPUP_COMPONENT_INJECTS as V } from "vue-popup-plus";
3
- import "./vue-popup-plus-plugin-preset.js";
4
- import { P as k, a as L, b } from "./PBody-dDV4yMXv.js";
5
- import { P as E } from "./PFooter-Cp_J7xg-.js";
6
- import { P as I, a as h } from "./PButtonGroup-C-RNjqPq.js";
7
- import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- const D = { class: "p-prompt" }, M = {
9
- key: 0,
10
- class: "message"
11
- }, O = { class: "input" }, U = ["maxLength", "placeholder"], $ = ["maxLength", "placeholder"], w = /* @__PURE__ */ y({
12
- name: "PPrompt",
13
- __name: "PPrompt",
14
- props: {
15
- title: {},
16
- headerClose: { type: Boolean },
17
- message: { type: [String, Boolean] },
18
- type: {},
19
- defaultValue: {},
20
- placeholder: {},
21
- maxLength: {},
22
- confirmText: {},
23
- cancelText: {},
24
- draggable: { type: Boolean }
25
- },
26
- setup(e) {
27
- const u = T(), m = C(V.INSTANCE_ID), n = v(e.defaultValue), x = B(() => e.message !== !1);
28
- function P() {
29
- u.destroy(m, n.value);
30
- }
31
- function c() {
32
- u.destroy(m);
33
- }
34
- return (j, t) => (r(), d("div", D, [
35
- l(k, null, {
36
- header: a(() => [
37
- l(b, {
38
- draggable: e.draggable,
39
- hasCloseButton: e.headerClose,
40
- title: e.title,
41
- onClose: t[0] || (t[0] = (o) => c()),
42
- iconClass: "prompt"
43
- }, null, 8, ["draggable", "hasCloseButton", "title"])
44
- ]),
45
- footer: a(() => [
46
- l(E, null, {
47
- default: a(() => [
48
- l(I, {
49
- align: "right",
50
- theme: "primary"
51
- }, {
52
- default: a(() => [
53
- l(h, {
54
- onClick: t[3] || (t[3] = (o) => c()),
55
- type: "plain"
56
- }, {
57
- default: a(() => [
58
- g(i(e.cancelText), 1)
59
- ]),
60
- _: 1
61
- }),
62
- l(h, {
63
- onClick: t[4] || (t[4] = (o) => P())
64
- }, {
65
- default: a(() => [
66
- g(i(e.confirmText), 1)
67
- ]),
68
- _: 1
69
- })
70
- ]),
71
- _: 1
72
- })
73
- ]),
74
- _: 1
75
- })
76
- ]),
77
- default: a(() => [
78
- l(L, null, {
79
- default: a(() => [
80
- x.value ? (r(), d("div", M, i(e.message), 1)) : s("", !0),
81
- N("div", O, [
82
- e.type === "input" ? f((r(), d("input", {
83
- key: 0,
84
- maxLength: e.maxLength,
85
- placeholder: e.placeholder,
86
- type: "text",
87
- "onUpdate:modelValue": t[1] || (t[1] = (o) => n.value = o)
88
- }, null, 8, U)), [
89
- [p, n.value]
90
- ]) : s("", !0),
91
- e.type === "textarea" ? f((r(), d("textarea", {
92
- key: 1,
93
- maxLength: e.maxLength,
94
- placeholder: e.placeholder,
95
- "onUpdate:modelValue": t[2] || (t[2] = (o) => n.value = o)
96
- }, null, 8, $)), [
97
- [p, n.value]
98
- ]) : s("", !0)
99
- ])
100
- ]),
101
- _: 1
102
- })
103
- ]),
104
- _: 1
105
- })
106
- ]));
107
- }
108
- }), z = /* @__PURE__ */ S(w, [["__scopeId", "data-v-a8dca71f"]]);
109
- export {
110
- z as default
111
- };
@@ -1,29 +0,0 @@
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 { _ as f } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const P = { class: "content" }, _ = /* @__PURE__ */ a({
5
- name: "PToast",
6
- __name: "PToast",
7
- props: {
8
- content: {},
9
- theme: {},
10
- duration: {}
11
- },
12
- setup(e) {
13
- const n = p(), s = i(u.INSTANCE_ID);
14
- return m(() => {
15
- window.setTimeout(() => {
16
- n.destroy(s);
17
- }, e.duration);
18
- }), (T, t) => (c(), r("div", {
19
- class: d(["p-message", `is-theme-${e.theme}`])
20
- }, [
21
- t[0] || (t[0] = o("div", { class: "mask" }, null, -1)),
22
- t[1] || (t[1] = o("div", { class: "mask-background" }, null, -1)),
23
- o("div", P, l(e.content), 1)
24
- ], 2));
25
- }
26
- }), C = /* @__PURE__ */ f(_, [["__scopeId", "data-v-91202cf8"]]);
27
- export {
28
- C as default
29
- };