src/views/productManage/product/IconCropper.vue
@@ -127,8 +127,23 @@ fileName: "" } }, computed: { myIsView() { return this.isView } }, watch: { myIsView() { this.setImgMethods() } }, mounted() { console.log(this.imageUrl) this.setImgMethods() }, methods: { // 设置上传/更换图片显示方法 setImgMethods() { if (!this.isView && this.imageUrl?.length > 0) { this.isPreview = true this.previewImg = this.imageUrl @@ -136,7 +151,6 @@ this.isPreview = false } }, methods: { // 上传按钮 限制图片大小和类型 handleChangeUpload(file, fileList) { const isJPG = file.raw.type === "image/jpeg" || file.raw.type === "image/png"