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