Commit aac0e227 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化上传组件

parent 6ea454c9
...@@ -43,11 +43,7 @@ ...@@ -43,11 +43,7 @@
<el-image-viewer <el-image-viewer
v-if="preview" v-if="preview"
:appendToBody="false" :appendToBody="false"
:on-close=" :on-close="closePreview"
() => {
(preview = false), (filepaths = []);
}
"
:url-list="filepaths" :url-list="filepaths"
/> />
<!-- 视频预览 --> <!-- 视频预览 -->
...@@ -290,6 +286,10 @@ export default { ...@@ -290,6 +286,10 @@ export default {
document.body.removeChild(a); document.body.removeChild(a);
} }
}, },
closePreview() {
this.preview = false;
this.filepaths = [];
},
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment