|
|
|
@ -6,14 +6,17 @@ import { isFunction } from '/@/utils/is'; |
|
|
|
export function useTableForm( |
|
|
|
propsRef: ComputedRef<BasicTableProps>, |
|
|
|
slots: Slots, |
|
|
|
fetch: (opt?: FetchParams | undefined) => Promise<void> |
|
|
|
fetch: (opt?: FetchParams | undefined) => Promise<void>, |
|
|
|
getLoading: ComputedRef<boolean | undefined> |
|
|
|
) { |
|
|
|
const getFormProps = computed( |
|
|
|
(): Partial<FormProps> => { |
|
|
|
const { formConfig } = unref(propsRef); |
|
|
|
const { submitButtonOptions } = formConfig || {}; |
|
|
|
return { |
|
|
|
showAdvancedButton: true, |
|
|
|
...formConfig, |
|
|
|
submitButtonOptions: { loading: unref(getLoading), ...submitButtonOptions }, |
|
|
|
compact: true, |
|
|
|
}; |
|
|
|
} |
|
|
|
|