浏览代码

计划出版日期旧值兼容

dsy 1 周之前
父节点
当前提交
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: {