zhangjie 7 달 전
부모
커밋
0aebafc9a3
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/modules/target/components/target-score/ModifyEndScore.vue

+ 5 - 1
src/modules/target/components/target-score/ModifyEndScore.vue

@@ -8,6 +8,7 @@
     :close-on-press-escape="false"
     append-to-body
     @open="visibleChange"
+    @close="closedHandle"
   >
     <el-form
       ref="modalFormComp"
@@ -109,7 +110,10 @@ export default {
   methods: {
     visibleChange() {
       this.modalForm = this.$objAssign(initModalForm, this.instance);
-      this.modalForm.scoreDetail = deepCopy(this.instance.scoreDetail);
+      this.modalForm.scoreDetail = deepCopy(this.instance.scoreDetail || []);
+    },
+    closedHandle() {
+      this.modalForm = { ...initModalForm };
     },
     cancel() {
       this.modalIsShow = false;