interface.uts 585 B

1234567891011121314151617181920212223242526272829
  1. export type ShareWithSystemOptions = {
  2. /**
  3. * 分享类型:
  4. * text(文本) | image(图片) | video(视频) | audio(音频) | file(文件) | link(链接)
  5. */
  6. type: string;
  7. /**
  8. * 分享标题
  9. */
  10. title?: string;
  11. /**
  12. * 分享描述或内容
  13. */
  14. summary?: string;
  15. /**
  16. * 分享资源路径:
  17. * 如果是图片/视频/音频/文件,填写资源路径或网络URL
  18. * 如果是link,填写链接地址
  19. */
  20. url?: string;
  21. /**
  22. * 分享成功回调
  23. */
  24. success?: () => void;
  25. /**
  26. * 分享失败回调,返回错误信息
  27. */
  28. fail?: (error: string) => void;
  29. };