fix(ImagePreview): 修复图片显示异常 (#8060)

This commit is contained in:
desperado 2021-02-02 19:44:02 +08:00 committed by GitHub
parent 9a7556cc30
commit 1644fc1338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,6 +81,9 @@ export default createComponent({
const resize = () => {
if (swipeRef.value) {
const { startPosition } = props;
swipeRef.value.state.active = +startPosition;
swipeRef.value.resize();
const rect = swipeRef.value.$el.getBoundingClientRect();
state.rootWidth = rect.width;
state.rootHeight = rect.height;