Commit 1bdc0621b838a63fce090daaac33ad0f19763e28
Committed by
GitHub
1 parent
a2d93fce
feat:删除拉流代理时,提示是否确认删除,防止误删
Showing
1 changed file
with
19 additions
and
12 deletions
web_src/src/components/StreamProxyList.vue
| ... | ... | @@ -245,18 +245,25 @@ |
| 245 | 245 | }, |
| 246 | 246 | deleteStreamProxy: function(row){ |
| 247 | 247 | let that = this; |
| 248 | - that.$axios({ | |
| 249 | - method:"delete", | |
| 250 | - url:"/api/proxy/del", | |
| 251 | - params:{ | |
| 252 | - app: row.app, | |
| 253 | - stream: row.stream | |
| 254 | - } | |
| 255 | - }).then((res)=>{ | |
| 256 | - that.initData() | |
| 257 | - }).catch(function (error) { | |
| 258 | - console.log(error); | |
| 259 | - }); | |
| 248 | + this.$confirm('确定删除此代理吗?', '提示', { | |
| 249 | + confirmButtonText: '确定', | |
| 250 | + cancelButtonText: '取消', | |
| 251 | + type: 'warning' | |
| 252 | + }).then(() => { | |
| 253 | + that.$axios({ | |
| 254 | + method:"delete", | |
| 255 | + url:"/api/proxy/del", | |
| 256 | + params:{ | |
| 257 | + app: row.app, | |
| 258 | + stream: row.stream | |
| 259 | + } | |
| 260 | + }).then((res)=>{ | |
| 261 | + that.initData() | |
| 262 | + }).catch(function (error) { | |
| 263 | + console.log(error); | |
| 264 | + }); | |
| 265 | + }).catch(() => { | |
| 266 | + }); | |
| 260 | 267 | }, |
| 261 | 268 | start: function(row){ |
| 262 | 269 | this.stopUpdateList() | ... | ... |