- defineComponent<Props, E, EE, S>(setup, options?): DefineSetupFnComponent<Props, E, S>
Type Parameters
- Props extends Record<string, any>
- E extends EmitsOptions = {}
- EE extends string = string
- S extends SlotsType<Record<string, any>> = {}
Parameters
- setup: ((props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>)
Optional
options: Pick<ComponentOptions<{}, any, any, any, any, any, any, any, string, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, "name" | "inheritAttrs"> & {
emits?: E | EE[];
props?: (keyof Props)[];
slots?: S;
}
- defineComponent<Props, E, EE, S>(setup, options?): DefineSetupFnComponent<Props, E, S>
Type Parameters
- Props extends Record<string, any>
- E extends EmitsOptions = {}
- EE extends string = string
- S extends SlotsType<Record<string, any>> = {}
Parameters
- setup: ((props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>)
Optional
options: Pick<ComponentOptions<{}, any, any, any, any, any, any, any, string, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, "name" | "inheritAttrs"> & {
emits?: E | EE[];
props?: ComponentObjectPropsOptions<Props>;
slots?: S;
}
- defineComponent<TypeProps, RuntimePropsOptions, RuntimePropsKeys, TypeEmits, RuntimeEmitsOptions, RuntimeEmitsKeys, Data, SetupBindings, Computed, Methods, Mixin, Extends, InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide, ResolvedEmits, InferredProps, TypeRefs, TypeEl>(options): DefineComponent<InferredProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, PublicProps, ToResolvedProps<InferredProps, ResolvedEmits>, ExtractDefaultPropTypes<RuntimePropsOptions>, Slots, LocalComponents, Directives, Exposed, Provide, unknown extends TypeProps
? true
: false, TypeRefs, TypeEl> Type Parameters
- TypeProps
- RuntimePropsOptions extends ComponentObjectPropsOptions<Data> = ComponentObjectPropsOptions<Data>
- RuntimePropsKeys extends string = string
- TypeEmits extends ComponentTypeEmits = {}
- RuntimeEmitsOptions extends EmitsOptions = {}
- RuntimeEmitsKeys extends string = string
- Data = {}
- SetupBindings = {}
- Computed extends ComputedOptions = {}
- Methods extends MethodOptions = {}
- Mixin extends ComponentOptionsMixin = ComponentOptionsMixin
- Extends extends ComponentOptionsMixin = ComponentOptionsMixin
- InjectOptions extends ComponentInjectOptions = {}
- InjectKeys extends string = string
- Slots extends SlotsType<Record<string, any>> = {}
- LocalComponents extends Record<string, Component<any, any, any, ComputedOptions, MethodOptions, {}, any>> = {}
- Directives extends Record<string, vue.Directive<any, any, string, string>> = {}
- Exposed extends string = string
- Provide extends ComponentProvideOptions = ComponentProvideOptions
- ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions
? TypeEmitsToOptions<TypeEmits>
: RuntimeEmitsOptions - InferredProps = IsKeyValues<TypeProps> extends true
? TypeProps
: string extends RuntimePropsKeys
? ComponentObjectPropsOptions<Data> extends RuntimePropsOptions
? {}
: ExtractPropTypes<RuntimePropsOptions>
: {
[key in string]?: any
} - TypeRefs extends Record<string, unknown> = {}
- TypeEl extends Element = any
Parameters
- options: {
props?: RuntimePropsOptions & ThisType<void> | RuntimePropsKeys[];
} & ComponentOptionsBase<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, RuntimeEmitsKeys, {}, InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, {}, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed, {}, any, ComponentProvideOptions, IntersectionMixin<Mixin> & IntersectionMixin<Extends>, UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "P"> & EnsureNonVoid<ToResolvedProps<InferredProps, ResolvedEmits>>, UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "B"> & EnsureNonVoid<SetupBindings>, UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "D"> & EnsureNonVoid<Data>, UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "C"> & EnsureNonVoid<Computed>, UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "M"> & EnsureNonVoid<Methods>, UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "Defaults"> & {}>>