UNPKG

hybrid_plus

Version:

Hybrid Flutter Javascript SDK

59 lines (58 loc) 1.47 kB
/** * 按钮类型 * @param custom 自定义按钮 * @param system 系统按钮 * @param dropdown 下拉菜单按钮 */ export declare enum ButtonType { custom = 0, system = 1, dropdown = 2 } /** * 系统按钮 * @param share 分享按钮 * @param close 关闭按钮 * @param refresh 刷新按钮 */ export declare enum SystemAction { share = 0, close = 1, refresh = 2 } /** * 标题栏右侧操作按钮配置 * @param {ButtonType} type 按钮类型 * @param {string} icon 展示在按钮上的图标 * @param {string} text 当 type 为 text 时展示在按钮上的文字,当 type 为 icon 时为长按按钮时的提示文字 * @param {string} onPressed 按钮点击事件,方法名需挂载到 window 下,否则无法正常触发 */ export interface HybridButton { color?: string; type: ButtonType; icon?: string; text?: string; onPressed: string | SystemAction; tooltip?: string; items: DropdownMenuItem[]; } /** * 下拉菜单项 * @description 由 [DropdownButton] 创建的菜单中的项目 * @param text 选项展示文字 * @param value 选项值 * @param enabled 是否可选 */ export interface DropdownMenuItem { text: string; value: any; enabled?: boolean; } /** * 指定系统覆盖样式的首选项。 * @description 一般可以用来修改状态栏文字的颜色 */ export declare enum SystemUIOverlayStyle { dark = "dark", light = "light" }