From 452e7fb4ea242b0d7bb821abc0cb3bf465129ffd Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期一, 22 七月 2024 17:40:05 +0800 Subject: [PATCH] 测试完成 --- src/components/Regular/index.vue | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/Regular/index.vue b/src/components/Regular/index.vue index 091e957..4aa1773 100644 --- a/src/components/Regular/index.vue +++ b/src/components/Regular/index.vue @@ -66,7 +66,7 @@ </el-input> </el-form-item ></el-col> </el-row> - <el-form-item label="鍏抽敭瀛�(鍚�)" prop="desc"> + <el-form-item label="鍏抽敭瀛�(鍚�)" prop="desc" v-if="hasValue"> <div class="xinz-inf"> <el-tag :key="crux" @@ -108,7 +108,7 @@ > </div> </el-form-item> - <el-form-item label="鍏抽敭瀛�(闈�)" prop="desc"> + <el-form-item label="鍏抽敭瀛�(闈�)" prop="desc" v-if="hasValue"> <div class="xinz-inf"> <el-tag :key="crux" @@ -179,7 +179,6 @@ class="upload-demo" style="display: flex" action="https://jsonplaceholder.typicode.com/posts/" - :on-change="handleChange" :file-list="fileList" :limit="1" :on-exceed="handleExceed" @@ -268,6 +267,10 @@ type: Boolean, default: true, }, + hasValue: { + type: Boolean, + default: true, + }, }, created() { @@ -314,9 +317,9 @@ this.handleSelectionChange(); }, // 鎺у埗鏂囦欢 - handleChange(file, fileList) { - this.fileList = fileList.slice(-3); - }, + // handleChange(file, fileList) { + // this.fileList = fileList.slice(-3); + // }, // 鏂囦欢瓒呭嚭涓暟闄愬埗鏃剁殑閽╁瓙 handleExceed(files, fileList) { this.$message.warning( @@ -392,8 +395,11 @@ }, // 閫夐」鏂囦欢涓婁紶 handleChange(item, response, file, fileList) { + console.log(response, "response"); + console.log(item, "item"); + console.log(this.TargetoptionList, "this.TargetoptionList"); let index = this.TargetoptionList.findIndex( - (obj) => obj.id == item.id && obj.name == item.name + (obj) => obj.guid == item.guid && obj.name == item.name ); this.TargetoptionList[index].picturePath = response.url; }, -- Gitblit v1.9.3