toast.d.ts 1.0 KB

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Toast 请求参数定义
  3. * @apiName device.notification.toast
  4. */
  5. export interface IDeviceNotificationToastParams {
  6. /** 移动端 icon样式,有success和error,默认为空 0.0.2, PC端参数则代表样式类型 */
  7. icon?: 'success' | 'error';
  8. /** @deprecated PC端参数特有 toast的类型 alert, success, error, warning, information, confirm */
  9. type?: 'alert' | 'success' | 'error' | 'warning' | 'information';
  10. /** 提示信息 */
  11. text?: string;
  12. /** 显示持续时间,单位秒,默认按系统规范[android只有两种(<=2s >2s)] */
  13. duration?: number;
  14. /** 延迟显示,单位秒,默认0 */
  15. delay?: number;
  16. }
  17. /**
  18. * Toast 返回结果定义
  19. * @apiName device.notification.toast
  20. */
  21. export interface IDeviceNotificationToastResult {
  22. }
  23. /**
  24. * Toast
  25. * @apiName device.notification.toast
  26. * @supportVersion pc: 2.5.0 ios: 2.4.0 android: 2.4.0
  27. */
  28. export declare function toast$(params: IDeviceNotificationToastParams): Promise<IDeviceNotificationToastResult>;
  29. export default toast$;