vue/flow/vnode.js

65 lines
1.5 KiB
JavaScript
Raw Normal View History

declare type VNodeChildren = Array<?VNode | string | VNodeChildren> | string
2016-05-14 15:08:21 +08:00
declare type VNodeComponentOptions = {
2016-07-26 09:28:46 +08:00
Ctor: Class<Component>;
propsData: ?Object;
listeners: ?Object;
children: ?VNodeChildren;
tag?: string;
2016-05-14 15:08:21 +08:00
}
2016-07-26 09:28:46 +08:00
declare type MountedComponentVNode = {
2016-05-14 15:08:21 +08:00
componentOptions: VNodeComponentOptions;
child: Component;
2016-05-14 19:40:56 +08:00
parent: VNode;
2016-06-04 22:47:14 +08:00
data: VNodeData;
2016-05-14 15:08:21 +08:00
}
2016-05-14 15:38:41 +08:00
// interface for vnodes in update modules
2016-07-26 09:28:46 +08:00
declare type VNodeWithData = {
2016-05-14 15:38:41 +08:00
tag: string;
data: VNodeData;
children: Array<VNode> | void;
text: void;
2016-05-14 19:40:56 +08:00
elm: HTMLElement;
2016-05-14 15:38:41 +08:00
ns: string | void;
context: Component;
key: string | number | void;
2016-05-14 19:40:56 +08:00
parent?: VNodeWithData;
2016-06-02 06:20:13 +08:00
child?: Component;
isRootInsert: boolean;
2016-05-14 15:38:41 +08:00
}
2016-05-14 15:08:21 +08:00
declare interface VNodeData {
key?: string | number;
slot?: string;
ref?: string;
tag?: string;
2016-05-14 15:08:21 +08:00
staticClass?: string;
class?: any;
style?: Array<Object> | Object;
show?: true;
props?: { [key: string]: any };
attrs?: { [key: string]: string };
2016-07-20 05:52:10 +08:00
domProps?: { [key: string]: any };
2016-05-14 15:08:21 +08:00
hook?: { [key: string]: Function };
on?: ?{ [key: string]: Function | Array<Function> };
nativeOn?: { [key: string]: Function | Array<Function> };
2016-07-16 05:48:42 +08:00
transition?: Object;
transitionInjected?: boolean;
2016-05-14 15:08:21 +08:00
inlineTemplate?: {
2016-07-26 09:28:46 +08:00
render: Function;
staticRenderFns: Array<Function>;
2016-05-14 15:08:21 +08:00
};
2016-05-14 19:40:56 +08:00
directives?: Array<VNodeDirective>;
2016-06-04 22:47:14 +08:00
keepAlive?: boolean;
2016-05-14 19:40:56 +08:00
}
declare type VNodeDirective = {
2016-07-26 09:28:46 +08:00
name: string;
value?: any;
oldValue?: any;
arg?: string;
modifiers?: { [key: string]: boolean };
2016-05-14 15:08:21 +08:00
}