-
Notifications
You must be signed in to change notification settings - Fork 433
Closed
Labels
Description
Hi, guys
I try to lazy load some components, and work fine if i use the classic way with: my-component': () => import('./my-async-component')
, but i want try to create a factory object like in vue documentation
const AsyncComponent = () => ({
// The component to load (should be a Promise)
component: import('./MyComponent.vue'),
// A component to use while the async component is loading
loading: LoadingComponent,
// A component to use if the load fails
error: ErrorComponent,
// Delay before showing the loading component. Default: 200ms.
delay: 200,
// The error component will be displayed if a timeout is
// provided and exceeded. Default: Infinity.
timeout: 3000
})
@Component({
components: {
AsyncComponent
}
})
class App extends Vue {}
But it gave me an error " Object literal may only specify known properties, but 'components' does not exist in type 'VueClass'. Did you mean to write 'component'?".
Now my question is, i do something wrong? or vue-class-component do not support this feature?