This commit is contained in:
yanran200730
2023-04-17 17:34:53 +08:00

View File

@@ -7,6 +7,7 @@
<el-table-column slot="resident" class="ai-table__header">
<template #header>
<b v-text="tableTitle"/>
<el-button type="text" @click="handleSelectAll">全选</el-button>
<el-input class="fill searchbar" v-model="search[searchKey]" size="small" placeholder="搜索" clearable
@change="page.current=1,getTableData()"/>
</template>
@@ -26,6 +27,7 @@
<el-table-column slot="resident">
<template #header>
<b v-text="tableTitle"/>
<el-button type="text" @click="handleSelectAll">全选</el-button>
<el-input class="fill searchbar" v-model="search[searchKey]" size="small" placeholder="搜索" clearable
@change="page.current=1,getTableData()"/>
</template>
@@ -180,6 +182,9 @@ export default {
let {nodeKey} = this
return this.selected?.findIndex(e => e[nodeKey] == item[nodeKey])
},
handleSelectAll() {
this.selected = this.$copy(this.tableData)
}
},
created() {
this.$set(this.search, this.searchKey, "")
@@ -231,6 +236,7 @@ export default {
}
}
:deep(.ai-table__header) {
& > .cell {
display: flex !important;
@@ -238,6 +244,7 @@ export default {
justify-content: space-between !important;
}
}
:deep(.ai-table .el-table__header tr th:first-child .cell) {
padding-left: 20px !important;
}