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 ADDED
@@ -0,0 +1,86 @@
1
+ # Vue Popup Plus 🚀
2
+
3
+ 一个功能强大、灵活易用的 Vue 3 弹窗组件库,让弹窗管理变得简单而优雅。
4
+
5
+ [![Vue 3](https://img.shields.io/badge/Vue-3.x-brightgreen.svg)](https://vuejs.org/)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue.svg)](https://www.typescriptlang.org/)
7
+ [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+ [![Version](https://img.shields.io/badge/version-1.0.0-orange.svg)](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 ee, inject as te, ref as c, computed as g, watch as ne, onBeforeMount as le, onMounted as oe, onBeforeUnmount as ae, createElementBlock as o, openBlock as a, createElementVNode as v, createCommentVNode as d, Fragment as T, renderList as se, normalizeStyle as re, createTextVNode as ie, toDisplayString as B } from "vue";
2
- import { usePopup as ue, POPUP_COMPONENT_INJECTS as ce } from "vue-popup-plus";
3
- import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- function ve(n) {
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 pe(n, {
8
+ function me(n, {
9
9
  allowCrossOrigin: t = !1,
10
- fileName: l = fe(n),
10
+ fileName: l = ge(n),
11
11
  headers: u = {},
12
12
  onSuccess: h = () => {
13
13
  }
14
14
  } = {}) {
15
15
  try {
16
- me(n) ? D() : t ? I() : window.open(n);
17
- } catch (s) {
18
- console.error(`free download error:
19
- `, s);
16
+ fe(n) ? O() : t ? S() : window.open(n);
17
+ } catch (a) {
18
+ console.error(`download error:
19
+ `, a);
20
20
  }
21
- function D() {
22
- const s = document.createElement("a");
23
- s.setAttribute("download", l), s.href = n, s.click(), h(l);
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 I() {
26
- let s;
25
+ function S() {
26
+ let a;
27
27
  try {
28
- s = new XMLHttpRequest();
28
+ a = new XMLHttpRequest();
29
29
  } catch {
30
30
  throw new Error("当前浏览器不支持XMLHttpRequest,无法下载");
31
31
  }
32
- s.open("GET", n, !0), s.responseType = "blob";
32
+ a.open("GET", n, !0), a.responseType = "blob";
33
33
  for (const f in u)
34
- Object.hasOwnProperty.call(u, f) && s.setRequestHeader(f, u[f]);
35
- s.onload = function() {
36
- if (s.status === 200) {
37
- const f = window.URL.createObjectURL(s.response), m = document.createElement("a");
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
- s.send();
42
+ a.send();
43
43
  } catch {
44
44
  return;
45
45
  }
46
46
  }
47
47
  }
48
- function me(n) {
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 fe(n) {
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 ge(n, t = !0) {
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
- }, z = /* @__PURE__ */ new Map([
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 x {
100
+ class I {
101
101
  // 文件类型
102
102
  static FILE_TYPES = p;
103
103
  // 文件类型后缀映射
104
- static FILE_TYPE_SUFFIX_MAP = z;
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 z)
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 x) return t;
130
- switch (ve(t)) {
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 be = ["src"], he = ["poster", "src"], we = {
177
+ const he = ["src"], we = ["poster", "src"], Ee = {
178
178
  key: 0,
179
179
  class: "tools top"
180
- }, Ee = {
180
+ }, ke = {
181
181
  key: 0,
182
182
  class: "info count"
183
- }, ke = { class: "current" }, xe = {
183
+ }, xe = { class: "number current" }, Pe = { class: "number" }, Ie = {
184
184
  key: 1,
185
185
  class: "emyty"
186
- }, De = {
186
+ }, Oe = {
187
187
  key: 1,
188
188
  class: "tools left"
189
- }, Ie = {
189
+ }, Se = {
190
190
  key: 2,
191
191
  class: "tools right"
192
- }, Oe = {
192
+ }, De = {
193
193
  key: 3,
194
194
  class: "tools bottom"
195
- }, Pe = {
195
+ }, Ce = {
196
196
  key: 1,
197
197
  class: "emyty"
198
- }, Se = { class: "center" }, Ue = {
198
+ }, Ue = { class: "center" }, Me = {
199
199
  key: 3,
200
200
  class: "emyty"
201
- }, Ce = /* @__PURE__ */ ee({
201
+ }, Ne = /* @__PURE__ */ ne({
202
202
  name: "PAlbum",
203
203
  __name: "PAlbum",
204
204
  props: {
205
+ skin: {},
205
206
  sources: {},
206
207
  defaultIndex: {},
207
- countDisabled: { type: Boolean },
208
- nameDisabled: { type: Boolean },
209
- downloadDisabled: { type: Boolean },
210
- pureDisabled: { type: Boolean },
211
- scaleDisabled: { type: Boolean },
212
- dragDisabled: { type: Boolean }
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 = ue(), l = te(ce.INSTANCE_ID), u = c(n.defaultIndex), h = c(1), D = c(30), I = c(0.01), s = c(3), f = c(1.5), m = c(h.value), k = c(!1), O = c(0), P = c(0), L = c(0), N = c(0), S = c(0), U = c(0), y = c(!1), w = g(() => x.FILE_TYPES), b = g(
216
- () => n.sources.map((i) => new x(i)).filter(
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 = g(() => b.value[u.value]), A = g(() => ({
220
- transform: `translate(${S.value}px, ${U.value}px) scale(${m.value})`,
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
- })), j = g(() => u.value !== 0), R = g(
223
+ })), R = y(() => u.value !== 0), Y = y(
223
224
  () => u.value !== b.value.length - 1 && b.value.length
224
- ), C = g(
225
+ ), U = y(
225
226
  () => E.value && E.value.type === w.value.IMAGE
226
227
  );
227
- ne(u, () => {
228
- G();
229
- }), le(() => {
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 Y() {
237
+ function G() {
237
238
  u.value--;
238
239
  }
239
240
  function V() {
240
241
  u.value++;
241
242
  }
242
- function M(i, e = s.value) {
243
- C.value && (i ? m.value = Math.min(
243
+ function M(i, e = a.value) {
244
+ U.value && (i ? m.value = Math.min(
244
245
  m.value * e,
245
- D.value
246
+ O.value
246
247
  ) : m.value = Math.max(
247
248
  m.value / e,
248
- I.value
249
+ S.value
249
250
  ));
250
251
  }
251
- function G() {
252
+ function W() {
252
253
  m.value = h.value;
253
254
  }
254
- function W(i) {
255
- if (n.scaleDisabled) return;
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 q(i) {
260
- n.dragDisabled || (O.value = i.clientX, P.value = i.clientY, k.value = !0, i.stopPropagation(), i.preventDefault());
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 && (S.value = L.value + i.clientX - O.value, U.value = N.value + i.clientY - P.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
- O.value = 0, P.value = 0, L.value = S.value, N.value = U.value, k.value = !1;
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
- y.value && (y.value = !1, t.toast("退出纯净模式"));
273
+ be(E.value.name), t.toast("复制成功");
276
274
  }
277
275
  function Z() {
278
- n.downloadDisabled || pe(E.value.url, {
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 Q() {
286
+ function ee() {
283
287
  t.destroy(l);
284
288
  }
285
- return (i, e) => (a(), o("div", {
286
- class: "p-media-album",
287
- onDblclick: e[10] || (e[10] = (r) => K())
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
- v("div", {
293
+ d("div", {
290
294
  class: "media",
291
- onWheel: e[1] || (e[1] = (r) => W(r))
295
+ onWheel: e[1] || (e[1] = (r) => H(r))
292
296
  }, [
293
- (a(!0), o(T, null, se(b.value, (r, X) => (a(), o(T, null, [
294
- X === u.value ? (a(), o(T, { key: 0 }, [
295
- r.type === w.value.IMAGE ? (a(), o("img", {
296
- key: `media-${X}-${r.url}`,
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: re(A.value),
299
- onMousedown: e[0] || (e[0] = (_) => q(_)),
303
+ style: ue(j.value),
304
+ onMousedown: e[0] || (e[0] = (te) => J(te)),
300
305
  dragable: "false"
301
- }, null, 44, be)) : d("", !0),
302
- r.type === w.value.VIDEO ? (a(), o("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, he)) : d("", !0)
311
- ], 64)) : d("", !0)
315
+ }, null, 8, we)) : v("", !0)
316
+ ], 64)) : v("", !0)
312
317
  ], 64))), 256))
313
318
  ], 32),
314
- y.value ? d("", !0) : (a(), o("div", we, [
315
- n.countDisabled ? (a(), o("div", xe)) : (a(), o("div", Ee, [
316
- v("span", ke, B(`${u.value + 1} `), 1),
317
- ie("/ " + B(b.value.length), 1)
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.nameDisabled ? d("", !0) : (a(), o("div", {
325
+ n.disableName ? v("", !0) : (s(), o("div", {
320
326
  key: 2,
321
327
  class: "control name",
322
- onClick: e[2] || (e[2] = (r) => H())
328
+ onClick: e[2] || (e[2] = (r) => K())
323
329
  }, B(E.value.name), 1)),
324
- v("div", {
330
+ d("div", {
325
331
  class: "control close",
326
- onClick: e[3] || (e[3] = (r) => Q())
327
- }, [...e[11] || (e[11] = [
328
- v("i", { class: "iconfont-popup-plugin-preset album-close" }, null, -1)
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
- y.value ? d("", !0) : (a(), o("div", De, [
332
- j.value ? (a(), o("div", {
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) => Y())
336
- }, [...e[12] || (e[12] = [
337
- v("i", { class: "iconfont-popup-plugin-preset album-prev" }, null, -1)
338
- ])])) : d("", !0)
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
- y.value ? d("", !0) : (a(), o("div", Ie, [
341
- R.value ? (a(), o("div", {
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[13] || (e[13] = [
346
- v("i", { class: "iconfont-popup-plugin-preset album-next" }, null, -1)
347
- ])])) : d("", !0)
351
+ }, [...e[14] || (e[14] = [
352
+ d("i", { class: "iconfont-popup-plugin-preset album-next" }, null, -1)
353
+ ])])) : v("", !0)
348
354
  ])),
349
- y.value ? d("", !0) : (a(), o("div", Oe, [
350
- n.pureDisabled ? (a(), o("div", Pe)) : (a(), o("div", {
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) => J())
354
- }, [...e[14] || (e[14] = [
355
- v("i", { class: "iconfont-popup-plugin-preset album-pure" }, null, -1)
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
- v("div", Se, [
358
- !n.scaleDisabled && C.value ? (a(), o("div", {
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, s.value))
362
- }, [...e[15] || (e[15] = [
363
- v("i", { class: "iconfont-popup-plugin-preset album-enlarge" }, null, -1)
364
- ])])) : d("", !0),
365
- !n.scaleDisabled && C.value ? (a(), o("div", {
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, s.value))
369
- }, [...e[16] || (e[16] = [
370
- v("i", { class: "iconfont-popup-plugin-preset album-narrow" }, null, -1)
371
- ])])) : d("", !0)
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.downloadDisabled ? (a(), o("div", Ue)) : (a(), o("div", {
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) => Z())
377
- }, [...e[17] || (e[17] = [
378
- v("i", { class: "iconfont-popup-plugin-preset download" }, null, -1)
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
- ], 32));
387
+ ], 34));
382
388
  }
383
- }), Le = /* @__PURE__ */ de(Ce, [["__scopeId", "data-v-9ef9f86f"]]);
389
+ }), Fe = /* @__PURE__ */ ve(Ne, [["__scopeId", "data-v-f011d0c2"]]);
384
390
  export {
385
- Le as default
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
+ };