feat(authList): 添加搜索功能并优化表格数据获取
- 移除了未使用的 AiSelect 组件导入 - 新增了 search 属性的监听器,实现深度监听- 当搜索条件变化时,自动重置页码并重新获取表格数据
This commit is contained in:
		| @@ -1,7 +1,4 @@ | ||||
| <script> | ||||
|  | ||||
| import AiSelect from "dui/packages/basic/AiSelect.vue"; | ||||
|  | ||||
| const columns = [ | ||||
|   {label: "序号", type: "index"}, | ||||
|   {label: "账号", prop: "userName"}, | ||||
| @@ -13,7 +10,6 @@ const columns = [ | ||||
| ] | ||||
| export default { | ||||
|   name: "authList", | ||||
|   components: {AiSelect}, | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
| @@ -29,6 +25,15 @@ export default { | ||||
|       form: {} | ||||
|     } | ||||
|   }, | ||||
|   watch: { | ||||
|     search: { | ||||
|       deep: true, | ||||
|       handler() { | ||||
|         this.page.pageNum = 1 | ||||
|         this.getTableData() | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/api/user/auth/page", null, { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user