@v-c/image 1.0.5-beta.1 → 1.0.6
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/Preview/index.js +5 -5
- package/package.json +2 -2
package/dist/Preview/index.js
CHANGED
|
@@ -91,9 +91,9 @@ var Preview_default = /* @__PURE__ */ defineComponent((props, { attrs, slots })
|
|
|
91
91
|
window.removeEventListener("keydown", onKeyDown);
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
|
-
const
|
|
94
|
+
const animatedVisible = shallowRef(props?.open ?? false);
|
|
95
95
|
watch(() => props.open, (open) => {
|
|
96
|
-
if (open)
|
|
96
|
+
if (open) animatedVisible.value = true;
|
|
97
97
|
});
|
|
98
98
|
const portalRender = shallowRef(props?.open ?? false);
|
|
99
99
|
watch(() => props.open, (open) => {
|
|
@@ -101,7 +101,7 @@ var Preview_default = /* @__PURE__ */ defineComponent((props, { attrs, slots })
|
|
|
101
101
|
});
|
|
102
102
|
const onVisibleChanged = (nextVisible) => {
|
|
103
103
|
if (!nextVisible) {
|
|
104
|
-
|
|
104
|
+
animatedVisible.value = false;
|
|
105
105
|
portalRender.value = false;
|
|
106
106
|
}
|
|
107
107
|
props.afterOpenChange?.(nextVisible);
|
|
@@ -153,9 +153,9 @@ var Preview_default = /* @__PURE__ */ defineComponent((props, { attrs, slots })
|
|
|
153
153
|
const mergedRootCls = clsx(prefixCls, rootClassName, classNames.root, { [`${prefixCls}-moving`]: isMoving.value });
|
|
154
154
|
const transitionProps = getTransitionProps(motionName);
|
|
155
155
|
return createVNode(src_default, {
|
|
156
|
-
"open": portalRender.value,
|
|
156
|
+
"open": open || animatedVisible.value || portalRender.value,
|
|
157
157
|
"getContainer": getContainer,
|
|
158
|
-
"autoLock":
|
|
158
|
+
"autoLock": open || animatedVisible.value
|
|
159
159
|
}, { default: () => [createVNode(Transition, mergeProps(transitionProps, {
|
|
160
160
|
"onAfterEnter": () => onVisibleChanged(true),
|
|
161
161
|
"onAfterLeave": () => onVisibleChanged(false)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"description": "image component",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"vue": "^3.0.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@v-c/portal": "^1.0.8
|
|
35
|
+
"@v-c/portal": "^1.0.8",
|
|
36
36
|
"@v-c/util": "^1.0.18"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|