element 弹框显示

代码

this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    $.ajax({
                        url:base_url+'/SS/camera/deleteCamera',
                        type: 'post',
                        contentType:'application/x-www-form-urlencoded',
                        dataType:'json',
                        data: {
                            id: row.id
                        },
                        async: true,
                        success:function(res){
                            console.log('res',res)
                            // 刷新页面
                            that.getAllCamera()
                        },fail:function(){
                        }
                    });
                    // this.$message({
                    //     type: 'success',
                    //     message: '删除成功!'
                    // });
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消删除'
                    });
                });

 

posted @ 2022-02-13 18:06  得好好活  阅读(91)  评论(0)    收藏  举报