mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-08 08:05:07 +08:00
fix: 修复Search组件无法默认值
This commit is contained in:
@ -41,6 +41,9 @@ export const useForm = (props?: FormProps) => {
|
||||
setProps: async (props: FormProps = {}) => {
|
||||
const form = await getForm()
|
||||
form?.setProps(props)
|
||||
if (props.model) {
|
||||
form?.setValues(props.model)
|
||||
}
|
||||
},
|
||||
|
||||
setValues: async (data: Recordable) => {
|
||||
|
@ -18,6 +18,8 @@ interface UseTableConfig<T = any> {
|
||||
exportListApi?: (option: any) => Promise<T>
|
||||
// 返回数据格式配置
|
||||
response?: ResponseType
|
||||
// 默认传递的参数
|
||||
defaultParams?: Recordable
|
||||
props?: TableProps
|
||||
}
|
||||
|
||||
@ -43,7 +45,9 @@ export const useTable = <T = any>(config?: UseTableConfig<T>) => {
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
// AxiosConfig 配置
|
||||
params: {},
|
||||
params: {
|
||||
...(config?.defaultParams || {})
|
||||
},
|
||||
// 加载中
|
||||
loading: true,
|
||||
// 导出加载中
|
||||
|
Reference in New Issue
Block a user