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

npm run generate生成的页面不行? #134

Closed
guaizi149 opened this issue Sep 27, 2017 · 4 comments
Closed

npm run generate生成的页面不行? #134

guaizi149 opened this issue Sep 27, 2017 · 4 comments
Assignees
Labels

Comments

@guaizi149
Copy link

guaizi149 commented Sep 27, 2017

npm run dev是可以的,但是generate的页面就如下图所示了。
image

This question is available on Nuxt.js community (#c5)
@clarkdo clarkdo added the bug label Sep 28, 2017
@clarkdo clarkdo self-assigned this Sep 28, 2017
@clarkdo clarkdo added question and removed bug labels Sep 28, 2017
@clarkdo
Copy link
Owner

clarkdo commented Sep 28, 2017

这个是由于请求后台菜单接口报错导致的, generate生成的为静态SPA页面, 由于需要访问后端数据, 因此在使用generate后, 需要单独构建后端应用, 提供登录, 菜单当等接口

@guaizi149
Copy link
Author

我遇到的问题是这样的: 因为原有的项目比较复杂, 尝试了几次整合vue都没成功。原有的后台页面试JAVA。现在制作后台管理页面,想使用vue + element ui,配合nuxt.js生成静态页面,直接放到项目中。这样是否可行?

@clarkdo
Copy link
Owner

clarkdo commented Sep 28, 2017

可以的. vue+element ui生成之后的页面可以部署在Nginx, 访问Java端的接口直接通过Nginx转发即可, 项目接口可以参考https://github.com/nuxt/nuxt.js/tree/dev/examples/spa, 需要自己添加下element-ui依赖和插件, 插件可以参考:https://github.com/clarkdo/hare/blob/dev/client/plugins/element-ui.js

@guaizi149
Copy link
Author

非常感谢!

@clarkdo clarkdo closed this as completed Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants