소스 검색

eslint报错

zhengnaiwen_citu 3 달 전
부모
커밋
77443241be
1개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 6
      src/App.vue

+ 3 - 6
src/App.vue

@@ -7,12 +7,9 @@ import autoRefresh from './update'
 export default {
   name: 'App',
   created () {
-    try {
-      // 更新机构树
-      this.$store.dispatch('system/getOrganizationTree')
-    } catch (error) {
-      // console.log(error)
-    }
+    this.$store.dispatch('system/getOrganizationTree').catch(error => {
+      console.log(error)
+    })
     if (process.env.NODE_ENV !== 'production') {
       return
     }