标签:src ESS label handle erro cli size hand --
一、easy-mock-->/api/gathering/{gatheringId}(delete)
{
"code": 20000,
"flag": true,
"message": "删除成功!"
}
二、vueadmin-template-master-->src-->api-->gathering.js
deleteById(id){ return request({ url : `/api/gathering/${id}`, method : ‘delete‘ }); }
三、vueadmin-template-master-->src-->views-->table-->gathering.vue(handleDelete)
<el-table-column fixed="right" label="操作" width="120"> <template slot-scope="scope"> <el-button @click="handleEdit(scope.row.id)" type="text" size="small">修改</el-button> <el-button @click="handleDelete(scope.row.id)" type="text" size="small">删除</el-button> </template> </el-table-column> handleDelete(id){ gatheringApi.DeleteById(id).then(response=>{ this.$message({ message: response.message, type: (response.flag?‘success‘:‘error‘) }); if(response.flag){ this.pojo = {}; } }); }
标签:src ESS label handle erro cli size hand --
原文地址:https://www.cnblogs.com/DotSDot/p/13288707.html