From 22cc58da618739bda45f31c8d5db363ec9dc0456 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 17 四月 2024 13:53:49 +0800
Subject: [PATCH] 产品模块 产品类型,产品类别 2项增加删除+
---
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