Skip to content

Action event on loaded component Async #9416

@joaoeudes7

Description

@joaoeudes7

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions