vue3-oop-static
Version:
31 lines (30 loc) • 1.45 kB
TypeScript
import { ComponentPublicInstance, InjectionKey, VNodeChild, VNodeProps } from 'vue';
import { WithSlotTypes, WithVModel, WithVSlots } from '../type';
import { resolveComponent } from '../di';
export declare const GlobalStoreKey = "GlobalStoreKey";
declare type VueComponentProps<T extends {}> = Omit<T, 'slots'> & WithVModel<T> & WithVSlots<T> & VNodeProps & Record<string, unknown>;
export declare abstract class VueComponent<T extends {} = {}> {
/** 热更新使用 */
static __hmrId?: string;
/** 装饰器处理 */
private static handler;
/** 是否自定义解析组件 */
static resolveComponent: typeof resolveComponent;
private static __vccOpts__value?;
/** 组件option定义,vue3遇到类组件会从此属性获取组件的option */
private static get __vccOpts();
/** 是否作为全局store提供外部入口,此时会在 当前app上注入2个方法,用于获取此组件的服务 */
static globalStore?: boolean;
/** 是否把自己当做服务provide出去,以便子组件可注入 */
static ProviderKey?: string | symbol | number | InjectionKey<any>;
/** 主要给jsx提示用 */
get $props(): VueComponentProps<T>;
/** 组件属性 */
props: VueComponentProps<T>;
/** 组件上下文 */
context: WithSlotTypes<T>;
constructor();
/** 渲染函数 */
abstract render(ctx: ComponentPublicInstance, cache: any[]): VNodeChild;
}
export {};