笔记bug修改

This commit is contained in:
zhaofang
2022-09-29 17:55:03 +08:00
parent 501e850540
commit ab60318efd
2 changed files with 19 additions and 6 deletions

View File

@@ -24,6 +24,7 @@
</div>
</el-upload> -->
<el-upload
ref="myUpload"
class="upload-demo"
drag
:multiple="limit>1"
@@ -43,7 +44,7 @@
</el-upload>
<!-- 文件列表 -->
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<!-- <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in list">
<el-link :href="file.url" :underline="false" target="_blank">
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
@@ -52,7 +53,7 @@
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
</div>
</li>
</transition-group>
</transition-group> -->
</div>
</template>
@@ -105,6 +106,10 @@
type: Boolean,
default: false
},
isClear:{
type: Boolean,
default: false
}
},
data() {
return {
@@ -119,6 +124,13 @@
}
};
},
watch: {
isClear(val) {
if(!val) {
this.clearFiles();
}
}
},
computed: {
// 是否显示提示
showTip() {
@@ -145,8 +157,10 @@
},
},
methods: {
clearFiles() {
this.$refs["myUpload"].clearFiles();
},
handleUploadRemove(file) {
console.log(file,'file');
this.$emit("remove",file);
},
// 上传前校检格式和大小
@@ -220,7 +234,6 @@
}
},
created() {
this.fileList = this.list;
},
};