asnyc await 在confirm下如何正确使用?

发布日期: 2020-11-25 00:00:00
点击次数: 933
大字 小字
delRow(item) {
      const { id } = item
      this.$confirm('确定要删除此记录?', {
        type: 'warning'
      }).then(async () => {
        const res = await api.deleteTag({ id: id })
        this.$message.success('删除成功')
        this.getList()
      })
    },
返回顶部