prlg-ui 1.8.96 → 1.8.98
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/dist/eventBus.util-K9Yq6hZm.cjs +1 -0
- package/dist/{eventBus.util-DqT24MxP.js → eventBus.util-msbJpg6N.js} +24 -24
- package/dist/index.d.ts +2 -2
- package/dist/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +1348 -1350
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.es.js +1 -1
- package/dist/utils/useBodyScroll.util.ts +10 -4
- package/package.json +1 -1
- package/dist/eventBus.util-DHau4P1p.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("vue");let r=null,s=0;function c(){const o=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${o}px`,()=>{document.body.style.position="",document.body.style.top="",window.scrollTo(0,o)}}const d=()=>{s++,s===1&&!r&&(r=c())},u=()=>{s>0&&s--,s===0&&r&&(r(),r=null)},i=()=>({unlockScroll:u,lockScroll:d}),p=["data-layer"],f=l.defineComponent({__name:"Portal",props:{overlayType:{default:"modal"},teleport:{type:Boolean,default:!0},target:{default:"body"},zIndex:{},show:{type:Boolean,default:!0},parentId:{}},setup(o){const t=o,n=l.computed(()=>{if(t.zIndex)return t.zIndex});return(e,a)=>e.show?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:e.target,disabled:!e.teleport},[l.createElementVNode("div",{style:l.normalizeStyle({zIndex:n.value,position:"relative",isolation:"isolate"}),"data-layer":e.overlayType},[l.renderSlot(e.$slots,"default")],12,p)],8,["to","disabled"])):l.createCommentVNode("",!0)}});function y(){const o=new Map;return{on(t,n){const e=o.get(t)||[];e.push(n),o.set(t,e)},off(t,n){const e=o.get(t);e&&o.set(t,e.filter(a=>a!==n))},emit(t,n){const e=o.get(t);e&&e.forEach(a=>a(n))},clear(){o.clear()}}}exports.EventBus=y;exports._sfc_main=f;exports.useBodyScroll=i;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
let n = null;
|
|
3
|
-
function
|
|
1
|
+
import { defineComponent as a, computed as d, createBlock as c, createCommentVNode as i, openBlock as u, Teleport as p, createElementVNode as f, normalizeStyle as y, renderSlot as m } from "vue";
|
|
2
|
+
let n = null, r = 0;
|
|
3
|
+
function S() {
|
|
4
4
|
const o = window.scrollY;
|
|
5
5
|
return document.body.style.position = "fixed", document.body.style.top = `-${o}px`, () => {
|
|
6
6
|
document.body.style.position = "", document.body.style.top = "", window.scrollTo(0, o);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
n
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
unlockScroll:
|
|
15
|
-
lockScroll:
|
|
16
|
-
}),
|
|
9
|
+
const h = () => {
|
|
10
|
+
r++, r === 1 && !n && (n = S());
|
|
11
|
+
}, b = () => {
|
|
12
|
+
r > 0 && r--, r === 0 && n && (n(), n = null);
|
|
13
|
+
}, k = () => ({
|
|
14
|
+
unlockScroll: b,
|
|
15
|
+
lockScroll: h
|
|
16
|
+
}), v = ["data-layer"], B = /* @__PURE__ */ a({
|
|
17
17
|
__name: "Portal",
|
|
18
18
|
props: {
|
|
19
19
|
overlayType: { default: "modal" },
|
|
@@ -24,28 +24,28 @@ const S = () => {
|
|
|
24
24
|
parentId: {}
|
|
25
25
|
},
|
|
26
26
|
setup(o) {
|
|
27
|
-
const t = o, l =
|
|
27
|
+
const t = o, l = d(() => {
|
|
28
28
|
if (t.zIndex) return t.zIndex;
|
|
29
29
|
});
|
|
30
|
-
return (e,
|
|
30
|
+
return (e, s) => e.show ? (u(), c(p, {
|
|
31
31
|
key: 0,
|
|
32
32
|
to: e.target,
|
|
33
33
|
disabled: !e.teleport
|
|
34
34
|
}, [
|
|
35
|
-
|
|
36
|
-
style:
|
|
35
|
+
f("div", {
|
|
36
|
+
style: y({
|
|
37
37
|
zIndex: l.value,
|
|
38
38
|
position: "relative",
|
|
39
39
|
isolation: "isolate"
|
|
40
40
|
}),
|
|
41
41
|
"data-layer": e.overlayType
|
|
42
42
|
}, [
|
|
43
|
-
|
|
44
|
-
], 12,
|
|
45
|
-
], 8, ["to", "disabled"])) :
|
|
43
|
+
m(e.$slots, "default")
|
|
44
|
+
], 12, v)
|
|
45
|
+
], 8, ["to", "disabled"])) : i("", !0);
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
function
|
|
48
|
+
function I() {
|
|
49
49
|
const o = /* @__PURE__ */ new Map();
|
|
50
50
|
return {
|
|
51
51
|
on(t, l) {
|
|
@@ -56,12 +56,12 @@ function B() {
|
|
|
56
56
|
const e = o.get(t);
|
|
57
57
|
e && o.set(
|
|
58
58
|
t,
|
|
59
|
-
e.filter((
|
|
59
|
+
e.filter((s) => s !== l)
|
|
60
60
|
);
|
|
61
61
|
},
|
|
62
62
|
emit(t, l) {
|
|
63
63
|
const e = o.get(t);
|
|
64
|
-
e && e.forEach((
|
|
64
|
+
e && e.forEach((s) => s(l));
|
|
65
65
|
},
|
|
66
66
|
clear() {
|
|
67
67
|
o.clear();
|
|
@@ -69,7 +69,7 @@ function B() {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
I as E,
|
|
73
|
+
B as _,
|
|
74
|
+
k as u
|
|
75
75
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -502,8 +502,8 @@ declare type __VLS_Props_8 = {
|
|
|
502
502
|
declare type __VLS_Props_9 = Props;
|
|
503
503
|
|
|
504
504
|
declare type __VLS_PublicProps = {
|
|
505
|
-
|
|
506
|
-
|
|
505
|
+
"currentPage"?: number;
|
|
506
|
+
"perPage"?: number;
|
|
507
507
|
} & __VLS_Props_2;
|
|
508
508
|
|
|
509
509
|
declare type __VLS_PublicProps_10 = {
|