فهرست منبع

iterations和endTime
优化迭代

qinzhipeng_v 5 سال پیش
والد
کامیت
f50f8b8773
1فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 7 5
      src/views/projectManage/iteration/components/create.vue

+ 7 - 5
src/views/projectManage/iteration/components/create.vue

@@ -74,11 +74,13 @@ export default {
     iterations: {
       immediate: true,
       handler(iterations) {
-        if (iterations.endTime === '未设置') {
-          this.$set(this.iterations, 'endTime', '')
-        }
-        if (iterations.startTime === '未设置') {
-          this.$set(this.iterations, 'startTime', '')
+        if (iterations !== null) {
+          if (iterations.endTime === '未设置') {
+            this.$set(this.iterations, 'endTime', '')
+          }
+          if (iterations.startTime === '未设置') {
+            this.$set(this.iterations, 'startTime', '')
+          }
         }
         this.iteration = iterations === null ? {} : this.iterations
       }