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

请问我如何将VUE内容,直接解析并展示? #11005

Closed
AndyLue opened this issue Jan 10, 2020 · 2 comments
Closed

请问我如何将VUE内容,直接解析并展示? #11005

AndyLue opened this issue Jan 10, 2020 · 2 comments

Comments

@AndyLue
Copy link

@AndyLue AndyLue commented Jan 10, 2020

What problem does this feature solve?

需求效果和这个意思一样。

<div>
    <component v-bind:is="AsyncComponent"></component>
</div>
const AsyncComponent = () => ({
  component: import('./MyComponent.vue'),
  loading: LoadingComponent,
  error: ErrorComponent,
  delay: 200,
  timeout: 3000
})

但是我要做的是根据VUE内容加载,达到上面代码的效果。
也就是说根据MyComponent.vue这个文件的内容直接显示出效果

请问是否有更好的方法?

What does the proposed API look like?

const AsyncComponent = () => ({
  component: import(“<template><div>你好</div></template>export default {
data()....}”),
  loading: LoadingComponent,
  error: ErrorComponent,
  delay: 200,
  timeout: 3000
})
@AndyLue

This comment has been minimized.

Copy link
Author

@AndyLue AndyLue commented Jan 10, 2020

相当于在线运行VUE一样,可以根据代码显示出来效果

@Justineo

This comment has been minimized.

Copy link
Member

@Justineo Justineo commented Jan 11, 2020

Issue 仅接受 bug 报告与新特性请求,不负责解决用法的问题,有疑问请前往论坛StackOverflow 或者 Discord 聊天室 请求帮助,谢谢。

@Justineo Justineo closed this Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.