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

perf: 优化

parent 1b11ea55
...@@ -49,7 +49,9 @@ ...@@ -49,7 +49,9 @@
<el-form-item label="背景图片" prop="bigPath"> <el-form-item label="背景图片" prop="bigPath">
<YUpload <YUpload
accept=".png,.gif,.jpeg,.jpg" accept=".png,.gif,.jpeg,.jpg"
:limit="1"
list-type="picture-card" list-type="picture-card"
:fileList="bigPathList"
v-model="form.bigPath" v-model="form.bigPath"
></YUpload> ></YUpload>
</el-form-item> </el-form-item>
...@@ -129,6 +131,7 @@ export default { ...@@ -129,6 +131,7 @@ export default {
loading: false, loading: false,
inputVisible: false, inputVisible: false,
inputValue: "", inputValue: "",
bigPathList: [],
form: { form: {
areaName: "", areaName: "",
areaCode: "", areaCode: "",
...@@ -206,16 +209,24 @@ export default { ...@@ -206,16 +209,24 @@ export default {
} else { } else {
this.form.tag = []; this.form.tag = [];
} }
if (this.form.bigPath) {
this.bigPathList = [
{
name: this.form.bigPath,
url: this.form.bigPath,
},
];
}
}, 10); }, 10);
}, },
// 重置 // 重置
handleRest() { handleRest() {
this.fileList = []; this.bigPathList = [];
this.$resetForm("form"); this.$resetForm("form");
}, },
// 关闭 // 关闭
handleClose() { handleClose() {
this.fileList = []; this.bigPathList = [];
this.$resetForm("form"); this.$resetForm("form");
this.Visible = false; this.Visible = false;
}, },
......
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