From 03cfba0f636b42417070fc8caef44bcdd792a085 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期二, 07 五月 2024 17:34:37 +0800 Subject: [PATCH] 概述 出库模块 编辑的时候循环处理对应产品调用接口获取在库数量的逻辑处理 --- 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