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

同一界面中,多个模板,使用不同的渲染方式 #52

Closed
klk2 opened this issue Jan 8, 2018 · 3 comments
Closed

同一界面中,多个模板,使用不同的渲染方式 #52

klk2 opened this issue Jan 8, 2018 · 3 comments

Comments

@klk2
Copy link

klk2 commented Jan 8, 2018

你好,在vue中,怎么实现:同一界面中,多个模板,使用不同的渲染方式。
假设在A页面中,a模板用服务端渲染,a2模板用客户端渲染

@klk2
Copy link
Author

klk2 commented Jan 8, 2018

我在mounted后,通过调用vue异步组件的方式解决了。
A页面使用服务端渲染,mounted之后,再注册模板。

@hubcarl
Copy link
Collaborator

hubcarl commented Jan 9, 2018

@klk2 用 import vue component 方式,见最新master dynamic.vue

@hubcarl
Copy link
Collaborator

hubcarl commented Jan 17, 2018

impor .vue 文件需要用easywebpack-vue 3.5.1以上版本。 相关问题见:#46https://zhuanlan.zhihu.com/p/32887257

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

No branches or pull requests

2 participants