-
Notifications
You must be signed in to change notification settings - Fork 657
Upgrade to version 0.3.4 #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
import homeRouter from './home-router' | ||
|
||
const routes = [ | ||
{ | ||
path: '/', | ||
name: 'Home', | ||
redirect: '/about', | ||
component: Home, | ||
component: () => import('@/views/home/Home'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个块不拆分, 少一次请求, 其实也没啥问题
@@ -1,5 +1,6 @@ | |||
import Vue from 'vue' | |||
import Vuex from 'vuex' | |||
import createLogger from 'vuex/dist/logger' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个引入是不是有点问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -81,7 +81,7 @@ export default { | |||
this.loading = false | |||
console.log(e) | |||
} | |||
if (res.code < window.SUCCESS_CODE) { | |||
if (res.code < window.MAX_SUCCESS_CODE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个写法感觉有点问题, 既然是成功失败, 判断写在通用的组件里, 应用的时候使用 try catch是不是更好一些. 也不需要在window上挂全局变量
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个写法感觉有点问题, 既然是成功失败, 判断写在通用的组件里, 应用的时候使用 try catch是不是更好一些. 也不需要在window上挂全局变量
写在通用组件里,每次使用的时候还要引入,除非挂载在 vm 实例上
No description provided.