当我这样填写component
字段时createRouter()
:
{
path: '/article/post',
name: 'article-post',
component: defineAsyncComponent({
loader: () => import('@/views/article-post/index.vue'),
loadingComponent: () => import('@/views/article-post/skeleton.vue'),
}),
},
好像它不起作用。我希望它在实际页面加载时显示加载页面。
我怎么做?