import { Component } from 'vue'; import { ButtonType } from 'element-plus'; import { CompSize } from '../../utils'; export interface ButtonProps { /** 继承 el-button 的颜色, 可以配合 main, secondary, text 使用 */ type?: ButtonType; /** 主要按钮, main, secondary, text, icon 不能同时使用 */ main?: boolean; /** 次要按钮 */ secondary?: boolean; /** 虚线按钮 */ dashed?: boolean; /** 文字按钮 */ text?: boolean; /** 链接按钮 */ link?: boolean; /** icon按钮 */ icon?: boolean; /** 按钮尺寸,可选值为: */ size?: CompSize; /** 文字左边图标. 例如:'iconAdd' */ iconLeft?: string | Component; /** 文字右边图标, 例如:'IconArrowBottom' */ iconRight?: string | Component; /** 按钮内容 */ value?: string | number; /** 禁止点击 */ disabled?: boolean; /** 按钮加载 */ loading?: boolean; /** 加载图标 */ loadingIcon?: string | Component; /** 十六进制颜色: 例如 #ff5500 */ color?: string; /** 用于text按钮,hover 时是否显示背景色 */ bg?: boolean; /** 用于text按钮,hover 时是否显示阴影 */ shadow?: boolean; /** 是否使用浏览器按钮默认样式 */ useDefaultStyle?: boolean; /** 两个文字之间是否自动添加空格(只有两个字符且均为中文时生效) */ autoInsertSpace?: boolean; /** 自定义元素标签 */ tag?: string | Component; } export type ButtonStatus = 'main' | 'secondary' | 'dashed' | 'text' | 'link' | 'icon';