Commit 92cc440b authored by chenqikuai's avatar chenqikuai

fix: 版本管理modal关闭时resetFields

parent 5b46751c
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
:total="resData.total" :total="resData.total"
@change="handlePageChange" @change="handlePageChange"
/> />
<Modal v-model="show" :title="modalTitle" :footer="null"> <Modal v-model="show" :title="modalTitle" :footer="null" :after-close="afterClose">
<form-model <form-model
ref="formModel" ref="formModel"
:model="form" :model="form"
...@@ -152,6 +152,10 @@ export default Vue.extend({ ...@@ -152,6 +152,10 @@ export default Vue.extend({
this.fetchList(); this.fetchList();
}, },
methods: { methods: {
afterClose(){
const formModel = this.$refs.formModel as FormModel;
formModel.resetFields();
},
fetchList() { fetchList() {
this.$store.dispatch("VersionControl/fetchList"); this.$store.dispatch("VersionControl/fetchList");
}, },
...@@ -236,8 +240,6 @@ export default Vue.extend({ ...@@ -236,8 +240,6 @@ export default Vue.extend({
this.save({ this.save({
modalShow: false, modalShow: false,
}); });
const formModel = this.$refs.formModel as FormModel;
formModel.resetFields();
}, },
handleConfirm() { handleConfirm() {
const formModel = this.$refs.formModel as FormModel; const formModel = this.$refs.formModel as FormModel;
...@@ -258,7 +260,6 @@ export default Vue.extend({ ...@@ -258,7 +260,6 @@ export default Vue.extend({
else if (this.modalMode === eModalMode.edit) else if (this.modalMode === eModalMode.edit)
message.success("修改成功"); message.success("修改成功");
this.show = false; this.show = false;
formModel.resetFields();
this.fetchList(); this.fetchList();
} else { } else {
message.error(ret); message.error(ret);
......
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