/* tslint:disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface Button { /** * 按钮的大小 */ size?: "default" | "mini"; /** * 按钮的样式类型 */ type?: "primary" | "default" | "warn"; /** * 按钮是否镂空,背景色透明 */ plain?: boolean; /** * 是否禁用 */ disabled?: boolean; /** * loading 动画样式暂未支持 */ loading?: boolean; /** * 用于 form 组件,点击分别会触发 form 组件的 submit/reset 事件 */ "form-type"?: "submit" | "reset"; /** * 微信开放能力 */ "open-type"?: | "contact" | "share" | "getPhoneNumber" | "getUserInfo" | "launchApp" | "openSetting" | "feedback" | "chooseAvatar"; /** * 指定按钮按下去的样式类。当 `hover-class="none"` 时,没有点击态效果 */ "hover-class"?: string; /** * 指定是否阻止本节点的祖先节点出现点击态 */ "hover-stop-propagation"?: boolean; /** * 按住后多久出现点击态,单位毫秒 */ "hover-start-time"?: number; /** * 手指松开后点击态保留时间,单位毫秒 */ "hover-stay-time"?: number; /** * 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。 */ lang?: "en" | "zh_CN" | "zh_TW"; /** * 会话来源,open-type="contact"时有效 */ "session-from"?: string; /** * 会话内消息卡片标题,open-type="contact"时有效 */ "send-message-title"?: string; /** * 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 */ "send-message-path"?: string; /** * 会话内消息卡片图片,open-type="contact"时有效 */ "send-message-img"?: string; /** * 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 */ "app-parameter"?: string; /** * 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,open-type="contact"时有效 */ "show-message-card"?: boolean; /** * 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与wx.getUserInfo返回的一致,open-type="getUserInfo"时有效 */ bindGetUserInfo?: () => void; /** * 客服消息回调,open-type="contact"时有效 */ bindContact?: () => void; /** * 获取用户手机号回调,open-type=getPhoneNumber时有效 */ bindGetPhoneNumber?: () => void; /** * 当使用开放能力时,发生错误的回调,open-type=launchApp时有效 */ bindError?: () => void; /** * 在打开授权设置页后回调,open-type=openSetting时有效 */ bindOpenSetting?: () => void; /** * 打开 APP 成功的回调,open-type=launchApp时有效 */ bindLaunchApp?: () => void; /** * 获取用户头像回调,open-type=chooseAvatar时有效 */ bindChooseAvatar?: () => void; }