Skip to content
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

你好 我发现个奇怪的问题 #1

Open
setli opened this issue Jan 21, 2018 · 0 comments
Open

你好 我发现个奇怪的问题 #1

setli opened this issue Jan 21, 2018 · 0 comments

Comments

@setli
Copy link

setli commented Jan 21, 2018

export const otherRouter = {
  path: '/',
  name: 'otherRouter',
  redirect: '/home',
  component: Layout,
  children: [
      { path: 'home', title: {i18n: 'home'}, name: 'home_index', component: dynamicImportPage('views/dashboard/index'), },
      { path: 'ownspace', title: '个人中心', name: 'ownspace_index', component: dynamicImportPage('views/error/404'), },
  ]
};

不换行的话编译后 会少了个}符号 ↓
Syntax Error: Unexpected token, expected , (29:6)

children: [
 { path: 'home', title: {i18n: 'home'}, name: 'home_index', component: r => require.ensure([], () => r(require('views/dashboard/index')), 'views-dashboard-index')
 { path: 'ownspace', title: '个人中心', name: 'ownspace_index', component: r => require.ensure([], () => r(require('views/error/404')), 'views-error-404')
]
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

No branches or pull requests

1 participant