Commit 3e559ba7 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化菜单弹窗

parent e103fc9d
......@@ -3,7 +3,6 @@
<a-modal
:title="formTitle"
:centered="true"
:destroyOnClose="true"
:getContainer="() => $refs.EditModal_box"
:visible="visible"
:confirmLoading="EditModalLoading"
......@@ -117,7 +116,7 @@
@change="handleChangeFile"
accept="image/jpeg,image/png"
>
<a-button type="primary" class="addclass" >
<a-button type="primary" class="addclass">
<a-icon type="upload" /> 选择文件
</a-button>
</a-upload>
......@@ -141,7 +140,9 @@
</a-form-model>
<template slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button type="primary" class="addclass" @click="Modal_Ok"
>确定</a-button
>
</template>
</a-modal>
</div>
......@@ -340,6 +341,7 @@ export default {
// 重置还原表单信息内容
this.$nextTick(() => {
this.$refs.compileInfoForm.resetFields();
this.fileList = [];
});
},
// 新增
......@@ -351,6 +353,7 @@ export default {
},
// 编辑
onEdit(row) {
setTimeout(() => {
this.compileInfoForm = { ...row };
this.fileList = [
{
......@@ -360,6 +363,7 @@ export default {
status: "done",
},
];
}, 10);
},
// 关闭弹窗
handleClose() {
......
......@@ -3,7 +3,7 @@
:width="modalInfo.width"
:visible="modalInfo.visible"
:title="modalInfo.title"
@cancel="modalInfo.visible = false"
@cancel="resetForm"
centered
destroyOnClose
>
......@@ -61,11 +61,10 @@
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="reset">重置</a-button>
<a-button @click="reset">重置</a-button>
<a-button type="primary" class="addclass" @click="Modal_Ok"
>确定</a-button
>
<a-button @click="resetForm">取消</a-button>
</template>
</a-modal>
</template>
......
......@@ -3,7 +3,7 @@
:width="modalInfo.width"
:visible="modalInfo.visible"
:title="modalInfo.title"
@cancel="modalInfo.visible = false"
@cancel="resetForm"
centered
destroyOnClose
>
......@@ -44,11 +44,10 @@
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="reset">重置</a-button>
<a-button @click="reset">重置</a-button>
<a-button type="primary" class="addclass" @click="Modal_Ok"
>确定</a-button
>
<a-button @click="resetForm">取消</a-button>
</template>
</a-modal>
</template>
......
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