sticky.d.ts 968 B

1234567891011121314151617181920212223242526272829303132333435
  1. /// <reference types="miniprogram-api-typings" />
  2. import { SuperComponent } from '../common/src/index';
  3. declare type ContainerRef = () => WechatMiniprogram.NodesRef;
  4. interface StickyProps {
  5. zIndex: number;
  6. disabled: boolean;
  7. container: ContainerRef;
  8. offsetTop: number;
  9. }
  10. export default class Sticky extends SuperComponent {
  11. externalClasses: string[];
  12. properties: StickyProps;
  13. behaviors: string[];
  14. observers: {
  15. 'offsetTop, disabled, container': (event?: {
  16. scrollTop: number;
  17. }) => void;
  18. };
  19. data: {
  20. containerStyle: string;
  21. contentStyle: string;
  22. classPrefix: string;
  23. };
  24. mounted(): void;
  25. onScroll(event?: {
  26. scrollTop: number;
  27. }): void;
  28. setDataAfterDiff(data: {
  29. isFixed: boolean;
  30. height?: number;
  31. transform?: number;
  32. }): void;
  33. getContainerRect(): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;
  34. }
  35. export {};