Skip to content

get error detail when use async component factory  #10027

Open
@jaylecn

Description

@jaylecn

What problem does this feature solve?

https://vuejs.org/v2/guide/components-dynamic-async.html#Handling-Loading-State

const component = new Promise(function (resolve, reject) {
       reject('error detail');
});
const AsyncComponent = () => ({
  // The component to load (should be a Promise)
  component: component,
  // 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
})

i want get error detail in AsyncComponent.error component, make page friendly

What does the proposed API look like?

maybe inject error as props to AsyncComponent.error ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions