| | |
| | | import type { ButtonProps } from 'ant-design-vue/lib/button/buttonTypes'; |
| | | import type { CSSProperties, VNodeChild, ComputedRef } from 'vue'; |
| | | import type { ScrollContainerOptions } from '/@/components/Container/index'; |
| | | import type { ScrollContainerOptions } from '@/components/Container'; |
| | | |
| | | export interface DrawerInstance { |
| | | setDrawerProps: (props: Partial<DrawerProps> | boolean) => void; |
| | | emitVisible?: (visible: boolean, uid: number) => void; |
| | | setDrawerProps: (props: Partial<DrawerProps>) => void; |
| | | emitOpen?: (open: boolean, uid: number) => void; |
| | | } |
| | | |
| | | export interface ReturnMethods extends DrawerInstance { |
| | | openDrawer: <T = any>(visible?: boolean, data?: T, openOnSet?: boolean) => void; |
| | | openDrawer: <T = any>(open?: boolean, data?: T, openOnSet?: boolean) => void; |
| | | closeDrawer: () => void; |
| | | getVisible?: ComputedRef<boolean>; |
| | | getOpen?: ComputedRef<boolean>; |
| | | } |
| | | |
| | | export type RegisterFn = (drawerInstance: DrawerInstance, uuid?: string) => void; |
| | | export type RegisterFn = (drawerInstance: DrawerInstance, uuid: number) => void; |
| | | |
| | | export interface ReturnInnerMethods extends DrawerInstance { |
| | | closeDrawer: () => void; |
| | | changeLoading: (loading: boolean) => void; |
| | | changeOkLoading: (loading: boolean) => void; |
| | | getVisible?: ComputedRef<boolean>; |
| | | getOpen?: ComputedRef<boolean>; |
| | | } |
| | | |
| | | export type UseDrawerReturnType = [RegisterFn, ReturnMethods]; |
| | |
| | | isDetail?: boolean; |
| | | loading?: boolean; |
| | | showDetailBack?: boolean; |
| | | visible?: boolean; |
| | | open?: boolean; |
| | | /** |
| | | * Built-in ScrollContainer component configuration |
| | | * @type ScrollContainerOptions |
| | |
| | | * @default 'body' |
| | | * @type any ( HTMLElement| () => HTMLElement | string) |
| | | */ |
| | | getContainer?: () => HTMLElement | string; |
| | | getContainer?: string | false | HTMLElement | (() => HTMLElement); |
| | | |
| | | /** |
| | | * Whether to show mask or not. |
| | |
| | | */ |
| | | wrapClassName?: string; |
| | | class?: string; |
| | | rootClassName?: string; |
| | | /** |
| | | * Style of wrapper element which **contains mask** compare to `drawerStyle` |
| | | * @type object |
| | |
| | | * @type string |
| | | */ |
| | | placement?: 'top' | 'right' | 'bottom' | 'left'; |
| | | afterVisibleChange?: (visible?: boolean) => void; |
| | | afterOpenChange?: (open?: boolean) => void; |
| | | keyboard?: boolean; |
| | | /** |
| | | * Specify a callback that will be called when a user clicks mask, close button or Cancel button. |