UNPKG

@aplus-frontend/ui

Version:

22 lines (21 loc) 1 kB
import { DrawerProps } from '@aplus-frontend/antdv'; import { AppContext } from 'vue'; export type CreateDrawerFuncProps<ContentRecord = any> = Omit<DrawerProps, 'visible' | 'onUpdate:visible' | 'afterVisibleChange' | 'onAfterVisibleOChange' | 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onClose' | 'getContainer' | 'extra' | 'footer'> & Partial<{ onClose: (params: ContentRecord) => any | Promise<any>; getContainer: HTMLElement; content: any; destroyOnClose: boolean; extra: (params: ContentRecord, close: () => void) => any; footer: (params: ContentRecord, close: () => void) => any; /** * 抽屉的上下文,一般用于获取全局注册组件、vuex 等内容 */ appContext: AppContext; }>; export type CreateDrawerFuncReturn = { destroy: () => void; update: (newConfig: CreateDrawerFuncProps) => void; open: () => void; close: () => void; }; export type CreateDrawerFunc = (props: CreateDrawerFuncProps) => CreateDrawerFuncReturn;