Skip to content

Commit de1acca

Browse files
authored
fix(drawer): type-error fix (DevCloudFE#395)
1 parent d2a211d commit de1acca

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/devui-vue/devui/drawer/src/drawer-service.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createApp, nextTick, onUnmounted, reactive } from 'vue';
1+
import { createApp, onUnmounted, reactive } from 'vue';
22
import type { App } from 'vue';
33
import Drawer from './drawer';
44
import { DrawerOptions } from './drawer-types';
@@ -25,7 +25,6 @@ function initInstance(state: DrawerOptions): App {
2525
state.modelValue = false;
2626
};
2727
onUnmounted(() => {
28-
console.log(111);
2928
document.body.removeChild(container);
3029
});
3130
return () => (

packages/devui-vue/devui/drawer/src/drawer-types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export const drawerOverlayProps = {
3939
type: Boolean,
4040
default: false,
4141
},
42+
onClick: {
43+
type: Function,
44+
}
4245
};
4346

4447
type DrawerEmitEvent = 'update:modelValue' | 'close' | 'open';
@@ -52,7 +55,7 @@ export type DrawerOverlayProps = ExtractPropTypes<typeof drawerOverlayProps>;
5255
export type DrawerOptions = Partial<DrawerProps> & { content?: string | Slot };
5356

5457
export type UseDrawerFn = {
55-
drawerRef: Ref<HTMLElement>;
58+
drawerRef: Ref<HTMLElement | undefined>;
5659
drawerClasses: Ref<Record<string, boolean>>;
5760
handleOverlayClick: () => void;
5861
};

0 commit comments

Comments
 (0)