Ver Fonte

fix(web): small adjustment in ArticleManage.vue

User há 2 meses atrás
pai
commit
d0f4ff6660
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      cfc-web/src/views/admin/ArticleManage.vue

+ 4 - 2
cfc-web/src/views/admin/ArticleManage.vue

@@ -114,8 +114,10 @@ export default {
     }
     }
   },
   },
   created() {
   created() {
-    this.loadCategories()
-    this.loadList()
+    Promise.all([
+      this.loadCategories().catch(e => console.error('加载分类失败', e)),
+      this.loadList().catch(e => this.$message.error('加载文章列表失败'))
+    ])
   },
   },
   methods: {
   methods: {
     async loadCategories() {
     async loadCategories() {