guide.d.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /// <reference types="miniprogram-api-typings" />
  2. import { SuperComponent } from '../common/src/index';
  3. import { TdGuideProps, GuideStep } from './type';
  4. export interface GuideProps extends TdGuideProps {
  5. }
  6. export { GuideStep };
  7. export default class Guide extends SuperComponent {
  8. externalClasses: string[];
  9. properties: TdGuideProps;
  10. options: WechatMiniprogram.Component.ComponentOptions;
  11. data: {
  12. prefix: string;
  13. classPrefix: string;
  14. visible: boolean;
  15. _current: number;
  16. _steps: any[];
  17. buttonProps: {};
  18. referenceStyle: string;
  19. popoverStyle: string;
  20. title: string;
  21. body: string;
  22. nonOverlay: boolean;
  23. modeType: string;
  24. };
  25. controlledProps: {
  26. key: string;
  27. event: string;
  28. }[];
  29. observers: {
  30. 'steps, current, showOverlay'(): Promise<void>;
  31. };
  32. lifetimes: {
  33. created(): void;
  34. attached(): void;
  35. };
  36. methods: {
  37. init(): Promise<any>;
  38. placementOffset({ placement, offset }: GuideStep, place: CSSStyleDeclaration): Promise<string>;
  39. buttonProps(step: any, mode: any): {
  40. skipButton: any;
  41. nextButton: any;
  42. backButton: any;
  43. finishButton: any;
  44. };
  45. renderCounter(): any;
  46. buttonContent(button: any): string;
  47. onTplButtonTap(e: any): void;
  48. getPlacement(): {
  49. center: (rect: any, place: any, offset: any) => {
  50. top: string;
  51. left: string;
  52. };
  53. bottom: (rect: any, place: any, offset: any) => {
  54. top: string;
  55. left: string;
  56. };
  57. 'bottom-left': (rect: any, place: any, offset: any) => {
  58. top: string;
  59. left: string;
  60. };
  61. 'bottom-right': (rect: any, place: any, offset: any) => {
  62. top: string;
  63. right: string;
  64. };
  65. left: (rect: any, place: any, offset: any) => {
  66. top: string;
  67. right: string;
  68. };
  69. 'left-top': (rect: any, place: any, offset: any) => {
  70. top: string;
  71. right: string;
  72. };
  73. 'left-bottom': (rect: any, place: any, offset: any) => {
  74. bottom: string;
  75. right: string;
  76. };
  77. right: (rect: any, place: any, offset: any) => {
  78. top: string;
  79. left: string;
  80. };
  81. 'right-top': (rect: any, place: any, offset: any) => {
  82. top: string;
  83. left: string;
  84. };
  85. 'right-bottom': (rect: any, place: any, offset: any) => {
  86. bottom: string;
  87. left: string;
  88. };
  89. top: (rect: any, place: any, offset: any) => {
  90. bottom: string;
  91. left: string;
  92. };
  93. 'top-left': (rect: any, place: any, offset: any) => {
  94. bottom: string;
  95. left: string;
  96. };
  97. 'top-right': (rect: any, place: any, offset: any) => {
  98. bottom: string;
  99. right: string;
  100. };
  101. };
  102. };
  103. }