index.d.ts
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/// <reference types="miniprogram-api-typings" />
interface VantComponentInstance {
parent: WechatMiniprogram.Component.TrivialInstance;
children: WechatMiniprogram.Component.TrivialInstance[];
index: number;
$emit: (
name: string,
detail?: unknown,
options?: WechatMiniprogram.Component.TriggerEventOption
) => void;
}
export declare type VantComponentOptions<
Data extends WechatMiniprogram.Component.DataOption,
Props extends WechatMiniprogram.Component.PropertyOption,
Methods extends WechatMiniprogram.Component.MethodOption
> = {
data?: Data;
field?: boolean;
classes?: string[];
mixins?: string[];
props?: Props;
relation?: {
relations: Record<string, WechatMiniprogram.Component.RelationOption>;
mixin: string;
};
methods?: Methods;
beforeCreate?: () => void;
created?: () => void;
mounted?: () => void;
destroyed?: () => void;
} & ThisType<
VantComponentInstance &
WechatMiniprogram.Component.Instance<
Data & {
name: string;
value: any;
},
Props,
Methods
> &
Record<string, any>
>;
export {};