Explorar o código

iterations和endTime
优化迭代

qinzhipeng_v %!s(int64=5) %!d(string=hai) anos
pai
achega
f50f8b8773
Modificáronse 1 ficheiros con 7 adicións e 5 borrados
  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
       }