show.d.ts 949 B

1234567891011121314151617181920212223242526
  1. /// <reference types="miniprogram-api-typings" />
  2. /// <reference types="miniprogram-api-typings" />
  3. import { ActionSheetItem } from './type';
  4. export { ActionSheetItem };
  5. declare type Context = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
  6. export declare enum ActionSheetTheme {
  7. List = "list",
  8. Grid = "grid"
  9. }
  10. interface ActionSheetProps {
  11. align: 'center' | 'left';
  12. cancelText?: string;
  13. count?: number;
  14. description: string;
  15. items: Array<string | ActionSheetItem>;
  16. showCancel?: boolean;
  17. theme?: ActionSheetTheme;
  18. visible: boolean;
  19. defaultVisible?: boolean;
  20. }
  21. export interface ActionSheetShowOption extends Omit<ActionSheetProps, 'visible'> {
  22. context?: Context;
  23. selector?: string;
  24. }
  25. export declare const show: (options: ActionSheetShowOption) => WechatMiniprogram.Component.TrivialInstance;
  26. export declare const close: (options: ActionSheetShowOption) => void;