You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
2.0 KiB
90 lines
2.0 KiB
declare type InternalComponentOptions = {
|
|
_isComponent: true;
|
|
parent: Component;
|
|
propsData: ?Object;
|
|
_parentVnode: VNode;
|
|
_parentListeners: ?Object;
|
|
_renderChildren: ?Array<VNode>;
|
|
_componentTag: ?string;
|
|
_parentElm: ?Node;
|
|
_refElm: ?Node;
|
|
render?: Function;
|
|
staticRenderFns?: Array<Function>
|
|
}
|
|
|
|
declare type ComponentOptions = {
|
|
// data
|
|
data: Object | Function | void;
|
|
props?: { [key: string]: PropOptions };
|
|
propsData?: ?Object;
|
|
computed?: {
|
|
[key: string]: Function | {
|
|
get?: Function;
|
|
set?: Function;
|
|
cache?: boolean
|
|
}
|
|
};
|
|
methods?: { [key: string]: Function };
|
|
watch?: { [key: string]: Function | string };
|
|
|
|
// DOM
|
|
el?: string | Element;
|
|
template?: string;
|
|
render: (h: () => VNode) => VNode;
|
|
renderError?: (h: () => VNode, err: Error) => VNode;
|
|
staticRenderFns?: Array<() => VNode>;
|
|
|
|
// lifecycle
|
|
beforeCreate?: Function;
|
|
created?: Function;
|
|
beforeMount?: Function;
|
|
mounted?: Function;
|
|
beforeUpdate?: Function;
|
|
updated?: Function;
|
|
activated?: Function;
|
|
deactivated?: Function;
|
|
beforeDestroy?: Function;
|
|
destroyed?: Function;
|
|
|
|
// assets
|
|
directives?: { [key: string]: Object };
|
|
components?: { [key: string]: Class<Component> };
|
|
transitions?: { [key: string]: Object };
|
|
filters?: { [key: string]: Function };
|
|
|
|
// context
|
|
provide?: Object | () => Object;
|
|
inject?: { [key: string]: string } | Array<string>;
|
|
|
|
// component v-model customization
|
|
model?: {
|
|
prop?: string;
|
|
event?: string;
|
|
};
|
|
|
|
// misc
|
|
parent?: Component;
|
|
mixins?: Array<Object>;
|
|
name?: string;
|
|
extends?: Class<Component> | Object;
|
|
delimiters?: [string, string];
|
|
|
|
// private
|
|
_isComponent?: true;
|
|
_propKeys?: Array<string>;
|
|
_parentVnode?: VNode;
|
|
_parentListeners?: ?Object;
|
|
_renderChildren?: ?Array<VNode>;
|
|
_componentTag: ?string;
|
|
_scopeId: ?string;
|
|
_base: Class<Component>;
|
|
_parentElm: ?Node;
|
|
_refElm: ?Node;
|
|
}
|
|
|
|
declare type PropOptions = {
|
|
type: Function | Array<Function> | null;
|
|
default: any;
|
|
required: ?boolean;
|
|
validator: ?Function;
|
|
}
|
|
|