From 439e3b0f076280311b7cd4251a95820730242780 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期三, 07 八月 2024 10:43:33 +0800 Subject: [PATCH] 一些更新 --- src/components/Drawer/src/typing.ts | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/Drawer/src/typing.ts b/src/components/Drawer/src/typing.ts index 51724a1..9789a50 100644 --- a/src/components/Drawer/src/typing.ts +++ b/src/components/Drawer/src/typing.ts @@ -1,25 +1,25 @@ 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]; @@ -73,7 +73,7 @@ isDetail?: boolean; loading?: boolean; showDetailBack?: boolean; - visible?: boolean; + open?: boolean; /** * Built-in ScrollContainer component configuration * @type ScrollContainerOptions @@ -100,7 +100,7 @@ * @default 'body' * @type any ( HTMLElement| () => HTMLElement | string) */ - getContainer?: () => HTMLElement | string; + getContainer?: string | false | HTMLElement | (() => HTMLElement); /** * Whether to show mask or not. @@ -134,6 +134,7 @@ */ wrapClassName?: string; class?: string; + rootClassName?: string; /** * Style of wrapper element which **contains mask** compare to `drawerStyle` * @type object @@ -179,7 +180,7 @@ * @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. -- Gitblit v1.9.3