Skip to content

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

Merged
merged 2 commits into from
Mar 29, 2020
Merged

Upgrade to version 0.3.4 #299

merged 2 commits into from
Mar 29, 2020

Conversation

vanoneang
Copy link
Member

No description provided.

import homeRouter from './home-router'

const routes = [
{
path: '/',
name: 'Home',
redirect: '/about',
component: Home,
component: () => import('@/views/home/Home'),
Copy link
Contributor

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'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个引入是不是有点问题

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个写法感觉有点问题, 既然是成功失败, 判断写在通用的组件里, 应用的时候使用 try catch是不是更好一些. 也不需要在window上挂全局变量

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个写法感觉有点问题, 既然是成功失败, 判断写在通用的组件里, 应用的时候使用 try catch是不是更好一些. 也不需要在window上挂全局变量

写在通用组件里,每次使用的时候还要引入,除非挂载在 vm 实例上

@vanoneang vanoneang merged commit 3bff01d into master Mar 29, 2020
@vanoneang vanoneang deleted the optimize branch July 10, 2020 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants