Skip to content

Can let emit return a Promise array?please #635

@LastHeaven

Description

@LastHeaven

What problem does this feature solve?

That can do something after emit event。

What does the proposed API look like?

const loading = ref(false)
const onClick = async () =>  {
 // doSomething
  loading.value = false
  // emit event
  await Promise.all(emit('click'))
  // doSomething
  loading.value = false
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions