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

     <el-button type="danger" size="mini" icon="el-icon-delete" @click="removeById(scope.row.goods_id)"></el-button>
     
     // 删除
            async removeById(goods_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/${goods_id}`)
                if(res.meta.status !== 200){
                    return this.$message.error('删除失败')
                }
                this.$message.success('删除成功')
                this.getGoodsList()
            }
                  
  • 相关阅读:
    深入PHP内核之全局变量
    关于PHP中的opcode
    深入PHP内核之opcode handler
    virtual memory exhausted: Cannot allocate memory
    Nginx配置error_page 404错误页面
    PHP 与 UTF-8
    define() vs const 该如何选择?
    CentOS安装配置Samba
    当···时发生了什么?
    PHP中curl的使用
  • 原文地址:https://www.cnblogs.com/ericblog1992/p/13182588.html
Copyright © 2011-2022 走看看