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),
     }
 }