vue-popup-plus-plugin-preset 1.4.0 → 1.5.1
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/README.md +86 -0
- package/dist/{PAlbum-Dx2UtKoc.js → PAlbum-C2Z3Qgkm.js} +92 -88
- package/dist/PAlert-xZSu5lCj.js +71 -0
- package/dist/PBody-Cotuzlbw.js +129 -0
- package/dist/PButtonGroup-8zbI-6Gv.js +93 -0
- package/dist/PConfirm-C_ojBEhv.js +85 -0
- package/dist/PDialog-U1Krz20W.js +71 -0
- package/dist/PLoading-DMxZw80B.js +60 -0
- package/dist/PPrompt-C430XhhF.js +111 -0
- package/dist/PToast-BelmEP1_.js +67 -0
- package/dist/vue-popup-plus-plugin-preset.d.ts +114 -24
- package/dist/vue-popup-plus-plugin-preset.js +661 -177
- package/dist/vue-popup-plus-plugin-preset.umd.cjs +3 -3
- package/package.json +5 -4
- package/dist/PAlert-B2CDGy2q.js +0 -69
- package/dist/PBody-dDV4yMXv.js +0 -129
- package/dist/PButtonGroup-C-RNjqPq.js +0 -80
- package/dist/PConfirm-Br4b52N6.js +0 -84
- package/dist/PDialog-Bsv_dImI.js +0 -72
- package/dist/PFooter-Cp_J7xg-.js +0 -14
- package/dist/PLoading-DAe6QRqV.js +0 -73
- package/dist/PPrompt-Do_oimXJ.js +0 -111
- package/dist/PToast-DYDVn76M.js +0 -29
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineComponent as h, createElementBlock as n, openBlock as u, renderSlot as y, inject as c, useTemplateRef as P, computed as p, normalizeClass as S, createElementVNode as $, useSlots as T, provide as d, onMounted as G, Fragment as B, renderList as _, createBlock as C, createCommentVNode as j, resolveDynamicComponent as F } from "vue";
|
|
2
|
+
import { _ as v } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
const I = { class: "p-footer" }, w = /* @__PURE__ */ h({
|
|
5
|
+
name: "PFooter",
|
|
6
|
+
__name: "PFooter",
|
|
7
|
+
setup(e) {
|
|
8
|
+
return (o, s) => (u(), n("div", I, [
|
|
9
|
+
y(o.$slots, "default", {}, void 0, !0)
|
|
10
|
+
]));
|
|
11
|
+
}
|
|
12
|
+
}), L = /* @__PURE__ */ v(w, [["__scopeId", "data-v-a6296b40"]]), E = ["disabled"], M = /* @__PURE__ */ h({
|
|
13
|
+
name: "PButton",
|
|
14
|
+
__name: "PButton",
|
|
15
|
+
props: {
|
|
16
|
+
type: {},
|
|
17
|
+
theme: {},
|
|
18
|
+
size: {},
|
|
19
|
+
disabled: { type: Boolean, default: !1 }
|
|
20
|
+
},
|
|
21
|
+
emits: ["click"],
|
|
22
|
+
setup(e, { emit: o }) {
|
|
23
|
+
c(t.inButtonGroup, !1);
|
|
24
|
+
const s = c(t.groupType, "default"), f = c(t.groupTheme, "default"), m = c(t.groupSize, "default"), l = P("button"), a = o, g = p(() => window.innerWidth <= 600), i = p(() => ({
|
|
25
|
+
[`is-type-${e.type || s}`]: !0,
|
|
26
|
+
[`is-theme-${e.theme || f}`]: !0,
|
|
27
|
+
[`is-size-${e.size || m}`]: !0,
|
|
28
|
+
"is-mobile": g.value
|
|
29
|
+
}));
|
|
30
|
+
function k(b) {
|
|
31
|
+
a("click", b), l.value?.blur();
|
|
32
|
+
}
|
|
33
|
+
return (b, r) => (u(), n("button", {
|
|
34
|
+
class: S(["p-button", i.value]),
|
|
35
|
+
disabled: e.disabled,
|
|
36
|
+
onClick: r[0] || (r[0] = (z) => k(z)),
|
|
37
|
+
ref: "button"
|
|
38
|
+
}, [
|
|
39
|
+
r[1] || (r[1] = $("div", { class: "background" }, null, -1)),
|
|
40
|
+
y(b.$slots, "default", {}, void 0, !0)
|
|
41
|
+
], 10, E));
|
|
42
|
+
}
|
|
43
|
+
}), N = /* @__PURE__ */ v(M, [["__scopeId", "data-v-3dd46a8f"]]), O = {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "cutline"
|
|
46
|
+
}, t = {
|
|
47
|
+
inButtonGroup: Symbol("inButtonGroup"),
|
|
48
|
+
groupType: Symbol("groupType"),
|
|
49
|
+
groupTheme: Symbol("groupTheme"),
|
|
50
|
+
groupSize: Symbol("groupSize")
|
|
51
|
+
}, R = /* @__PURE__ */ h({
|
|
52
|
+
name: "PButtonGroup",
|
|
53
|
+
__name: "PButtonGroup",
|
|
54
|
+
props: {
|
|
55
|
+
type: { default: "default" },
|
|
56
|
+
theme: { default: "default" },
|
|
57
|
+
size: { default: "default" },
|
|
58
|
+
direction: { default: "horizontal" },
|
|
59
|
+
align: { default: "start" },
|
|
60
|
+
tight: { type: Boolean, default: !1 },
|
|
61
|
+
cutline: { type: Boolean, default: !1 }
|
|
62
|
+
},
|
|
63
|
+
setup(e) {
|
|
64
|
+
const o = T(), s = p(() => e.cutline && !e.tight), f = p(() => ({
|
|
65
|
+
[`is-align-${e.align}`]: !0,
|
|
66
|
+
[`is-direction-${e.direction}`]: !0,
|
|
67
|
+
"is-tight": e.tight,
|
|
68
|
+
"has-cutline": s.value
|
|
69
|
+
}));
|
|
70
|
+
d(t.inButtonGroup, !0), d(t.groupType, e.type), d(t.groupTheme, e.theme), d(t.groupSize, e.size), G(() => {
|
|
71
|
+
m();
|
|
72
|
+
});
|
|
73
|
+
function m() {
|
|
74
|
+
o.default().some((a) => {
|
|
75
|
+
a.type;
|
|
76
|
+
}) && console.warn("PButtonGroup 只能包含 PButton 组件");
|
|
77
|
+
}
|
|
78
|
+
return (l, a) => (u(), n("div", {
|
|
79
|
+
class: S(["p-button-group", f.value]),
|
|
80
|
+
ref: "group"
|
|
81
|
+
}, [
|
|
82
|
+
s.value ? (u(!0), n(B, { key: 0 }, _(o.default?.(), (g, i) => (u(), n(B, { key: i }, [
|
|
83
|
+
(u(), C(F(g))),
|
|
84
|
+
i < (o.default?.() || []).length - 1 ? (u(), n("div", O)) : j("", !0)
|
|
85
|
+
], 64))), 128)) : y(l.$slots, "default", { key: 1 }, void 0, !0)
|
|
86
|
+
], 2));
|
|
87
|
+
}
|
|
88
|
+
}), W = /* @__PURE__ */ v(R, [["__scopeId", "data-v-cf19f04b"]]);
|
|
89
|
+
export {
|
|
90
|
+
L as P,
|
|
91
|
+
W as a,
|
|
92
|
+
N as b
|
|
93
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent as m, inject as u, createElementBlock as C, openBlock as P, normalizeClass as p, createVNode as n, withCtx as t, createElementVNode as g, toDisplayString as a, createTextVNode as d } from "vue";
|
|
2
|
+
import { usePopup as k, POPUP_COMPONENT_INJECTS as x } from "vue-popup-plus";
|
|
3
|
+
import { P as B, a as T, b as y } from "./PBody-Cotuzlbw.js";
|
|
4
|
+
import { P as N, a as b, b as f } from "./PButtonGroup-8zbI-6Gv.js";
|
|
5
|
+
import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const v = { class: "content" }, I = /* @__PURE__ */ m({
|
|
7
|
+
name: "PConfirm",
|
|
8
|
+
__name: "PConfirm",
|
|
9
|
+
props: {
|
|
10
|
+
skin: {},
|
|
11
|
+
title: {},
|
|
12
|
+
headerClose: { type: Boolean },
|
|
13
|
+
content: {},
|
|
14
|
+
confirmText: {},
|
|
15
|
+
cancelText: {},
|
|
16
|
+
draggable: { type: Boolean }
|
|
17
|
+
},
|
|
18
|
+
setup(e) {
|
|
19
|
+
const l = k(), i = u(x.INSTANCE_ID);
|
|
20
|
+
function c() {
|
|
21
|
+
l.destroy(i, !0);
|
|
22
|
+
}
|
|
23
|
+
function r() {
|
|
24
|
+
l.destroy(i, !1);
|
|
25
|
+
}
|
|
26
|
+
return (E, o) => (P(), C("div", {
|
|
27
|
+
class: p(["p-confirm", `is-skin-${e.skin}`])
|
|
28
|
+
}, [
|
|
29
|
+
n(B, { skin: e.skin }, {
|
|
30
|
+
header: t(() => [
|
|
31
|
+
n(y, {
|
|
32
|
+
draggable: e.draggable,
|
|
33
|
+
hasCloseButton: e.headerClose,
|
|
34
|
+
title: e.title,
|
|
35
|
+
onClose: o[0] || (o[0] = (s) => r()),
|
|
36
|
+
iconClass: "confirm",
|
|
37
|
+
iconTheme: "warning"
|
|
38
|
+
}, null, 8, ["draggable", "hasCloseButton", "title"])
|
|
39
|
+
]),
|
|
40
|
+
footer: t(() => [
|
|
41
|
+
n(N, null, {
|
|
42
|
+
default: t(() => [
|
|
43
|
+
n(b, { align: "end" }, {
|
|
44
|
+
default: t(() => [
|
|
45
|
+
n(f, {
|
|
46
|
+
onClick: o[1] || (o[1] = (s) => r()),
|
|
47
|
+
type: "plain"
|
|
48
|
+
}, {
|
|
49
|
+
default: t(() => [
|
|
50
|
+
d(a(e.cancelText), 1)
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
}),
|
|
54
|
+
n(f, {
|
|
55
|
+
onClick: o[2] || (o[2] = (s) => c()),
|
|
56
|
+
theme: "primary"
|
|
57
|
+
}, {
|
|
58
|
+
default: t(() => [
|
|
59
|
+
d(a(e.confirmText), 1)
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
})
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
})
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
})
|
|
69
|
+
]),
|
|
70
|
+
default: t(() => [
|
|
71
|
+
n(T, { fitIcon: "" }, {
|
|
72
|
+
default: t(() => [
|
|
73
|
+
g("div", v, a(e.content), 1)
|
|
74
|
+
]),
|
|
75
|
+
_: 1
|
|
76
|
+
})
|
|
77
|
+
]),
|
|
78
|
+
_: 1
|
|
79
|
+
}, 8, ["skin"])
|
|
80
|
+
], 2));
|
|
81
|
+
}
|
|
82
|
+
}), D = /* @__PURE__ */ h(I, [["__scopeId", "data-v-27f864c0"]]);
|
|
83
|
+
export {
|
|
84
|
+
D as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as f, ref as g, computed as d, defineAsyncComponent as p, createElementBlock as y, openBlock as n, normalizeClass as P, createVNode as a, createSlots as h, withCtx as t, createBlock as s, resolveDynamicComponent as k, mergeProps as v, createCommentVNode as B } from "vue";
|
|
2
|
+
import { usePopup as b } from "vue-popup-plus";
|
|
3
|
+
import { P as x, a as D, b as $, c as S } from "./PBody-Cotuzlbw.js";
|
|
4
|
+
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const H = /* @__PURE__ */ f({
|
|
6
|
+
name: "PDialog",
|
|
7
|
+
__name: "PDialog",
|
|
8
|
+
props: {
|
|
9
|
+
id: {},
|
|
10
|
+
skin: {},
|
|
11
|
+
title: {},
|
|
12
|
+
customComponent: {},
|
|
13
|
+
customComponentProps: {},
|
|
14
|
+
header: { type: Boolean },
|
|
15
|
+
headerClose: { type: Boolean },
|
|
16
|
+
draggable: { type: Boolean },
|
|
17
|
+
debugMode: { type: Boolean }
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
const m = b(), l = g(1), i = d(
|
|
21
|
+
() => `${e.id}-${l.value}`
|
|
22
|
+
), u = d(() => typeof e.customComponent == "function" ? p(e.customComponent) : e.customComponent);
|
|
23
|
+
function c() {
|
|
24
|
+
l.value++;
|
|
25
|
+
}
|
|
26
|
+
function r() {
|
|
27
|
+
m.dialog.close(e.id);
|
|
28
|
+
}
|
|
29
|
+
return (K, o) => (n(), y("div", {
|
|
30
|
+
class: P(["p-dialog", { "no-header": !e.header }])
|
|
31
|
+
}, [
|
|
32
|
+
a(x, { skin: e.skin }, h({
|
|
33
|
+
default: t(() => [
|
|
34
|
+
a(D, { withPadding: !1 }, {
|
|
35
|
+
default: t(() => [
|
|
36
|
+
(n(), s(k(u.value), v({ key: i.value }, e.customComponentProps), null, 16))
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
})
|
|
40
|
+
]),
|
|
41
|
+
_: 2
|
|
42
|
+
}, [
|
|
43
|
+
e.header ? {
|
|
44
|
+
name: "header",
|
|
45
|
+
fn: t(() => [
|
|
46
|
+
a($, {
|
|
47
|
+
draggable: e.draggable,
|
|
48
|
+
hasCloseButton: e.headerClose,
|
|
49
|
+
title: e.title,
|
|
50
|
+
onClose: o[1] || (o[1] = (C) => r())
|
|
51
|
+
}, {
|
|
52
|
+
buttons: t(() => [
|
|
53
|
+
e.debugMode ? (n(), s(S, {
|
|
54
|
+
key: 0,
|
|
55
|
+
onClick: o[0] || (o[0] = (C) => c()),
|
|
56
|
+
iconClass: "reload",
|
|
57
|
+
theme: "success"
|
|
58
|
+
})) : B("", !0)
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}, 8, ["draggable", "hasCloseButton", "title"])
|
|
62
|
+
]),
|
|
63
|
+
key: "0"
|
|
64
|
+
} : void 0
|
|
65
|
+
]), 1032, ["skin"])
|
|
66
|
+
], 2));
|
|
67
|
+
}
|
|
68
|
+
}), A = /* @__PURE__ */ w(H, [["__scopeId", "data-v-4b198edc"]]);
|
|
69
|
+
export {
|
|
70
|
+
A as default
|
|
71
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as s, useCssVars as c, createElementBlock as i, openBlock as n, normalizeClass as m, createElementVNode as a, inject as r, createVNode as l, createCommentVNode as p, toDisplayString as u } from "vue";
|
|
2
|
+
import { usePopup as f, POPUP_COMPONENT_INJECTS as _ } from "vue-popup-plus";
|
|
3
|
+
import { _ as d } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const g = /* @__PURE__ */ s({
|
|
6
|
+
name: "PLoadingIcon",
|
|
7
|
+
__name: "PLoadingIcon",
|
|
8
|
+
props: {
|
|
9
|
+
theme: { default: "primary" },
|
|
10
|
+
size: { default: 60 }
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
return c((t) => ({
|
|
14
|
+
db319f58: `${t.size}px`
|
|
15
|
+
})), (t, o) => (n(), i("div", {
|
|
16
|
+
class: m(["p-loading-icon", `is-theme-${e.theme}`])
|
|
17
|
+
}, [...o[0] || (o[0] = [
|
|
18
|
+
a("svg", { viewBox: "25 25 50 50" }, [
|
|
19
|
+
a("circle", {
|
|
20
|
+
cx: "50",
|
|
21
|
+
cy: "50",
|
|
22
|
+
fill: "none",
|
|
23
|
+
r: "20"
|
|
24
|
+
})
|
|
25
|
+
], -1)
|
|
26
|
+
])], 2));
|
|
27
|
+
}
|
|
28
|
+
}), P = /* @__PURE__ */ d(g, [["__scopeId", "data-v-a22f9b94"]]), h = { class: "wrapper" }, k = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "title"
|
|
31
|
+
}, v = /* @__PURE__ */ s({
|
|
32
|
+
name: "PLoading",
|
|
33
|
+
__name: "PLoading",
|
|
34
|
+
props: {
|
|
35
|
+
skin: {},
|
|
36
|
+
theme: {},
|
|
37
|
+
title: {},
|
|
38
|
+
iconSize: {},
|
|
39
|
+
mask: { type: Boolean },
|
|
40
|
+
debugMode: { type: Boolean }
|
|
41
|
+
},
|
|
42
|
+
setup(e) {
|
|
43
|
+
return c((t) => ({
|
|
44
|
+
v45a04100: `${t.iconSize * 4}px`
|
|
45
|
+
})), f(), r(_.INSTANCE_ID), (t, o) => (n(), i("div", {
|
|
46
|
+
class: m(["p-loading", [`is-skin-${e.skin}`, { "has-mask": e.mask }]])
|
|
47
|
+
}, [
|
|
48
|
+
a("div", h, [
|
|
49
|
+
l(P, {
|
|
50
|
+
size: e.iconSize,
|
|
51
|
+
theme: e.theme
|
|
52
|
+
}, null, 8, ["size", "theme"]),
|
|
53
|
+
e.title ? (n(), i("div", k, u(e.title), 1)) : p("", !0)
|
|
54
|
+
])
|
|
55
|
+
], 2));
|
|
56
|
+
}
|
|
57
|
+
}), C = /* @__PURE__ */ d(v, [["__scopeId", "data-v-55443cbf"]]);
|
|
58
|
+
export {
|
|
59
|
+
C as default
|
|
60
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent as C, inject as y, ref as v, computed as k, createElementBlock as s, openBlock as d, normalizeClass as B, createVNode as l, withCtx as a, createCommentVNode as i, createElementVNode as N, toDisplayString as r, withDirectives as f, vModelText as g, createTextVNode as p } 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 b, a as L, b as I } from "./PBody-Cotuzlbw.js";
|
|
5
|
+
import { P as E, a as S, b as x } from "./PButtonGroup-8zbI-6Gv.js";
|
|
6
|
+
import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const D = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "message"
|
|
10
|
+
}, M = { class: "input" }, O = ["maxLength", "placeholder"], U = ["maxLength", "placeholder"], w = /* @__PURE__ */ C({
|
|
11
|
+
name: "PPrompt",
|
|
12
|
+
__name: "PPrompt",
|
|
13
|
+
props: {
|
|
14
|
+
skin: {},
|
|
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 = y(V.INSTANCE_ID), o = v(e.defaultValue), h = k(() => e.message !== !1);
|
|
28
|
+
function P() {
|
|
29
|
+
u.destroy(m, o.value);
|
|
30
|
+
}
|
|
31
|
+
function c() {
|
|
32
|
+
u.destroy(m);
|
|
33
|
+
}
|
|
34
|
+
return (j, t) => (d(), s("div", {
|
|
35
|
+
class: B(["p-prompt", `is-skin-${e.skin}`])
|
|
36
|
+
}, [
|
|
37
|
+
l(b, { skin: e.skin }, {
|
|
38
|
+
header: a(() => [
|
|
39
|
+
l(I, {
|
|
40
|
+
draggable: e.draggable,
|
|
41
|
+
hasCloseButton: e.headerClose,
|
|
42
|
+
title: e.title,
|
|
43
|
+
onClose: t[0] || (t[0] = (n) => c()),
|
|
44
|
+
iconClass: "prompt"
|
|
45
|
+
}, null, 8, ["draggable", "hasCloseButton", "title"])
|
|
46
|
+
]),
|
|
47
|
+
footer: a(() => [
|
|
48
|
+
l(E, null, {
|
|
49
|
+
default: a(() => [
|
|
50
|
+
l(S, { align: "end" }, {
|
|
51
|
+
default: a(() => [
|
|
52
|
+
l(x, {
|
|
53
|
+
onClick: t[3] || (t[3] = (n) => c()),
|
|
54
|
+
type: "plain"
|
|
55
|
+
}, {
|
|
56
|
+
default: a(() => [
|
|
57
|
+
p(r(e.cancelText), 1)
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
}),
|
|
61
|
+
l(x, {
|
|
62
|
+
onClick: t[4] || (t[4] = (n) => P()),
|
|
63
|
+
theme: "primary"
|
|
64
|
+
}, {
|
|
65
|
+
default: a(() => [
|
|
66
|
+
p(r(e.confirmText), 1)
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
})
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
})
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
})
|
|
76
|
+
]),
|
|
77
|
+
default: a(() => [
|
|
78
|
+
l(L, { fitIcon: "" }, {
|
|
79
|
+
default: a(() => [
|
|
80
|
+
h.value ? (d(), s("div", D, r(e.message), 1)) : i("", !0),
|
|
81
|
+
N("div", M, [
|
|
82
|
+
e.type === "input" ? f((d(), s("input", {
|
|
83
|
+
key: 0,
|
|
84
|
+
maxLength: e.maxLength,
|
|
85
|
+
placeholder: e.placeholder,
|
|
86
|
+
type: "text",
|
|
87
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => o.value = n)
|
|
88
|
+
}, null, 8, O)), [
|
|
89
|
+
[g, o.value]
|
|
90
|
+
]) : i("", !0),
|
|
91
|
+
e.type === "textarea" ? f((d(), s("textarea", {
|
|
92
|
+
key: 1,
|
|
93
|
+
maxLength: e.maxLength,
|
|
94
|
+
placeholder: e.placeholder,
|
|
95
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => o.value = n)
|
|
96
|
+
}, null, 8, U)), [
|
|
97
|
+
[g, o.value]
|
|
98
|
+
]) : i("", !0)
|
|
99
|
+
])
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
})
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["skin"])
|
|
106
|
+
], 2));
|
|
107
|
+
}
|
|
108
|
+
}), R = /* @__PURE__ */ $(w, [["__scopeId", "data-v-927e24b0"]]);
|
|
109
|
+
export {
|
|
110
|
+
R as default
|
|
111
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as p, inject as C, computed as T, ref as h, onMounted as y, onBeforeUnmount as k, createElementBlock as r, openBlock as d, normalizeClass as c, createElementVNode as t, createCommentVNode as P, toDisplayString as g } from "vue";
|
|
2
|
+
import { usePopup as w, POPUP_COMPONENT_INJECTS as N } from "vue-popup-plus";
|
|
3
|
+
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const M = { class: "wrapper" }, b = { class: "icon" }, B = { class: "content" }, I = /* @__PURE__ */ p({
|
|
5
|
+
name: "PToast",
|
|
6
|
+
__name: "PToast",
|
|
7
|
+
props: {
|
|
8
|
+
skin: {},
|
|
9
|
+
content: {},
|
|
10
|
+
theme: {},
|
|
11
|
+
duration: {},
|
|
12
|
+
showClose: { type: Boolean },
|
|
13
|
+
hoverWait: { type: Boolean }
|
|
14
|
+
},
|
|
15
|
+
setup(e) {
|
|
16
|
+
const i = w(), l = C(N.INSTANCE_ID), n = T(() => e.duration > 0), s = h();
|
|
17
|
+
y(() => {
|
|
18
|
+
a();
|
|
19
|
+
}), k(() => {
|
|
20
|
+
u();
|
|
21
|
+
});
|
|
22
|
+
function a() {
|
|
23
|
+
n.value && (s.value = window.setTimeout(() => {
|
|
24
|
+
i.destroy(l);
|
|
25
|
+
}, e.duration));
|
|
26
|
+
}
|
|
27
|
+
function u() {
|
|
28
|
+
s.value && window.clearTimeout(s.value);
|
|
29
|
+
}
|
|
30
|
+
function m() {
|
|
31
|
+
!e.hoverWait || !n.value || u();
|
|
32
|
+
}
|
|
33
|
+
function f() {
|
|
34
|
+
!e.hoverWait || !n.value || a();
|
|
35
|
+
}
|
|
36
|
+
function v() {
|
|
37
|
+
i.destroy(l);
|
|
38
|
+
}
|
|
39
|
+
return (D, o) => (d(), r("div", {
|
|
40
|
+
class: c(["p-message", `is-theme-${e.theme}`]),
|
|
41
|
+
onMouseenter: m,
|
|
42
|
+
onMouseleave: f
|
|
43
|
+
}, [
|
|
44
|
+
o[1] || (o[1] = t("div", { class: "background" }, null, -1)),
|
|
45
|
+
o[2] || (o[2] = t("div", { class: "background-theme" }, null, -1)),
|
|
46
|
+
o[3] || (o[3] = t("div", { class: "background-border" }, null, -1)),
|
|
47
|
+
t("div", M, [
|
|
48
|
+
t("div", b, [
|
|
49
|
+
t("i", {
|
|
50
|
+
class: c(["iconfont-popup-plugin-preset", `toast-${e.theme}`])
|
|
51
|
+
}, null, 2)
|
|
52
|
+
]),
|
|
53
|
+
t("div", B, g(e.content), 1),
|
|
54
|
+
e.showClose || !n.value ? (d(), r("div", {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "close-btn",
|
|
57
|
+
onClick: v
|
|
58
|
+
}, [...o[0] || (o[0] = [
|
|
59
|
+
t("i", { class: "iconfont-popup-plugin-preset close" }, null, -1)
|
|
60
|
+
])])) : P("", !0)
|
|
61
|
+
])
|
|
62
|
+
], 34));
|
|
63
|
+
}
|
|
64
|
+
}), W = /* @__PURE__ */ E(I, [["__scopeId", "data-v-f875d998"]]);
|
|
65
|
+
export {
|
|
66
|
+
W as default
|
|
67
|
+
};
|