Browse Source

修改字典没匹配到报错的兼容

zhy 1 month ago
parent
commit
b1f3639716
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/views/cms/post.vue

+ 1 - 1
src/views/cms/post.vue

@@ -139,7 +139,7 @@ export default {
       this.mydata.formData = {};
       this.mydata.formData.parentId = e[`${this.mydata.classify}Id`];
       const dict = this.dict.type.term_type.find(j => j.value == this.mydata.type);
-      this.mydata.dialogInfo.title = `添加${dict.label}`;
+      this.mydata.dialogInfo.title = `添加${dict?.label}`;
       this.mydata.dialogInfo.dialogVisible = true;
     },
     // 列表修改