Skip to content

adding examples and modifying parameter descriptions #522

Closed
@zhenzhenChange

Description

@zhenzhenChange

document: src/api/global-api.md

Modified api:

  • defineAsyncComponent

    Advanced Usage, Adding examples to the onError hook (Reference rfc) :

    ...
    onError(error, retry, fail, attempts) {
      if (error.message.match(/fetch/) && attempts <= 3) {
        // retry on fetch errors, 3 max attempts
        retry()
      } else {
        // Note that retry/fail are like resolve/reject of a promise:
        // one of them must be called for the error handling to continue.
        fail()
      }
    }
    ...
  • resolveComponent

    Modify parameter descriptions:

    Accepts one argument: `component` --> Accepts one argument: `name`

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