增加条件搜索示例 前端文件参考src\view\superAdmin\api\api.vue 后台文件参考 model\dnModel\api.go
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user