Skip to content

[Modal] 希望confirm可以支持async/await #3589

@waycowei

Description

@waycowei
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

可以更好的处理逻辑

What does the proposed API look like?

async function beforeClose (done) {
  const confirm = await this.$confirm({
    title: '关闭弹框将丢失已编辑内容,是否继续?'
  })
  if (confirm === 'confirm') {
    done()
    return true
  }
  return false
}

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