JavaScript/vue.js/defineAsyncComponent:修订间差异
来自康健生活
| 第26行: | 第26行: | ||
)</syntaxhighlight> | )</syntaxhighlight> | ||
理论上也支持远程文件。 | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
defineAsyncComponent(async () => (await import('http://example.com/path/to/foo. | defineAsyncComponent(async () => (await import('http://example.com/path/to/foo.vue')).default) | ||
</syntaxhighlight> | </syntaxhighlight> | ||