组件
OneTag
OneTag 支持 neutral、primary、success、warning、error 五种状态与三种尺寸。
已发布默认待检查
查看代码收起代码
import { OneTag } from '@geektech/one';
new OneTag({ variant: 'success', closable: true, children: ['已发布'] });尺寸与关闭
closable 会显示原生关闭按钮;关闭后发出 close 事件并保留隐藏锚点。
API
| 名称 | 签名 | 说明 |
|---|---|---|
variant | variant?: OneDataDisplayVariant | neutral、primary、success、warning 或 error。 |
size | size?: OneComponentSize | sm、md 或 lg,默认 md。 |
closable | closable?: boolean | 显示可访问的关闭按钮。 |
children | children?: Array<VNode | string> | 标签内容。 |
close | () => void | 用户关闭标签时发出一次。 |