Browse Source

Merge pull request #344 from 7beCn/master

修复table数据大于50条时页面卡死
main
奇淼(piexlmax 4 years ago
committed by GitHub
parent
commit
65474b6740
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      server/resource/template/web/table.vue.tpl

20
server/resource/template/web/table.vue.tpl

@ -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>
</style>
Loading…
Cancel
Save