import { AllowedComponentProps, VNodeProps } from 'vue' // import type { Type } from '../common' // 定义类型 declare type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' declare type ButtonSize = 'mini' | 'small' | 'medium' | 'large' declare type ButtonShape = 'square' | 'round' | 'circle' declare type ButtonFormType = 'submit' | 'reset' declare type ButtonOpenType = | 'contact' | 'share' | 'getPhoneNumber' | 'getUserInfo' | 'launchApp' | 'openSetting' | 'feedback' | 'chooseAvatar' declare type ButtonIconPosition = 'left' | 'right' declare type ButtonTextSize = 'small' | 'medium' | 'large' declare interface ButtonProps { // 基础属性 text?: string type?: ButtonType size?: ButtonSize shape?: ButtonShape disabled?: boolean loading?: boolean loadingText?: string loadingColor?: string showLoading?: boolean hideTextWhenLoading?: boolean block?: boolean plain?: boolean hairline?: boolean native?: boolean // 图标 icon?: string iconPosition?: ButtonIconPosition iconSize?: string | number // 样式 color?: string bgColor?: string borderColor?: string border?: boolean textColor?: string textSize?: ButtonTextSize width?: string height?: string padding?: string margin?: string radius?: string shadow?: string // 角标 badge?: boolean | number | string // 表单相关 formType?: ButtonFormType // 开放能力 openType?: ButtonOpenType appParameter?: string lang?: 'en' | 'zh_CN' | 'zh_TW' sessionFrom?: string sendMessageTitle?: string sendMessagePath?: string sendMessageImg?: string showMessageCard?: boolean // 交互效果 hoverClass?: string hoverStartTime?: number hoverStayTime?: number } declare interface ButtonEmits { (e: 'click', event: PointerEvent): void (e: 'getuserinfo', detail: any): void (e: 'contact', detail: any): void (e: 'getphonenumber', detail: any): void (e: 'error', detail: any): void (e: 'launchapp', detail: any): void (e: 'opensetting', detail: any): void (e: 'chooseavatar', detail: any): void } declare interface _Button { new(): { $props: AllowedComponentProps & VNodeProps & ButtonProps $emit: ButtonEmits } } export declare const Button: _Button export default Button export type { ButtonType, ButtonSize, ButtonShape, ButtonFormType, ButtonOpenType, ButtonIconPosition, ButtonTextSize, ButtonProps, ButtonEmits }