Jelajahi Sumber

计划出版日期旧值兼容

dsy 1 Minggu lalu
induk
melakukan
72813e9c4f

+ 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: {