-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
What problem does this feature solve?
Reference: https://vuejs.org/v2/guide/components-dynamic-async.html#Handling-Loading-State
Current Issue: We do not know when the async component was loaded, with this, the 'Ref' is also not recognized in the 'mounted()' father
What does the proposed API look like?
Feature Request: Prop from 'created' in asynchronous component to go event
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,
created: () => something()
})
Metadata
Metadata
Assignees
Labels
No labels