2016-09-06 13:28:17 +00:00
|
|
|
import { Vue } from "./vue";
|
2016-08-23 19:01:30 +00:00
|
|
|
|
2016-11-25 17:08:42 +00:00
|
|
|
export type ScopedSlot = (props: any) => VNodeChildrenArrayContents | string;
|
|
|
|
|
|
|
|
export type VNodeChildren = VNodeChildrenArrayContents | [ScopedSlot] | string;
|
2017-12-20 14:09:23 +00:00
|
|
|
export interface VNodeChildrenArrayContents extends Array<VNode | string | VNodeChildrenArrayContents> {}
|
2016-08-23 19:01:30 +00:00
|
|
|
|
|
|
|
export interface VNode {
|
|
|
|
tag?: string;
|
|
|
|
data?: VNodeData;
|
|
|
|
children?: VNode[];
|
|
|
|
text?: string;
|
|
|
|
elm?: Node;
|
|
|
|
ns?: string;
|
|
|
|
context?: Vue;
|
|
|
|
key?: string | number;
|
|
|
|
componentOptions?: VNodeComponentOptions;
|
2017-01-12 23:04:36 +00:00
|
|
|
componentInstance?: Vue;
|
2016-08-23 19:01:30 +00:00
|
|
|
parent?: VNode;
|
|
|
|
raw?: boolean;
|
|
|
|
isStatic?: boolean;
|
|
|
|
isRootInsert: boolean;
|
|
|
|
isComment: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VNodeComponentOptions {
|
2016-11-20 16:59:10 +00:00
|
|
|
Ctor: typeof Vue;
|
2017-11-27 14:30:58 +00:00
|
|
|
propsData?: object;
|
|
|
|
listeners?: object;
|
2016-08-23 19:01:30 +00:00
|
|
|
children?: VNodeChildren;
|
|
|
|
tag?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VNodeData {
|
|
|
|
key?: string | number;
|
|
|
|
slot?: string;
|
2016-11-25 17:08:42 +00:00
|
|
|
scopedSlots?: { [key: string]: ScopedSlot };
|
2016-08-23 19:01:30 +00:00
|
|
|
ref?: string;
|
|
|
|
tag?: string;
|
|
|
|
staticClass?: string;
|
|
|
|
class?: any;
|
2016-11-07 21:13:04 +00:00
|
|
|
staticStyle?: { [key: string]: any };
|
2017-11-27 14:30:58 +00:00
|
|
|
style?: object[] | object;
|
2016-08-23 19:01:30 +00:00
|
|
|
props?: { [key: string]: any };
|
|
|
|
attrs?: { [key: string]: any };
|
|
|
|
domProps?: { [key: string]: any };
|
|
|
|
hook?: { [key: string]: Function };
|
|
|
|
on?: { [key: string]: Function | Function[] };
|
|
|
|
nativeOn?: { [key: string]: Function | Function[] };
|
2017-11-27 14:30:58 +00:00
|
|
|
transition?: object;
|
2016-08-23 19:01:30 +00:00
|
|
|
show?: boolean;
|
|
|
|
inlineTemplate?: {
|
|
|
|
render: Function;
|
|
|
|
staticRenderFns: Function[];
|
|
|
|
};
|
|
|
|
directives?: VNodeDirective[];
|
|
|
|
keepAlive?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VNodeDirective {
|
2018-10-22 20:09:23 +00:00
|
|
|
name: string;
|
|
|
|
value?: any;
|
|
|
|
oldValue?: any;
|
|
|
|
expression?: any;
|
|
|
|
arg?: string;
|
|
|
|
modifiers?: { [key: string]: boolean };
|
2016-08-23 19:01:30 +00:00
|
|
|
}
|