Kaynağa Gözat

初始化数组

wangziqian 4 yıl önce
ebeveyn
işleme
ac27f4640d

+ 7 - 0
src/views/projectManage/projectList/components/modifySchedule.vue

@@ -53,6 +53,7 @@
             style="width: calc(100% - 105px)"
             :disabled="disabled"
             @change="tasksChange"
+            @visible-change="initList"
           >
             <!-- 任务名称搜索 -->
             <template v-if="selectBy==='task'">
@@ -420,6 +421,12 @@ export default {
       }
       this.loading = false
     },
+    initList(e) { // 初始化数组
+      if (!e) {
+        this.tasksOptions = []
+        this.tasksByOptions = []
+      }
+    },
     hiddenGroup(id) { // 隐藏需求选择组
       const index = this.hiddenList.findIndex(item => item === id)
       if (index > -1) {