prompt.d.ts 850 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * 弹窗prompt 请求参数定义
  3. * @apiName device.notification.prompt
  4. */
  5. export interface IDeviceNotificationPromptParams {
  6. /** 消息内容 */
  7. message: string;
  8. /** 标题 */
  9. title?: string;
  10. /** 默认提示 */
  11. defaultText?: string;
  12. /** 按钮名称 */
  13. buttonLabels?: string[];
  14. }
  15. /**
  16. * 弹窗prompt 返回结果定义
  17. * @apiName device.notification.prompt
  18. */
  19. export interface IDeviceNotificationPromptResult {
  20. /** 被点击按钮的索引值,Number类型,从0开始 */
  21. buttonIndex: number;
  22. /** 输入的值 */
  23. value: string;
  24. }
  25. /**
  26. * 弹窗prompt
  27. * @apiName device.notification.prompt
  28. * @supportVersion pc: 2.7.0 ios: 2.4.0 android: 2.4.0
  29. */
  30. export declare function prompt$(params: IDeviceNotificationPromptParams): Promise<IDeviceNotificationPromptResult>;
  31. export default prompt$;