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

perf: 优化菜单弹窗

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