UNPKG

@tplc/wot

Version:

134 lines (133 loc) 2.98 kB
import type { ExtractPropTypes } from 'vue' export type ButtonType = | 'primary' | 'success' | 'info' | 'warning' | 'error' | 'default' | 'text' | 'icon' export type ButtonSize = 'small' | 'medium' | 'large' export declare const buttonProps: { /** * 幽灵按钮 */ plain: { type: BooleanConstructor default: boolean } /** * 圆角按钮 */ round: { type: BooleanConstructor default: boolean } /** * 禁用按钮 */ disabled: { type: BooleanConstructor default: boolean } /** * 是否细边框 */ hairline: { type: BooleanConstructor default: boolean } /** * 块状按钮 */ block: { type: BooleanConstructor default: boolean } /** * 按钮类型,可选值:primary / success / info / warning / error / text / icon */ type: { type: import('vue').PropType<ButtonType> default: ButtonType } /** * 按钮尺寸,可选值:small / medium / large */ size: { type: import('vue').PropType<ButtonSize> default: ButtonSize } /** * 图标类名 */ icon: StringConstructor /** * 类名前缀,用于使用自定义图标,用法参考Icon组件 */ classPrefix: { type: import('vue').PropType<string> default: string } /** * 加载中按钮 */ loading: { type: BooleanConstructor default: boolean } /** * 加载图标颜色 */ loadingColor: StringConstructor /** * 开放能力 */ openType: StringConstructor /** * 指定是否阻止本节点的祖先节点出现点击态 */ hoverStopPropagation: BooleanConstructor /** * 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文 */ lang: StringConstructor /** * 会话来源,open-type="contact"时有效 */ sessionFrom: StringConstructor /** * 会话内消息卡片标题,open-type="contact"时有效 */ sendMessageTitle: StringConstructor /** * 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 */ sendMessagePath: StringConstructor /** * 会话内消息卡片图片,open-type="contact"时有效 */ sendMessageImg: StringConstructor /** * 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 */ appParameter: StringConstructor /** * 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,open-type="contact"时有效 */ showMessageCard: BooleanConstructor /** * 按钮的唯一标识,可用于设置隐私同意授权按钮的id */ buttonId: StringConstructor customStyle: { type: import('vue').PropType<string> default: string } customClass: { type: import('vue').PropType<string> default: string } } export type ButtonProps = ExtractPropTypes<typeof buttonProps>