ソースを参照

update AudioPost.vue

reghao 2 年 前
コミット
6f425063db
1 ファイル変更20 行追加10 行削除
  1. 20 10
      src/views/post/AudioPost.vue

+ 20 - 10
src/views/post/AudioPost.vue

@@ -129,16 +129,26 @@ export default {
       this.$router.push(path)
     },
     handleDelete(index, row) {
-      deleteAudioPost(row.audioId).then(res => {
-         if (res.code === 0) {
-           this.$notify({
-             title: '提示',
-             message: '稿件已删除',
-             type: 'warning',
-             duration: 3000
-           })
-           this.$router.go(0)
-         }
+      this.$confirm('确定要删除 ' + row.title + '?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        deleteAudioPost(row.audioId).then(res => {
+          if (res.code === 0) {
+            this.$notify({
+              title: '稿件已删除',
+              type: 'warning',
+              duration: 3000
+            })
+            //this.$router.go(0)
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        })
       })
     },
     onUpdateScope() {