前端学习(2677):懂代码之表格BaseTable删除操作
生活随笔
收集整理的這篇文章主要介紹了
前端学习(2677):懂代码之表格BaseTable删除操作
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1第一步
<el-table-column label="操作" width="180" align="center"><template slot-scope="scope"><el-buttontype="text"icon="el-icon-edit"@click="handleEdit(scope.$index, scope.row)">編輯</el-button><el-buttontype="text"icon="el-icon-delete"class="red"@click="handleDelete(scope.$index, scope.row)">刪除</el-button></template>2點(diǎn)擊刪除按鈕
// 刪除操作handleDelete(index, row) {// 二次確認(rèn)刪除this.$confirm('確定要?jiǎng)h除嗎?', '提示', {type: 'warning'}).then(() => {this.$message.success('刪除成功');this.tableData.splice(index, 1);}).catch(() => {});},``` 3功能演示 總結(jié)
以上是生活随笔為你收集整理的前端学习(2677):懂代码之表格BaseTable删除操作的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: JSP程序设计实验报告
- 下一篇: 前端学习(2797):实现右侧数据的渲染