|
|
|
@ -31,17 +31,18 @@ export default function useUserTable() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取show方法
|
|
|
|
|
const tableShowBtn = ref<{ show: (title: string) => void }>()
|
|
|
|
|
|
|
|
|
|
// 搜索按钮
|
|
|
|
|
const searchBtn = () => {
|
|
|
|
|
|
|
|
|
|
getList()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 重置按钮
|
|
|
|
|
const resetBtn = () => {
|
|
|
|
|
tableShowBtn.value?.show("重置")
|
|
|
|
|
listParm.currentPage = 1;
|
|
|
|
|
listParm.name = ''
|
|
|
|
|
listParm.phone = ''
|
|
|
|
|
getList()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 在组件挂载时加载数据
|
|
|
|
@ -67,7 +68,6 @@ export default function useUserTable() {
|
|
|
|
|
}
|
|
|
|
|
// 将表格查询的方法返回出去
|
|
|
|
|
return {
|
|
|
|
|
tableShowBtn,
|
|
|
|
|
listParm,
|
|
|
|
|
getList,
|
|
|
|
|
searchBtn,
|
|
|
|
|