From 6d5a9b68644735008e5fe5a70b2aa483ba3d9a7c Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 22 四月 2024 10:50:37 +0800
Subject: [PATCH] 库存调整模块 添加点击自身报错位置id的问题修改
---
src/views/productManage/product/IconCropper.vue | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/src/views/productManage/product/IconCropper.vue b/src/views/productManage/product/IconCropper.vue
index cc074b0..ee360dc 100644
--- a/src/views/productManage/product/IconCropper.vue
+++ b/src/views/productManage/product/IconCropper.vue
@@ -127,16 +127,30 @@
fileName: ""
}
},
- mounted() {
- console.log(this.imageUrl)
- if (!this.isView && this.imageUrl?.length > 0) {
- this.isPreview = true
- this.previewImg = this.imageUrl
- } else {
- this.isPreview = false
+ 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
+ } else {
+ this.isPreview = false
+ }
+ },
// 涓婁紶鎸夐挳 闄愬埗鍥剧墖澶у皬鍜岀被鍨�
handleChangeUpload(file, fileList) {
const isJPG = file.raw.type === "image/jpeg" || file.raw.type === "image/png"
--
Gitblit v1.8.0