import { PropType } from 'vue' import { commonProps } from '../../common/props'; export type ButtonShape = 'default' | 'round' | 'icon' export const buttonProps = { // 按钮索引,用于区分多个按钮 index: { type: [Number, String], default: 0 }, // 按钮形状 default 默认 round 圆角 icon 图标按钮 shape: { type: String as PropType, default: 'default' }, // 是否加阴影 shadow: { type: Boolean, default: false }, // 宽度 rpx或% width: { type: String, default: 'auto' }, // 高度 rpx或% height: { type: String, default: '' }, // 按钮的尺寸 sm lg size: { type: String, default: '' }, // 字体是否加粗 fontBold: { type: Boolean, default: false }, padding: { type: String, default: '0 30rpx' }, // 外边距 与css的margin参数用法相同 margin: { type: String, default: '' }, // 是否镂空 plain: { type: Boolean, default: false }, // 当plain=true时,是否显示边框 border: { type: Boolean, default: true }, // 当plain=true时,是否加粗显示边框 borderBold: { type: Boolean, default: false }, // 是否禁用 disabled: { type: Boolean, default: false }, // 是否显示加载图标 loading: { type: Boolean, default: false }, // 触发form表单的事件类型 formType: { type: String, default: '' }, // 开放能力 openType: { type: String, default: '' }, // 是否阻止重复点击(默认间隔是200ms) blockRepeatClick: { type: Boolean, default: false }, ...commonProps }