diff --git a/packages/search-table-react/src/SearchTable.tsx b/packages/search-table-react/src/SearchTable.tsx index fb1ca73..01f7a85 100644 --- a/packages/search-table-react/src/SearchTable.tsx +++ b/packages/search-table-react/src/SearchTable.tsx @@ -82,8 +82,8 @@ const SearchTable = ( searchRef.current?.setValue(nextValue) }, clearSearchValue: () => searchRef.current?.resetValue(), - getTableData: () => dataSource, - setTableDataAndRender: (data) => { + getDataSource: () => dataSource, + setDataSourceAndRender: (data) => { setDataSource(data) forceUpdate() }, diff --git a/packages/search-table-react/src/typings/index.d.ts b/packages/search-table-react/src/typings/index.d.ts index ca71c6f..3bf8515 100644 --- a/packages/search-table-react/src/typings/index.d.ts +++ b/packages/search-table-react/src/typings/index.d.ts @@ -145,11 +145,11 @@ export interface ISearchTableRef { /** * 获取表格列表数据 */ - getTableData: () => IRequestResult['data'] + getDataSource: () => IRequestResult['data'] /** * 设置表格列表数据 */ - setTableDataAndRender: (dataSource: IObjectAny[]) => void + setDataSourceAndRender: (dataSource: IObjectAny[]) => void /** * 获取搜索参数 */