nutui-taro-upgrade
Version:
@nutui/nutui-taro 对京东风格组件库的taro4 版本支持
15 lines (14 loc) • 490 B
TypeScript
import type { InjectionKey, ComponentInternalInstance } from 'vue';
type ParentProvide<T> = T & {
add(child: ComponentInternalInstance): void;
remove(child: ComponentInternalInstance): void;
internalChildren: ComponentInternalInstance[];
};
export declare function useInject<T>(key: InjectionKey<ParentProvide<T>>): {
parent: ParentProvide<T>;
index: import("vue").ComputedRef<number>;
} | {
parent: null;
index: import("vue").Ref<number, number>;
};
export {};