setMenu.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * 设置导航栏右侧多个按钮 请求参数定义
  3. * @apiName biz.navigation.setMenu
  4. */
  5. export interface IBizNavigationSetMenuParams {
  6. /** 下拉菜单背景色,例如#ADD8E6 */
  7. backgroundColor?: string;
  8. /** 下拉菜单文字颜色 例如#ADD8E611 */
  9. textColor?: string;
  10. /** 多个按钮的属性数组 */
  11. items: Array<{
  12. /** 每一个item的唯一标示 */
  13. id: string;
  14. /** 钉钉预置icon的索引值 */
  15. iconId?: string;
  16. /** item的文字属性 */
  17. text: string;
  18. /** 是否显示红点 */
  19. showRedDot?: boolean;
  20. /** badge 内容 */
  21. badge?: string;
  22. /** 定义图标url */
  23. url?: string;
  24. }>;
  25. /** 点击任一一个按钮将会回调onSuccess,并返回被点击item的id */
  26. onSuccess?: (data: IBizNavigationSetMenuResult) => void;
  27. }
  28. /**
  29. * 设设置导航栏右侧多个按钮 返回结果定义
  30. * @apiName biz.navigation.setMenu
  31. */
  32. export interface IBizNavigationSetMenuResult {
  33. id: string;
  34. }
  35. /**
  36. * 设置导航栏右侧多个按钮
  37. * 每一个item对应右上角的一个按钮
  38. * @apiName biz.navigation.setMenu
  39. * @supportVersion ios: 2.6.0 android: 2.6.0
  40. */
  41. export declare function setMenu$(params: IBizNavigationSetMenuParams): Promise<IBizNavigationSetMenuResult>;
  42. export default setMenu$;