index.d.ts 1.1KB

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