show.d.ts 954 B

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