master
loveflow 8 months ago
parent 9bddca975b
commit 9d8e500f53

@ -89,6 +89,11 @@ export default {
selectionChange(item) {
this.$emit("selectionChange", item, this.rowKey);
},
//
clearSelection() {
this.$refs.gMainTable.clearSelection();
this.$emit("onClearSelected");
},
},
};
</script>

@ -4,7 +4,7 @@ export const tableListMixins = {
data() {
return {
/* 查询条件 */
quaryParam: {},
queryParam: {},
/* 数据源 */
dataSource: [],
/* 分页参数 */
@ -86,12 +86,16 @@ export const tableListMixins = {
this.selectedRowKeys = [];
this.selectionRows = [];
},
//查询
searchQuery() {
this.ipagination.currentPage = 1;
this.loadData();
this.selectedRowKeys = [];
this.selectionRows = [];
this.onClearSelected();
},
//重置
searchReset() {
this.queryParam = {};
this.searchQuery();
},
},
};

@ -9,12 +9,16 @@
type="primary"
plain
v-if="selectedRowKeys.length"
@click="onClearSelected"
@click="clearSelection"
>
清空选择
</el-button>
<el-input v-model="queryParam.a" placeholder="请输入内容"></el-input>
<el-input v-model="queryParam.b" placeholder="请输入内容"></el-input>
<el-button type="primary" @click="searchQuery"></el-button>
<el-button type="primary" plain @click="searchReset"></el-button>
<div style="width: 800px">
<gMainTable
@ -119,6 +123,9 @@ export default {
this.$refs.formDialog.openDialog();
},
dialogSubmit() {},
clearSelection() {
this.$refs.gMainTable.clearSelection();
},
},
};
</script>

Loading…
Cancel
Save