Chore: 处理了Vben封装的Drawer,Modal组件的一些类型错误 (#3064)

* chore: rm unuse params

* chore(Modal): getCurrentInstance的uid类型为number

* chore(Drawer): 调整drawer组件的一些类型问题

* chore(Drawer): 移除多余的classname配置

* chore(Drawer): 修复getContainer和antd4 drawer组件类型不一致

* fix(AppSearchModal): 调整setRefs函数的类型
This commit is contained in:
invalid w
2023-09-26 09:41:25 +08:00
committed by GitHub
parent 1cf2a81f2a
commit c5d24e07f0
7 changed files with 20 additions and 20 deletions

View File

@@ -1,9 +1,9 @@
import type { Ref } from 'vue';
import type { ComponentPublicInstance, Ref } from 'vue';
import { onBeforeUpdate, shallowRef } from 'vue';
function useRefs<T = HTMLElement>(): {
refs: Ref<T[]>;
setRefs: (index: number) => (el: T) => void;
setRefs: (index: number) => (el: Element | ComponentPublicInstance | null) => void;
} {
const refs = shallowRef([]) as Ref<T[]>;
@@ -11,8 +11,8 @@ function useRefs<T = HTMLElement>(): {
refs.value = [];
});
const setRefs = (index: number) => (el: T) => {
refs.value[index] = el;
const setRefs = (index: number) => (el: Element | ComponentPublicInstance | null) => {
refs.value[index] = el as T;
};
return {