Skip to content

Commit faf3bd1

Browse files
committed
!306 fix(upload): cut属性失效
* fix(upload): cut状态失效 #I9J0MD
1 parent 7fb5f13 commit faf3bd1

File tree

1 file changed

+23
-21
lines changed
  • packages/component/src/component/upload

1 file changed

+23
-21
lines changed

packages/component/src/component/upload/index.vue

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -415,28 +415,30 @@ const uploadChange = (e: any) => {
415415
emit("on-change", _files);
416416
417417
// 裁剪 & 多选
418-
if (isCut.value && props.multiple) {
419-
console.warn(cannotSupportCutMsg.value);
420-
} else {
421-
for (let item of _files) {
422-
activeUploadFiles.value.push(item);
423-
filetoDataURL(item, function (res: any) {
424-
activeUploadFilesImgs.value.push(res);
425-
});
426-
}
427-
428-
innerCutVisible.value = true;
429-
setTimeout(() => {
430-
const _imgs: HTMLCollection =
431-
document.getElementsByClassName("_lay_upload_img");
432-
if (_imgs && _imgs.length > 0) {
433-
const _img: HTMLImageElement = _imgs[0] as HTMLImageElement;
434-
_cropper = new Cropper(_img, computedCutCropperOption.value);
435-
} else {
436-
clearAllCutEffect();
418+
if (isCut.value) {
419+
if (props.multiple) {
420+
console.warn(cannotSupportCutMsg.value);
421+
} else {
422+
for (let item of _files) {
423+
activeUploadFiles.value.push(item);
424+
filetoDataURL(item, function (res: any) {
425+
activeUploadFilesImgs.value.push(res);
426+
});
437427
}
438-
}, 200);
439-
return;
428+
429+
innerCutVisible.value = true;
430+
setTimeout(() => {
431+
const _imgs: HTMLCollection =
432+
document.getElementsByClassName("_lay_upload_img");
433+
if (_imgs && _imgs.length > 0) {
434+
const _img: HTMLImageElement = _imgs[0] as HTMLImageElement;
435+
_cropper = new Cropper(_img, computedCutCropperOption.value);
436+
} else {
437+
clearAllCutEffect();
438+
}
439+
}, 200);
440+
return;
441+
}
440442
}
441443
442444
// 关闭自动上传

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy