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

2020-11-25 00:00:00 by 【6yang】, 928 visits, 收藏 | 返回
delRow(item) {
      const { id } = item
      this.$confirm('确定要删除此记录?', {
        type: 'warning'
      }).then(async () => {
        const res = await api.deleteTag({ id: id })
        this.$message.success('删除成功')
        this.getList()
      })
    },
分享到:
share

    图片原图

    loading

    loading