未验证 提交 56db8e43 编写于 作者: Z zzZ007 提交者: GitHub

Update table.vue.tpl

修改自动生成代码,当table数据大于50条时,页面会卡死,替换掉 el-popover即可。
上级 04eba253
......@@ -68,14 +68,7 @@
<el-table-column label="按钮组">
<template slot-scope="scope">
<el-button class="table-button" @click="update{{.StructName}}(scope.row)" size="small" type="primary" icon="el-icon-edit">变更</el-button>
<el-popover placement="top" width="160" v-model="scope.row.visible">
<p>确定要删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="delete{{.StructName}}(scope.row)">确定</el-button>
</div>
<el-button type="danger" icon="el-icon-delete" size="mini" slot="reference">删除</el-button>
</el-popover>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="openComfirm(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -208,6 +201,15 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val
},
openComfirm(row){
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.delete{{.StructName}}(row);
});
},
async onDelete() {
const ids = []
if(this.multipleSelection.length == 0){
......@@ -317,4 +319,4 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册