li.shaoyi 3 年 前
コミット
6f7dad9c0f
1 ファイル変更4 行追加4 行削除
  1. 4 4
      src/hooks/datatable/index.ts

+ 4 - 4
src/hooks/datatable/index.ts

@@ -53,7 +53,7 @@ export function useDataTable<T>(options: DataTableOptions = {}) {
             filters.value = []
         },
         onSearch: () => {
-            filters.value = getFilterParam()
+            filters.value = getFilterParams()
         }
     }
 
@@ -86,7 +86,7 @@ export function useDataTable<T>(options: DataTableOptions = {}) {
     })
 
     // 获取过滤参数,支持多条件查询
-    const getFilterParam = () => {
+    const getFilterParams = () => {
         const options: FilterValue<T>[] = []
         filterOptons.selectList.forEach((e) => {
             const { key, selectedValue } = e;
@@ -110,7 +110,7 @@ export function useDataTable<T>(options: DataTableOptions = {}) {
     }
 
     // 获取查询参数,支持多条件查询
-    const getQueryParam = () => {
+    const getQueryParams = () => {
         const params: { [K in keyof T]?: T[K] } = {}
         filterOptons.selectList.forEach((e) => {
             if (e.selectedValue !== undefined) {
@@ -134,7 +134,7 @@ export function useDataTable<T>(options: DataTableOptions = {}) {
         pageSize,
         pageCount,
         filterMethod,
-        getQueryParam,
+        getQueryParams,
         ...toRefs(filterOptons),
     }
 }