소스 검색

计划出版日期旧值兼容

dsy 2 주 전
부모
커밋
72813e9c4f
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/views/personal_workbench/project/components/UpdateProjectField.vue

+ 4 - 0
src/views/personal_workbench/project/components/UpdateProjectField.vue

@@ -130,6 +130,10 @@ export default {
       if (this.field === 'label_list' && Array.isArray(newVal)) {
         this.arrayValue = [...newVal];
       }
+      if (this.field === 'plan_publish_date') {
+        const date = new Date();
+        this.stringValue = newVal === '0-00-00' ? `${date.getFullYear()}-${date.getMonth()}-${date.getDay()}` : newVal;
+      }
     },
   },
   methods: {