zoukankan      html  css  js  c++  java
  • vue 删除操作

    // 删除属性操作
            async removeParams(attr_id){
                const confirmResult = await this.$confirm('此操作将永久删除该参数, 是否继续?', '提示', {
                                    confirmButtonText: '确定',
                                    cancelButtonText: '取消',
                                    type: 'warning'
                   }).catch(err => err)

                // 取消删除操作
                if(confirmResult !== 'confirm'){
                    return this.$message.info('已取消删除')
                }
                //删除 
                const {data:res} = await this.$http.delete(`categories/${this.cateId}/attributes/${attr_id}`)
                if(res.meta.status !== 200){
                    return this.$message.error('删除失败')
                }
                this.$message.success('删除成功')
                this.getParamsData()
            }
  • 相关阅读:
    js getAttribute()和setAttribute()方法
    FCKeditor上传图片显示叉叉的问题的解决方案
    数据导出
    插入多种格式的网页播放器
    注册机...郁闷..
    AJAX效果
    2003下使用JMAIL问题解决办法
    ASP无组件上传带进度条
    MSSQL查询题解
    在线转flv+flash在线录制视频
  • 原文地址:https://www.cnblogs.com/ericblog1992/p/13180719.html
Copyright © 2011-2022 走看看