message.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /// <reference types="miniprogram-api-typings" />
  2. import { SuperComponent } from '../common/src/index';
  3. import { MessageProps } from './message.interface';
  4. export default class Message extends SuperComponent {
  5. externalClasses: string[];
  6. options: {
  7. styleIsolation: "apply-shared";
  8. multipleSlots: boolean;
  9. };
  10. properties: MessageProps;
  11. data: {
  12. prefix: string;
  13. classPrefix: string;
  14. visible: boolean;
  15. loop: number;
  16. animation: any[];
  17. showAnimation: any[];
  18. iconName: string;
  19. wrapTop: number;
  20. };
  21. observers: {
  22. marquee(val: any): void;
  23. };
  24. /** 延时关闭句柄 */
  25. closeTimeoutContext: number;
  26. /** 动画句柄 */
  27. nextAnimationContext: number;
  28. resetAnimation: WechatMiniprogram.Animation;
  29. showAnimation: WechatMiniprogram.AnimationExportResult;
  30. hideAnimation: WechatMiniprogram.AnimationExportResult;
  31. ready(): void;
  32. /** 记录组件设置的项目 */
  33. memoInitalData(): void;
  34. resetData(cb: () => void): void;
  35. detached(): void;
  36. /** icon 值设置 */
  37. setIcon(icon?: string | boolean): void;
  38. /** 检查是否需要开启一个新的动画循环 */
  39. checkAnimation(): void;
  40. /** 获取元素宽度 */
  41. queryWidth(queryName: string): Promise<number>;
  42. /** 获取元素长度 */
  43. queryHeight(queryName: string): Promise<number>;
  44. /** 清理动画循环 */
  45. clearMessageAnimation(): void;
  46. show(): void;
  47. hide(): void;
  48. reset(): void;
  49. handleClose(): void;
  50. handleBtnClick(): void;
  51. }