mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-09 15:37:35 +08:00
11614d63b7
Note this does not support modifiers and is meant to be used for handling events proxying in higher-order-components.
79 lines
1.8 KiB
JavaScript
79 lines
1.8 KiB
JavaScript
declare type VNodeChildren = Array<?VNode | string | VNodeChildren> | string;
|
|
|
|
declare type VNodeComponentOptions = {
|
|
Ctor: Class<Component>;
|
|
propsData: ?Object;
|
|
listeners: ?Object;
|
|
children: ?Array<VNode>;
|
|
tag?: string;
|
|
};
|
|
|
|
declare type MountedComponentVNode = {
|
|
context: Component;
|
|
componentOptions: VNodeComponentOptions;
|
|
componentInstance: Component;
|
|
parent: VNode;
|
|
data: VNodeData;
|
|
};
|
|
|
|
// interface for vnodes in update modules
|
|
declare type VNodeWithData = {
|
|
tag: string;
|
|
data: VNodeData;
|
|
children: ?Array<VNode>;
|
|
text: void;
|
|
elm: any;
|
|
ns: string | void;
|
|
context: Component;
|
|
key: string | number | void;
|
|
parent?: VNodeWithData;
|
|
componentOptions?: VNodeComponentOptions;
|
|
componentInstance?: Component;
|
|
isRootInsert: boolean;
|
|
};
|
|
|
|
declare interface VNodeData {
|
|
key?: string | number;
|
|
slot?: string;
|
|
ref?: string;
|
|
is?: string;
|
|
pre?: boolean;
|
|
tag?: string;
|
|
staticClass?: string;
|
|
class?: any;
|
|
staticStyle?: { [key: string]: any };
|
|
style?: Array<Object> | Object;
|
|
normalizedStyle?: Object;
|
|
props?: { [key: string]: any };
|
|
attrs?: { [key: string]: string };
|
|
domProps?: { [key: string]: any };
|
|
hook?: { [key: string]: Function };
|
|
on?: ?{ [key: string]: Function | Array<Function> };
|
|
nativeOn?: { [key: string]: Function | Array<Function> };
|
|
transition?: Object;
|
|
show?: boolean; // marker for v-show
|
|
inlineTemplate?: {
|
|
render: Function;
|
|
staticRenderFns: Array<Function>;
|
|
};
|
|
directives?: Array<VNodeDirective>;
|
|
keepAlive?: boolean;
|
|
scopedSlots?: { [key: string]: Function };
|
|
model?: {
|
|
value: any;
|
|
callback: Function;
|
|
};
|
|
};
|
|
|
|
declare type VNodeDirective = {
|
|
name: string;
|
|
rawName: string;
|
|
value?: any;
|
|
oldValue?: any;
|
|
arg?: string;
|
|
modifiers?: ASTModifiers;
|
|
def?: Object;
|
|
};
|
|
|
|
declare type ScopedSlotsData = Array<{ key: string, fn: Function } | ScopedSlotsData>;
|