增加条件搜索示例 前端文件参考src\view\superAdmin\api\api.vue 后台文件参考 model\dnModel\api.go

This commit is contained in:
pixel
2019-11-09 23:18:29 +08:00
parent ad5e121123
commit 17d283104b
4 changed files with 33 additions and 8 deletions
@@ -5,6 +5,7 @@ export default {
total: 10,
pageSize: 10,
tableData: [],
searchInfo: {}
}
},
methods: {
@@ -17,7 +18,7 @@ export default {
this.getTableData()
},
async getTableData(page = this.page, pageSize = this.pageSize) {
const table = await this.listApi({ page, pageSize })
const table = await this.listApi({ page, pageSize, ...this.searchInfo })
this.tableData = table.data[this.listKey]
this.total = table.data.total
this.page = table.data.page