@v-c/trigger 0.0.12 → 0.0.14
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/Popup/Arrow.cjs +60 -89
- package/dist/Popup/Arrow.js +58 -88
- package/dist/Popup/Mask.cjs +53 -64
- package/dist/Popup/Mask.js +49 -63
- package/dist/Popup/PopupContent.cjs +22 -27
- package/dist/Popup/PopupContent.js +18 -26
- package/dist/Popup/index.cjs +312 -366
- package/dist/Popup/index.d.ts +1 -1
- package/dist/Popup/index.js +304 -362
- package/dist/UniqueProvider/UniqueContainer.cjs +133 -150
- package/dist/UniqueProvider/UniqueContainer.js +128 -148
- package/dist/UniqueProvider/index.cjs +151 -213
- package/dist/UniqueProvider/index.js +144 -210
- package/dist/UniqueProvider/useTargetState.cjs +39 -39
- package/dist/UniqueProvider/useTargetState.js +37 -39
- package/dist/_virtual/rolldown_runtime.cjs +21 -0
- package/dist/context.cjs +17 -28
- package/dist/context.js +17 -33
- package/dist/hooks/useAction.cjs +19 -25
- package/dist/hooks/useAction.js +17 -25
- package/dist/hooks/useAlign.cjs +396 -486
- package/dist/hooks/useAlign.js +391 -484
- package/dist/hooks/useDelay.cjs +21 -24
- package/dist/hooks/useDelay.js +20 -25
- package/dist/hooks/useOffsetStyle.cjs +34 -33
- package/dist/hooks/useOffsetStyle.js +32 -33
- package/dist/hooks/useWatch.cjs +38 -34
- package/dist/hooks/useWatch.js +36 -34
- package/dist/hooks/useWinClick.cjs +54 -64
- package/dist/hooks/useWinClick.js +51 -63
- package/dist/index.cjs +605 -694
- package/dist/index.d.ts +1 -1
- package/dist/index.js +593 -689
- package/dist/interface.cjs +0 -1
- package/dist/interface.js +0 -1
- package/dist/util.cjs +65 -82
- package/dist/util.js +66 -87
- package/package.json +4 -4
package/dist/Popup/Arrow.cjs
CHANGED
|
@@ -1,91 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const popupTB = popupPoints[0];
|
|
62
|
-
const popupLR = popupPoints[1];
|
|
63
|
-
const targetTB = targetPoints[0];
|
|
64
|
-
const targetLR = targetPoints[1];
|
|
65
|
-
if (popupTB === targetTB || !["t", "b"].includes(popupTB)) {
|
|
66
|
-
alignStyle.top = `${y}px`;
|
|
67
|
-
} else if (popupTB === "t") {
|
|
68
|
-
alignStyle.top = 0;
|
|
69
|
-
} else {
|
|
70
|
-
alignStyle.bottom = 0;
|
|
71
|
-
}
|
|
72
|
-
if (popupLR === targetLR || !["l", "r"].includes(popupLR)) {
|
|
73
|
-
alignStyle.left = `${x}px`;
|
|
74
|
-
} else if (popupLR === "l") {
|
|
75
|
-
alignStyle.left = 0;
|
|
76
|
-
} else {
|
|
77
|
-
alignStyle.right = 0;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return vue.createVNode("div", {
|
|
81
|
-
"ref": arrowRef,
|
|
82
|
-
"class": util.classNames(`${prefixCls}-arrow`, className),
|
|
83
|
-
"style": {
|
|
84
|
-
...alignStyle,
|
|
85
|
-
...style
|
|
86
|
-
}
|
|
87
|
-
}, [content]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
1
|
+
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
2
|
+
let vue = require("vue");
|
|
3
|
+
let __v_c_util = require("@v-c/util");
|
|
4
|
+
const Arrow = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
5
|
+
props: {
|
|
6
|
+
prefixCls: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
default: void 0
|
|
10
|
+
},
|
|
11
|
+
align: {
|
|
12
|
+
type: Object,
|
|
13
|
+
required: true,
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
arrow: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: true,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
arrowPos: {
|
|
22
|
+
type: Object,
|
|
23
|
+
required: true,
|
|
24
|
+
default: void 0
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
name: "Arrow",
|
|
28
|
+
setup(props, { expose }) {
|
|
29
|
+
const arrowRef = (0, vue.shallowRef)();
|
|
30
|
+
expose({ arrowRef });
|
|
31
|
+
return () => {
|
|
32
|
+
const { prefixCls, align, arrow, arrowPos } = props;
|
|
33
|
+
const { className, content, style } = arrow || {};
|
|
34
|
+
const { x = 0, y = 0 } = arrowPos;
|
|
35
|
+
if (!align || !align.points) return null;
|
|
36
|
+
const alignStyle = { position: "absolute" };
|
|
37
|
+
if (align.autoArrow !== false) {
|
|
38
|
+
const popupPoints = align.points[0];
|
|
39
|
+
const targetPoints = align.points[1];
|
|
40
|
+
const popupTB = popupPoints[0];
|
|
41
|
+
const popupLR = popupPoints[1];
|
|
42
|
+
const targetTB = targetPoints[0];
|
|
43
|
+
const targetLR = targetPoints[1];
|
|
44
|
+
if (popupTB === targetTB || !["t", "b"].includes(popupTB)) alignStyle.top = `${y}px`;
|
|
45
|
+
else if (popupTB === "t") alignStyle.top = 0;
|
|
46
|
+
else alignStyle.bottom = 0;
|
|
47
|
+
if (popupLR === targetLR || !["l", "r"].includes(popupLR)) alignStyle.left = `${x}px`;
|
|
48
|
+
else if (popupLR === "l") alignStyle.left = 0;
|
|
49
|
+
else alignStyle.right = 0;
|
|
50
|
+
}
|
|
51
|
+
return (0, vue.createVNode)("div", {
|
|
52
|
+
"ref": arrowRef,
|
|
53
|
+
"class": (0, __v_c_util.classNames)(`${prefixCls}-arrow`, className),
|
|
54
|
+
"style": {
|
|
55
|
+
...alignStyle,
|
|
56
|
+
...style
|
|
57
|
+
}
|
|
58
|
+
}, [content]);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
90
61
|
});
|
|
91
62
|
exports.Arrow = Arrow;
|
package/dist/Popup/Arrow.js
CHANGED
|
@@ -1,91 +1,61 @@
|
|
|
1
|
-
import { defineComponent, shallowRef
|
|
1
|
+
import { createVNode, defineComponent, shallowRef } from "vue";
|
|
2
2
|
import { classNames } from "@v-c/util";
|
|
3
3
|
const Arrow = /* @__PURE__ */ defineComponent({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const popupLR = popupPoints[1];
|
|
61
|
-
const targetTB = targetPoints[0];
|
|
62
|
-
const targetLR = targetPoints[1];
|
|
63
|
-
if (popupTB === targetTB || !["t", "b"].includes(popupTB)) {
|
|
64
|
-
alignStyle.top = `${y}px`;
|
|
65
|
-
} else if (popupTB === "t") {
|
|
66
|
-
alignStyle.top = 0;
|
|
67
|
-
} else {
|
|
68
|
-
alignStyle.bottom = 0;
|
|
69
|
-
}
|
|
70
|
-
if (popupLR === targetLR || !["l", "r"].includes(popupLR)) {
|
|
71
|
-
alignStyle.left = `${x}px`;
|
|
72
|
-
} else if (popupLR === "l") {
|
|
73
|
-
alignStyle.left = 0;
|
|
74
|
-
} else {
|
|
75
|
-
alignStyle.right = 0;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return createVNode("div", {
|
|
79
|
-
"ref": arrowRef,
|
|
80
|
-
"class": classNames(`${prefixCls}-arrow`, className),
|
|
81
|
-
"style": {
|
|
82
|
-
...alignStyle,
|
|
83
|
-
...style
|
|
84
|
-
}
|
|
85
|
-
}, [content]);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
4
|
+
props: {
|
|
5
|
+
prefixCls: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
default: void 0
|
|
9
|
+
},
|
|
10
|
+
align: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true,
|
|
13
|
+
default: void 0
|
|
14
|
+
},
|
|
15
|
+
arrow: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: true,
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
arrowPos: {
|
|
21
|
+
type: Object,
|
|
22
|
+
required: true,
|
|
23
|
+
default: void 0
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
name: "Arrow",
|
|
27
|
+
setup(props, { expose }) {
|
|
28
|
+
const arrowRef = shallowRef();
|
|
29
|
+
expose({ arrowRef });
|
|
30
|
+
return () => {
|
|
31
|
+
const { prefixCls, align, arrow, arrowPos } = props;
|
|
32
|
+
const { className, content, style } = arrow || {};
|
|
33
|
+
const { x = 0, y = 0 } = arrowPos;
|
|
34
|
+
if (!align || !align.points) return null;
|
|
35
|
+
const alignStyle = { position: "absolute" };
|
|
36
|
+
if (align.autoArrow !== false) {
|
|
37
|
+
const popupPoints = align.points[0];
|
|
38
|
+
const targetPoints = align.points[1];
|
|
39
|
+
const popupTB = popupPoints[0];
|
|
40
|
+
const popupLR = popupPoints[1];
|
|
41
|
+
const targetTB = targetPoints[0];
|
|
42
|
+
const targetLR = targetPoints[1];
|
|
43
|
+
if (popupTB === targetTB || !["t", "b"].includes(popupTB)) alignStyle.top = `${y}px`;
|
|
44
|
+
else if (popupTB === "t") alignStyle.top = 0;
|
|
45
|
+
else alignStyle.bottom = 0;
|
|
46
|
+
if (popupLR === targetLR || !["l", "r"].includes(popupLR)) alignStyle.left = `${x}px`;
|
|
47
|
+
else if (popupLR === "l") alignStyle.left = 0;
|
|
48
|
+
else alignStyle.right = 0;
|
|
49
|
+
}
|
|
50
|
+
return createVNode("div", {
|
|
51
|
+
"ref": arrowRef,
|
|
52
|
+
"class": classNames(`${prefixCls}-arrow`, className),
|
|
53
|
+
"style": {
|
|
54
|
+
...alignStyle,
|
|
55
|
+
...style
|
|
56
|
+
}
|
|
57
|
+
}, [content]);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
88
60
|
});
|
|
89
|
-
export {
|
|
90
|
-
Arrow
|
|
91
|
-
};
|
|
61
|
+
export { Arrow };
|
package/dist/Popup/Mask.cjs
CHANGED
|
@@ -1,66 +1,55 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
const transitionProps = transition.getTransitionProps(motion?.name, motion);
|
|
21
|
-
return vue.createVNode(vue.Transition, transitionProps, {
|
|
22
|
-
default: () => [open ? vue.createVNode("div", {
|
|
23
|
-
"style": {
|
|
24
|
-
zIndex
|
|
25
|
-
},
|
|
26
|
-
"class": [`${prefixCls}-mask`, mobile && `${prefixCls}-mask-mobile`, attrs.class]
|
|
27
|
-
}, null) : null]
|
|
28
|
-
});
|
|
29
|
-
};
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
|
+
let vue = require("vue");
|
|
4
|
+
let __v_c_util_dist_utils_transition = require("@v-c/util/dist/utils/transition");
|
|
5
|
+
var Mask = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs }) => {
|
|
6
|
+
return () => {
|
|
7
|
+
const { prefixCls, open, zIndex, mask, motion, mobile } = props;
|
|
8
|
+
if (!mask) return null;
|
|
9
|
+
return (0, vue.createVNode)(vue.Transition, (0, __v_c_util_dist_utils_transition.getTransitionProps)(motion?.name, motion), { default: () => [open ? (0, vue.createVNode)("div", {
|
|
10
|
+
"style": { zIndex },
|
|
11
|
+
"class": [
|
|
12
|
+
`${prefixCls}-mask`,
|
|
13
|
+
mobile && `${prefixCls}-mask-mobile`,
|
|
14
|
+
attrs.class
|
|
15
|
+
]
|
|
16
|
+
}, null) : null] });
|
|
17
|
+
};
|
|
30
18
|
}, {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
19
|
+
props: {
|
|
20
|
+
prefixCls: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: true,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
open: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
required: false,
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
30
|
+
zIndex: {
|
|
31
|
+
type: Number,
|
|
32
|
+
required: false,
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
35
|
+
mask: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
required: false,
|
|
38
|
+
default: void 0
|
|
39
|
+
},
|
|
40
|
+
motion: {
|
|
41
|
+
type: Object,
|
|
42
|
+
required: false,
|
|
43
|
+
default: void 0
|
|
44
|
+
},
|
|
45
|
+
mobile: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
required: false,
|
|
48
|
+
default: void 0
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
inheritAttrs: false,
|
|
52
|
+
name: "PopupMask"
|
|
65
53
|
});
|
|
66
|
-
|
|
54
|
+
var Mask_default = Mask;
|
|
55
|
+
exports.default = Mask_default;
|
package/dist/Popup/Mask.js
CHANGED
|
@@ -1,66 +1,52 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transition, createVNode, defineComponent } from "vue";
|
|
2
2
|
import { getTransitionProps } from "@v-c/util/dist/utils/transition";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
const transitionProps = getTransitionProps(motion?.name, motion);
|
|
19
|
-
return createVNode(Transition, transitionProps, {
|
|
20
|
-
default: () => [open ? createVNode("div", {
|
|
21
|
-
"style": {
|
|
22
|
-
zIndex
|
|
23
|
-
},
|
|
24
|
-
"class": [`${prefixCls}-mask`, mobile && `${prefixCls}-mask-mobile`, attrs.class]
|
|
25
|
-
}, null) : null]
|
|
26
|
-
});
|
|
27
|
-
};
|
|
3
|
+
var Mask_default = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
4
|
+
return () => {
|
|
5
|
+
const { prefixCls, open, zIndex, mask, motion, mobile } = props;
|
|
6
|
+
if (!mask) return null;
|
|
7
|
+
return createVNode(Transition, getTransitionProps(motion?.name, motion), { default: () => [open ? createVNode("div", {
|
|
8
|
+
"style": { zIndex },
|
|
9
|
+
"class": [
|
|
10
|
+
`${prefixCls}-mask`,
|
|
11
|
+
mobile && `${prefixCls}-mask-mobile`,
|
|
12
|
+
attrs.class
|
|
13
|
+
]
|
|
14
|
+
}, null) : null] });
|
|
15
|
+
};
|
|
28
16
|
}, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
17
|
+
props: {
|
|
18
|
+
prefixCls: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
open: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
required: false,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
zIndex: {
|
|
29
|
+
type: Number,
|
|
30
|
+
required: false,
|
|
31
|
+
default: void 0
|
|
32
|
+
},
|
|
33
|
+
mask: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
required: false,
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
motion: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: false,
|
|
41
|
+
default: void 0
|
|
42
|
+
},
|
|
43
|
+
mobile: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
required: false,
|
|
46
|
+
default: void 0
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
inheritAttrs: false,
|
|
50
|
+
name: "PopupMask"
|
|
63
51
|
});
|
|
64
|
-
export {
|
|
65
|
-
Mask as default
|
|
66
|
-
};
|
|
52
|
+
export { Mask_default as default };
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
cachedChildren.value = children;
|
|
16
|
-
}
|
|
17
|
-
return cachedChildren.value;
|
|
18
|
-
};
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
|
+
let vue = require("vue");
|
|
4
|
+
var PopupContent = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
|
|
5
|
+
const cachedChildren = (0, vue.shallowRef)();
|
|
6
|
+
return () => {
|
|
7
|
+
const children = slots?.default?.();
|
|
8
|
+
if (!props.cache) {
|
|
9
|
+
cachedChildren.value = children;
|
|
10
|
+
return children;
|
|
11
|
+
}
|
|
12
|
+
if (!cachedChildren.value) cachedChildren.value = children;
|
|
13
|
+
return cachedChildren.value;
|
|
14
|
+
};
|
|
19
15
|
}, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
name: "PopupContext"
|
|
16
|
+
props: { cache: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
required: false,
|
|
19
|
+
default: void 0
|
|
20
|
+
} },
|
|
21
|
+
name: "PopupContext"
|
|
28
22
|
});
|
|
29
|
-
|
|
23
|
+
var PopupContent_default = PopupContent;
|
|
24
|
+
exports.default = PopupContent_default;
|
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
import { defineComponent, shallowRef } from "vue";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
cachedChildren.value = children;
|
|
14
|
-
}
|
|
15
|
-
return cachedChildren.value;
|
|
16
|
-
};
|
|
2
|
+
var PopupContent_default = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
3
|
+
const cachedChildren = shallowRef();
|
|
4
|
+
return () => {
|
|
5
|
+
const children = slots?.default?.();
|
|
6
|
+
if (!props.cache) {
|
|
7
|
+
cachedChildren.value = children;
|
|
8
|
+
return children;
|
|
9
|
+
}
|
|
10
|
+
if (!cachedChildren.value) cachedChildren.value = children;
|
|
11
|
+
return cachedChildren.value;
|
|
12
|
+
};
|
|
17
13
|
}, {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
name: "PopupContext"
|
|
14
|
+
props: { cache: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
required: false,
|
|
17
|
+
default: void 0
|
|
18
|
+
} },
|
|
19
|
+
name: "PopupContext"
|
|
26
20
|
});
|
|
27
|
-
export {
|
|
28
|
-
PopupContent as default
|
|
29
|
-
};
|
|
21
|
+
export { PopupContent_default as default };
|