Enterprise UI
指南组件面试复习GitHub
开始
介绍快速开始主题定制Changeset 版本管理Turborepo + Changesets 发包方案
基础组件
Button 按钮Input 输入框Calendar 日历VirtualList 虚拟列表FileUploader 大文件上传Theme 全局换肤
FCP 的优化LCP 的优化INP 的优化FPS 的优化Service Worker 面试题Service WorkerCPU 密集型与 IO 密集型任务preload / prefetch / async / defer
CI/CD 优化
I18N 技术总结Next.js SSR 国际化优化 P7Next.js SSR 国际化优化 P7 详细版国际化 I18N 面试版本本地启动拉最新 json清理 LRU 缓存方法SSR 国际化 - 翻译缺失检查脚本

Released under the MIT License.

Copyright © 2026 Enterprise UI

Button 按钮

按钮用于触发一个操作。

基础用法

import { Button } from '@enterprise-ui/react19';

<Button>默认按钮</Button>
<Button color="primary">主要按钮</Button>
<Button color="success">成功按钮</Button>

尺寸

按钮提供三种尺寸:small、medium、large。

变体

按钮提供四种变体:solid、outline、ghost、text。

禁用状态

加载状态

API

Button Props

参数说明类型默认值
size按钮尺寸'small' | 'medium' | 'large''medium'
color按钮颜色'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info''primary'
variant按钮变体'solid' | 'outline' | 'ghost' | 'text''solid'
disabled是否禁用booleanfalse
loading是否加载中booleanfalse
onClick点击事件(e: React.MouseEvent<HTMLButtonElement>) => void-
type按钮类型'button' | 'submit' | 'reset''button'