UNPKG

@opensig/opendesign

Version:

<p align="center"><img src="../docs/public/opendesign-logo-light.png"/></p> <h1 align="center">opendesign</h1> <p align="center">一个 Vue 3 组件库</p> <p align="center"><b>皮肤可定制,使用 TypeScript</b></p>

77 lines (76 loc) 1.77 kB
import { ExtractPropTypes, PropType, Component } from 'vue'; import { RoundT, ColorT, VariantT } from '../_utils/types'; export declare const ButtonSizeTypes: readonly ["large", "medium", "small"]; export type ButtonSizeT = (typeof ButtonSizeTypes)[number]; export declare const buttonProps: { /** * @zh-CN 颜色类型 * @en-US Color type * @default 'normal' */ color: { type: PropType<ColorT>; default: string; }; /** * @zh-CN 按钮类型 * @en-US Button type * @default 'outline' */ variant: { type: PropType<VariantT>; default: string; }; /** * @zh-CN 按钮尺寸 * @en-US Button size */ size: { type: PropType<ButtonSizeT>; }; /** * @zh-CN 圆角值 * @en-US Border radius */ round: { type: PropType<RoundT>; }; /** * @zh-CN 是否为加载状态 * @en-US Loading state */ loading: { type: BooleanConstructor; }; /** * @zh-CN 是否禁用 * @en-US Disabled state */ disabled: { type: BooleanConstructor; }; /** * @zh-CN 跳转链接,如果设置了此属性,则按钮会以 a 标签渲染 * @en-US Link to navigate, if set, the button will render as an anchor tag */ href: { type: StringConstructor; }; /** * @zh-CN 前缀图标 * @en-US Prefix icon */ icon: { type: PropType<Component>; }; /** * @zh-CN 自定义按钮渲染标签 * @en-US Custom button render tag * @default 'button' */ tag: { type: StringConstructor; default: string; }; }; export type ButtonPropsT = ExtractPropTypes<typeof buttonProps>;