vue-popup-plus-plugin-preset 1.3.4 → 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/README.md +86 -0
- package/dist/{PAlbum-LPEViiZF.js → PAlbum-C2Z3Qgkm.js} +143 -137
- 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-DNiRg9wi.js +67 -0
- package/dist/vue-popup-plus-plugin-preset.d.ts +333 -111
- package/dist/vue-popup-plus-plugin-preset.js +655 -154
- package/dist/vue-popup-plus-plugin-preset.umd.cjs +3 -3
- package/package.json +4 -3
- 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/PLoadingMask-BjvzKGUb.js +0 -62
- package/dist/PPrompt-Do_oimXJ.js +0 -111
- package/dist/PToast-CVYEOEG3.js +0 -30
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Vue Popup Plus 🚀
|
|
2
|
+
|
|
3
|
+
一个功能强大、灵活易用的 Vue 3 弹窗组件库,让弹窗管理变得简单而优雅。
|
|
4
|
+
|
|
5
|
+
[](https://vuejs.org/)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://github.com/yourusername/vue-popup-plus)
|
|
9
|
+
|
|
10
|
+
## ✨ 特性
|
|
11
|
+
|
|
12
|
+
- 🎯 **简单易用** - 简洁的 API,快速集成到您的项目中
|
|
13
|
+
- 🔌 **可扩展** - 自定义弹窗内容和样式,满足各种场景需求
|
|
14
|
+
- 🎭 **动画支持** - 内置多种动画效果,让弹窗展示更生动
|
|
15
|
+
- 📱 **响应式设计** - 完美适配各种屏幕尺寸
|
|
16
|
+
- 🧩 **TypeScript 支持** - 完整的类型定义,提供良好的开发体验
|
|
17
|
+
|
|
18
|
+
## 📦 安装
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# 使用 npm
|
|
22
|
+
npm install vue-popup-plus
|
|
23
|
+
|
|
24
|
+
# 使用 yarn
|
|
25
|
+
yarn add vue-popup-plus
|
|
26
|
+
|
|
27
|
+
# 使用 pnpm
|
|
28
|
+
pnpm add vue-popup-plus
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 📚 文档
|
|
32
|
+
|
|
33
|
+
查看我们的[在线文档](http://vue-popup-plus.styzy.cn)获取更多详细信息和高级用法。
|
|
34
|
+
|
|
35
|
+
## 🚀 快速开始
|
|
36
|
+
|
|
37
|
+
### 全局注册
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
import { createApp } from 'vue'
|
|
41
|
+
import { createPopup } from 'vue-popup-plus'
|
|
42
|
+
import App from './App.vue'
|
|
43
|
+
|
|
44
|
+
const app = createApp(App)
|
|
45
|
+
const popup = createPopup()
|
|
46
|
+
|
|
47
|
+
app.use(popup)
|
|
48
|
+
|
|
49
|
+
app.mount('#app')
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 基本使用
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<template>
|
|
56
|
+
<button @click="showPopup">显示弹窗</button>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script setup>
|
|
60
|
+
import { usePopup } from 'vue-popup-plus'
|
|
61
|
+
|
|
62
|
+
const popup = usePopup()
|
|
63
|
+
|
|
64
|
+
const showPopup = () => {
|
|
65
|
+
popup.render({
|
|
66
|
+
// 组件
|
|
67
|
+
component: () => import('./components/Demo.vue'),
|
|
68
|
+
// 组件属性
|
|
69
|
+
componentProps: {
|
|
70
|
+
// 根据你的组件属性传入
|
|
71
|
+
},
|
|
72
|
+
width: 400,
|
|
73
|
+
maxHeight: 600,
|
|
74
|
+
mask: false,
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 🤝 贡献
|
|
81
|
+
|
|
82
|
+
欢迎贡献代码、报告问题或提出新功能建议!请查看[贡献指南](CONTRIBUTING.md)了解更多信息。
|
|
83
|
+
|
|
84
|
+
## 📄 许可证
|
|
85
|
+
|
|
86
|
+
[MIT](LICENSE) © Your Name
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePopup as
|
|
3
|
-
import { _ as
|
|
4
|
-
function
|
|
1
|
+
import { defineComponent as ne, inject as le, ref as c, computed as y, watch as oe, onBeforeMount as se, onMounted as ae, onBeforeUnmount as re, createElementBlock as o, openBlock as s, normalizeClass as X, createElementVNode as d, createCommentVNode as v, Fragment as N, renderList as ie, normalizeStyle as ue, toDisplayString as B } from "vue";
|
|
2
|
+
import { usePopup as ce, POPUP_COMPONENT_INJECTS as de } from "vue-popup-plus";
|
|
3
|
+
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
function pe(n) {
|
|
5
5
|
const t = Object.prototype.toString.call(n).match(/\s+(\w+)/);
|
|
6
6
|
return t ? t[1] : "Null";
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function me(n, {
|
|
9
9
|
allowCrossOrigin: t = !1,
|
|
10
|
-
fileName: l =
|
|
10
|
+
fileName: l = ge(n),
|
|
11
11
|
headers: u = {},
|
|
12
12
|
onSuccess: h = () => {
|
|
13
13
|
}
|
|
14
14
|
} = {}) {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
console.error(`
|
|
19
|
-
`,
|
|
16
|
+
fe(n) ? O() : t ? S() : window.open(n);
|
|
17
|
+
} catch (a) {
|
|
18
|
+
console.error(`download error:
|
|
19
|
+
`, a);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
|
|
21
|
+
function O() {
|
|
22
|
+
const a = document.createElement("a");
|
|
23
|
+
a.setAttribute("download", l), a.href = n, a.click(), h(l);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
let
|
|
25
|
+
function S() {
|
|
26
|
+
let a;
|
|
27
27
|
try {
|
|
28
|
-
|
|
28
|
+
a = new XMLHttpRequest();
|
|
29
29
|
} catch {
|
|
30
30
|
throw new Error("当前浏览器不支持XMLHttpRequest,无法下载");
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
a.open("GET", n, !0), a.responseType = "blob";
|
|
33
33
|
for (const f in u)
|
|
34
|
-
Object.hasOwnProperty.call(u, f) &&
|
|
35
|
-
|
|
36
|
-
if (
|
|
37
|
-
const f = window.URL.createObjectURL(
|
|
34
|
+
Object.hasOwnProperty.call(u, f) && a.setRequestHeader(f, u[f]);
|
|
35
|
+
a.onload = function() {
|
|
36
|
+
if (a.status === 200) {
|
|
37
|
+
const f = window.URL.createObjectURL(a.response), m = document.createElement("a");
|
|
38
38
|
m.href = f, m.download = l, m.click(), h(l);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
try {
|
|
42
|
-
|
|
42
|
+
a.send();
|
|
43
43
|
} catch {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function fe(n) {
|
|
49
49
|
const t = new URL(window.location.href);
|
|
50
50
|
try {
|
|
51
51
|
const l = new URL(n);
|
|
@@ -54,13 +54,13 @@ function me(n) {
|
|
|
54
54
|
throw new Error(`错误的下载地址:${n}`);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function ge(n) {
|
|
58
58
|
return n.split("/")[n.split("/").length - 1] || "";
|
|
59
59
|
}
|
|
60
60
|
function ye(n) {
|
|
61
61
|
return n.split(".")[n.split(".").length - 1] || "";
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function be(n, t = !0) {
|
|
64
64
|
try {
|
|
65
65
|
const l = document.createElement(t ? "textarea" : "input");
|
|
66
66
|
return l.style.opacity = "0", l.style.height = "0px", l.style.border = "none", l.style.color = "transparent", l.style.position = "fixed", l.style.top = "-1000px", l.style.left = "-1000px", document.body.appendChild(l), l.value = n, l.focus(), l.select(), document.execCommand("copy"), l.blur(), document.body.removeChild(l), !0;
|
|
@@ -80,7 +80,7 @@ const p = {
|
|
|
80
80
|
EXE: "exe",
|
|
81
81
|
UNKNOWN: "unknown"
|
|
82
82
|
/* UNKNOWN */
|
|
83
|
-
},
|
|
83
|
+
}, A = /* @__PURE__ */ new Map([
|
|
84
84
|
[p.IMAGE, ["jpg", "jpeg", "png", "gif"]],
|
|
85
85
|
[
|
|
86
86
|
p.VIDEO,
|
|
@@ -97,11 +97,11 @@ const p = {
|
|
|
97
97
|
[p.TXT, ["txt"]],
|
|
98
98
|
[p.EXE, ["exe"]]
|
|
99
99
|
]);
|
|
100
|
-
class
|
|
100
|
+
class I {
|
|
101
101
|
// 文件类型
|
|
102
102
|
static FILE_TYPES = p;
|
|
103
103
|
// 文件类型后缀映射
|
|
104
|
-
static FILE_TYPE_SUFFIX_MAP =
|
|
104
|
+
static FILE_TYPE_SUFFIX_MAP = A;
|
|
105
105
|
// 文件id
|
|
106
106
|
id = "";
|
|
107
107
|
// 文件地址
|
|
@@ -120,14 +120,14 @@ class x {
|
|
|
120
120
|
}
|
|
121
121
|
// 类型
|
|
122
122
|
get type() {
|
|
123
|
-
for (const [t, l] of
|
|
123
|
+
for (const [t, l] of A)
|
|
124
124
|
if (l.some((u) => u === this.suffix))
|
|
125
125
|
return t;
|
|
126
126
|
return p.UNKNOWN;
|
|
127
127
|
}
|
|
128
128
|
constructor(t) {
|
|
129
|
-
if (t instanceof
|
|
130
|
-
switch (
|
|
129
|
+
if (t instanceof I) return t;
|
|
130
|
+
switch (pe(t)) {
|
|
131
131
|
case "String":
|
|
132
132
|
this.createdByUrl(t);
|
|
133
133
|
break;
|
|
@@ -174,132 +174,137 @@ class x {
|
|
|
174
174
|
return this.url.split("/")[this.url.split("/").length - 1] || "";
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const he = ["src"], we = ["poster", "src"], Ee = {
|
|
178
178
|
key: 0,
|
|
179
179
|
class: "tools top"
|
|
180
|
-
},
|
|
180
|
+
}, ke = {
|
|
181
181
|
key: 0,
|
|
182
182
|
class: "info count"
|
|
183
|
-
},
|
|
183
|
+
}, xe = { class: "number current" }, Pe = { class: "number" }, Ie = {
|
|
184
184
|
key: 1,
|
|
185
185
|
class: "emyty"
|
|
186
|
-
},
|
|
186
|
+
}, Oe = {
|
|
187
187
|
key: 1,
|
|
188
188
|
class: "tools left"
|
|
189
|
-
},
|
|
189
|
+
}, Se = {
|
|
190
190
|
key: 2,
|
|
191
191
|
class: "tools right"
|
|
192
|
-
},
|
|
192
|
+
}, De = {
|
|
193
193
|
key: 3,
|
|
194
194
|
class: "tools bottom"
|
|
195
|
-
},
|
|
195
|
+
}, Ce = {
|
|
196
196
|
key: 1,
|
|
197
197
|
class: "emyty"
|
|
198
|
-
},
|
|
198
|
+
}, Ue = { class: "center" }, Me = {
|
|
199
199
|
key: 3,
|
|
200
200
|
class: "emyty"
|
|
201
|
-
},
|
|
201
|
+
}, Ne = /* @__PURE__ */ ne({
|
|
202
202
|
name: "PAlbum",
|
|
203
203
|
__name: "PAlbum",
|
|
204
204
|
props: {
|
|
205
|
+
skin: {},
|
|
205
206
|
sources: {},
|
|
206
207
|
defaultIndex: {},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
disableCounter: { type: Boolean },
|
|
209
|
+
disableName: { type: Boolean },
|
|
210
|
+
disableDownload: { type: Boolean },
|
|
211
|
+
disablePure: { type: Boolean },
|
|
212
|
+
disableScale: { type: Boolean },
|
|
213
|
+
disableDrag: { type: Boolean }
|
|
213
214
|
},
|
|
214
215
|
setup(n) {
|
|
215
|
-
const t =
|
|
216
|
-
() => n.sources.map((i) => new
|
|
216
|
+
const t = ce(), l = le(de.INSTANCE_ID), u = c(n.defaultIndex), h = c(1), O = c(30), S = c(0.01), a = c(3), f = c(1.5), m = c(h.value), k = c(!1), D = c(0), C = c(0), L = c(0), T = c(0), x = c(0), P = c(0), g = c(!1), w = y(() => I.FILE_TYPES), b = y(
|
|
217
|
+
() => n.sources.map((i) => new I(i)).filter(
|
|
217
218
|
(i) => [w.value.IMAGE, w.value.VIDEO].includes(i.type)
|
|
218
219
|
)
|
|
219
|
-
), E =
|
|
220
|
-
transform: `translate(${
|
|
220
|
+
), E = y(() => b.value[u.value]), j = y(() => ({
|
|
221
|
+
transform: `translate(${x.value}px, ${P.value}px) scale(${m.value})`,
|
|
221
222
|
transitionDuration: k.value ? "0s" : void 0
|
|
222
|
-
})),
|
|
223
|
+
})), R = y(() => u.value !== 0), Y = y(
|
|
223
224
|
() => u.value !== b.value.length - 1 && b.value.length
|
|
224
|
-
),
|
|
225
|
+
), U = y(
|
|
225
226
|
() => E.value && E.value.type === w.value.IMAGE
|
|
226
227
|
);
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}),
|
|
228
|
+
oe(u, () => {
|
|
229
|
+
W(), q();
|
|
230
|
+
}), se(() => {
|
|
230
231
|
n.defaultIndex >= 0 && n.defaultIndex < b.value.length && (u.value = n.defaultIndex);
|
|
231
|
-
}), oe(() => {
|
|
232
|
-
window.addEventListener("mousemove", F), window.addEventListener("mouseup", $);
|
|
233
232
|
}), ae(() => {
|
|
233
|
+
window.addEventListener("mousemove", F), window.addEventListener("mouseup", $);
|
|
234
|
+
}), re(() => {
|
|
234
235
|
window.removeEventListener("mousemove", F), window.removeEventListener("mouseup", $);
|
|
235
236
|
});
|
|
236
|
-
function
|
|
237
|
+
function G() {
|
|
237
238
|
u.value--;
|
|
238
239
|
}
|
|
239
240
|
function V() {
|
|
240
241
|
u.value++;
|
|
241
242
|
}
|
|
242
|
-
function M(i, e =
|
|
243
|
-
|
|
243
|
+
function M(i, e = a.value) {
|
|
244
|
+
U.value && (i ? m.value = Math.min(
|
|
244
245
|
m.value * e,
|
|
245
|
-
|
|
246
|
+
O.value
|
|
246
247
|
) : m.value = Math.max(
|
|
247
248
|
m.value / e,
|
|
248
|
-
|
|
249
|
+
S.value
|
|
249
250
|
));
|
|
250
251
|
}
|
|
251
|
-
function
|
|
252
|
+
function W() {
|
|
252
253
|
m.value = h.value;
|
|
253
254
|
}
|
|
254
|
-
function
|
|
255
|
-
|
|
255
|
+
function q() {
|
|
256
|
+
x.value = 0, P.value = 0;
|
|
257
|
+
}
|
|
258
|
+
function H(i) {
|
|
259
|
+
if (n.disableScale) return;
|
|
256
260
|
const e = i.wheelDelta > 0;
|
|
257
261
|
M(e, f.value);
|
|
258
262
|
}
|
|
259
|
-
function
|
|
260
|
-
n.
|
|
263
|
+
function J(i) {
|
|
264
|
+
n.disableDrag || (D.value = i.clientX, C.value = i.clientY, k.value = !0, i.stopPropagation(), i.preventDefault());
|
|
261
265
|
}
|
|
262
266
|
function F(i) {
|
|
263
|
-
k.value && (
|
|
267
|
+
k.value && (x.value = L.value + i.clientX - D.value, P.value = T.value + i.clientY - C.value);
|
|
264
268
|
}
|
|
265
269
|
function $() {
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
function H() {
|
|
269
|
-
ge(E.value.name), t.toast("复制成功");
|
|
270
|
-
}
|
|
271
|
-
function J() {
|
|
272
|
-
y.value = !0, t.toast("开启纯净模式,双击即可退出");
|
|
270
|
+
D.value = 0, C.value = 0, L.value = x.value, T.value = P.value, k.value = !1;
|
|
273
271
|
}
|
|
274
272
|
function K() {
|
|
275
|
-
|
|
273
|
+
be(E.value.name), t.toast("复制成功");
|
|
276
274
|
}
|
|
277
275
|
function Z() {
|
|
278
|
-
|
|
276
|
+
g.value = !0, t.toast("开启纯净模式,双击即可退出");
|
|
277
|
+
}
|
|
278
|
+
function Q() {
|
|
279
|
+
g.value && (g.value = !1, t.toast("退出纯净模式"));
|
|
280
|
+
}
|
|
281
|
+
function _() {
|
|
282
|
+
n.disableDownload || me(E.value.url, {
|
|
279
283
|
allowCrossOrigin: !0
|
|
280
284
|
});
|
|
281
285
|
}
|
|
282
|
-
function
|
|
286
|
+
function ee() {
|
|
283
287
|
t.destroy(l);
|
|
284
288
|
}
|
|
285
|
-
return (i, e) => (
|
|
286
|
-
class: "p-media-album",
|
|
287
|
-
onDblclick: e[10] || (e[10] = (r) =>
|
|
289
|
+
return (i, e) => (s(), o("div", {
|
|
290
|
+
class: X(["p-media-album", `is-skin-${n.skin}`]),
|
|
291
|
+
onDblclick: e[10] || (e[10] = (r) => Q())
|
|
288
292
|
}, [
|
|
289
|
-
|
|
293
|
+
d("div", {
|
|
290
294
|
class: "media",
|
|
291
|
-
onWheel: e[1] || (e[1] = (r) =>
|
|
295
|
+
onWheel: e[1] || (e[1] = (r) => H(r))
|
|
292
296
|
}, [
|
|
293
|
-
(
|
|
294
|
-
|
|
295
|
-
r.type === w.value.IMAGE ? (
|
|
296
|
-
|
|
297
|
+
(s(!0), o(N, null, ie(b.value, (r, z) => (s(), o(N, null, [
|
|
298
|
+
z === u.value ? (s(), o(N, { key: 0 }, [
|
|
299
|
+
r.type === w.value.IMAGE ? (s(), o("img", {
|
|
300
|
+
class: X({ "is-draggable": !n.disableDrag }),
|
|
301
|
+
key: `media-${z}-${r.url}`,
|
|
297
302
|
src: r.url,
|
|
298
|
-
style:
|
|
299
|
-
onMousedown: e[0] || (e[0] = (
|
|
303
|
+
style: ue(j.value),
|
|
304
|
+
onMousedown: e[0] || (e[0] = (te) => J(te)),
|
|
300
305
|
dragable: "false"
|
|
301
|
-
}, null,
|
|
302
|
-
r.type === w.value.VIDEO ? (
|
|
306
|
+
}, null, 46, he)) : v("", !0),
|
|
307
|
+
r.type === w.value.VIDEO ? (s(), o("video", {
|
|
303
308
|
key: 1,
|
|
304
309
|
poster: r.poster,
|
|
305
310
|
src: r.url,
|
|
@@ -307,80 +312,81 @@ const be = ["src"], he = ["poster", "src"], we = {
|
|
|
307
312
|
controlslist: "nodownload noremoteplayback noplaybackrate",
|
|
308
313
|
disablePictureInPicture: "",
|
|
309
314
|
disableRemotePlayback: ""
|
|
310
|
-
}, null, 8,
|
|
311
|
-
], 64)) :
|
|
315
|
+
}, null, 8, we)) : v("", !0)
|
|
316
|
+
], 64)) : v("", !0)
|
|
312
317
|
], 64))), 256))
|
|
313
318
|
], 32),
|
|
314
|
-
|
|
315
|
-
n.
|
|
316
|
-
|
|
317
|
-
|
|
319
|
+
g.value ? v("", !0) : (s(), o("div", Ee, [
|
|
320
|
+
n.disableCounter ? (s(), o("div", Ie)) : (s(), o("div", ke, [
|
|
321
|
+
d("span", xe, B(`${u.value + 1} `), 1),
|
|
322
|
+
e[11] || (e[11] = d("span", { class: "connect" }, "/", -1)),
|
|
323
|
+
d("span", Pe, B(b.value.length), 1)
|
|
318
324
|
])),
|
|
319
|
-
n.
|
|
325
|
+
n.disableName ? v("", !0) : (s(), o("div", {
|
|
320
326
|
key: 2,
|
|
321
327
|
class: "control name",
|
|
322
|
-
onClick: e[2] || (e[2] = (r) =>
|
|
328
|
+
onClick: e[2] || (e[2] = (r) => K())
|
|
323
329
|
}, B(E.value.name), 1)),
|
|
324
|
-
|
|
330
|
+
d("div", {
|
|
325
331
|
class: "control close",
|
|
326
|
-
onClick: e[3] || (e[3] = (r) =>
|
|
327
|
-
}, [...e[
|
|
328
|
-
|
|
332
|
+
onClick: e[3] || (e[3] = (r) => ee())
|
|
333
|
+
}, [...e[12] || (e[12] = [
|
|
334
|
+
d("i", { class: "iconfont-popup-plugin-preset album-close" }, null, -1)
|
|
329
335
|
])])
|
|
330
336
|
])),
|
|
331
|
-
|
|
332
|
-
|
|
337
|
+
g.value ? v("", !0) : (s(), o("div", Oe, [
|
|
338
|
+
R.value ? (s(), o("div", {
|
|
333
339
|
key: 0,
|
|
334
340
|
class: "control back",
|
|
335
|
-
onClick: e[4] || (e[4] = (r) =>
|
|
336
|
-
}, [...e[
|
|
337
|
-
|
|
338
|
-
])])) :
|
|
341
|
+
onClick: e[4] || (e[4] = (r) => G())
|
|
342
|
+
}, [...e[13] || (e[13] = [
|
|
343
|
+
d("i", { class: "iconfont-popup-plugin-preset album-prev" }, null, -1)
|
|
344
|
+
])])) : v("", !0)
|
|
339
345
|
])),
|
|
340
|
-
|
|
341
|
-
|
|
346
|
+
g.value ? v("", !0) : (s(), o("div", Se, [
|
|
347
|
+
Y.value ? (s(), o("div", {
|
|
342
348
|
key: 0,
|
|
343
349
|
class: "control next",
|
|
344
350
|
onClick: e[5] || (e[5] = (r) => V())
|
|
345
|
-
}, [...e[
|
|
346
|
-
|
|
347
|
-
])])) :
|
|
351
|
+
}, [...e[14] || (e[14] = [
|
|
352
|
+
d("i", { class: "iconfont-popup-plugin-preset album-next" }, null, -1)
|
|
353
|
+
])])) : v("", !0)
|
|
348
354
|
])),
|
|
349
|
-
|
|
350
|
-
n.
|
|
355
|
+
g.value ? v("", !0) : (s(), o("div", De, [
|
|
356
|
+
n.disablePure ? (s(), o("div", Ce)) : (s(), o("div", {
|
|
351
357
|
key: 0,
|
|
352
358
|
class: "control",
|
|
353
|
-
onClick: e[6] || (e[6] = (r) =>
|
|
354
|
-
}, [...e[
|
|
355
|
-
|
|
359
|
+
onClick: e[6] || (e[6] = (r) => Z())
|
|
360
|
+
}, [...e[15] || (e[15] = [
|
|
361
|
+
d("i", { class: "iconfont-popup-plugin-preset album-pure" }, null, -1)
|
|
356
362
|
])])),
|
|
357
|
-
|
|
358
|
-
!n.
|
|
363
|
+
d("div", Ue, [
|
|
364
|
+
!n.disableScale && U.value ? (s(), o("div", {
|
|
359
365
|
key: 0,
|
|
360
366
|
class: "control",
|
|
361
|
-
onClick: e[7] || (e[7] = (r) => M(!0,
|
|
362
|
-
}, [...e[
|
|
363
|
-
|
|
364
|
-
])])) :
|
|
365
|
-
!n.
|
|
367
|
+
onClick: e[7] || (e[7] = (r) => M(!0, a.value))
|
|
368
|
+
}, [...e[16] || (e[16] = [
|
|
369
|
+
d("i", { class: "iconfont-popup-plugin-preset album-enlarge" }, null, -1)
|
|
370
|
+
])])) : v("", !0),
|
|
371
|
+
!n.disableScale && U.value ? (s(), o("div", {
|
|
366
372
|
key: 1,
|
|
367
373
|
class: "control",
|
|
368
|
-
onClick: e[8] || (e[8] = (r) => M(!1,
|
|
369
|
-
}, [...e[
|
|
370
|
-
|
|
371
|
-
])])) :
|
|
374
|
+
onClick: e[8] || (e[8] = (r) => M(!1, a.value))
|
|
375
|
+
}, [...e[17] || (e[17] = [
|
|
376
|
+
d("i", { class: "iconfont-popup-plugin-preset album-narrow" }, null, -1)
|
|
377
|
+
])])) : v("", !0)
|
|
372
378
|
]),
|
|
373
|
-
n.
|
|
379
|
+
n.disableDownload ? (s(), o("div", Me)) : (s(), o("div", {
|
|
374
380
|
key: 2,
|
|
375
381
|
class: "control download",
|
|
376
|
-
onClick: e[9] || (e[9] = (r) =>
|
|
377
|
-
}, [...e[
|
|
378
|
-
|
|
382
|
+
onClick: e[9] || (e[9] = (r) => _())
|
|
383
|
+
}, [...e[18] || (e[18] = [
|
|
384
|
+
d("i", { class: "iconfont-popup-plugin-preset download" }, null, -1)
|
|
379
385
|
])]))
|
|
380
386
|
]))
|
|
381
|
-
],
|
|
387
|
+
], 34));
|
|
382
388
|
}
|
|
383
|
-
}),
|
|
389
|
+
}), Fe = /* @__PURE__ */ ve(Ne, [["__scopeId", "data-v-f011d0c2"]]);
|
|
384
390
|
export {
|
|
385
|
-
|
|
391
|
+
Fe as default
|
|
386
392
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as d, inject as c, createElementBlock as f, openBlock as m, normalizeClass as u, createVNode as o, withCtx as t, createElementVNode as P, toDisplayString as l, createTextVNode as C } from "vue";
|
|
2
|
+
import { usePopup as p, POPUP_COMPONENT_INJECTS as g } from "vue-popup-plus";
|
|
3
|
+
import { P as k, a as B, b as N } from "./PBody-Cotuzlbw.js";
|
|
4
|
+
import { P as x, a as b, b as h } from "./PButtonGroup-8zbI-6Gv.js";
|
|
5
|
+
import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const I = { class: "content" }, T = /* @__PURE__ */ d({
|
|
7
|
+
name: "PAlert",
|
|
8
|
+
__name: "PAlert",
|
|
9
|
+
props: {
|
|
10
|
+
skin: {},
|
|
11
|
+
title: {},
|
|
12
|
+
headerClose: { type: Boolean },
|
|
13
|
+
content: {},
|
|
14
|
+
confirmText: {},
|
|
15
|
+
draggable: { type: Boolean }
|
|
16
|
+
},
|
|
17
|
+
setup(e) {
|
|
18
|
+
const r = p(), s = c(g.INSTANCE_ID);
|
|
19
|
+
function a() {
|
|
20
|
+
r.destroy(s);
|
|
21
|
+
}
|
|
22
|
+
return (v, n) => (m(), f("div", {
|
|
23
|
+
class: u(["p-alert", `is-skin-${e.skin}`])
|
|
24
|
+
}, [
|
|
25
|
+
o(k, { skin: e.skin }, {
|
|
26
|
+
header: t(() => [
|
|
27
|
+
o(N, {
|
|
28
|
+
draggable: e.draggable,
|
|
29
|
+
hasCloseButton: e.headerClose,
|
|
30
|
+
title: e.title,
|
|
31
|
+
onClose: n[0] || (n[0] = (i) => a()),
|
|
32
|
+
iconClass: "alert"
|
|
33
|
+
}, null, 8, ["draggable", "hasCloseButton", "title"])
|
|
34
|
+
]),
|
|
35
|
+
footer: t(() => [
|
|
36
|
+
o(x, null, {
|
|
37
|
+
default: t(() => [
|
|
38
|
+
o(b, { align: "end" }, {
|
|
39
|
+
default: t(() => [
|
|
40
|
+
o(h, {
|
|
41
|
+
onClick: n[1] || (n[1] = (i) => a()),
|
|
42
|
+
theme: "primary"
|
|
43
|
+
}, {
|
|
44
|
+
default: t(() => [
|
|
45
|
+
C(l(e.confirmText), 1)
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
})
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
})
|
|
52
|
+
]),
|
|
53
|
+
_: 1
|
|
54
|
+
})
|
|
55
|
+
]),
|
|
56
|
+
default: t(() => [
|
|
57
|
+
o(B, { fitIcon: "" }, {
|
|
58
|
+
default: t(() => [
|
|
59
|
+
P("div", I, l(e.content), 1)
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
})
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["skin"])
|
|
66
|
+
], 2));
|
|
67
|
+
}
|
|
68
|
+
}), V = /* @__PURE__ */ y(T, [["__scopeId", "data-v-0c05cd49"]]);
|
|
69
|
+
export {
|
|
70
|
+
V as default
|
|
71
|
+
};
|