基本形式

<jr-badge text="default" type="default" />
<jr-badge text="primary" type="primary" />
<jr-badge text="info" type="info" />
<jr-badge text="success" type="success" />
<jr-badge text="warning" type="warning" />
<jr-badge text="error" type="error" />

圆角

<jr-badge text="circle" circle={true} />
<jr-badge text="circle" circle={true} type="primary" />
<jr-badge text="circle" circle={true} type="info" />
<jr-badge text="circle" circle={true} type="success" />
<jr-badge text="circle" circle={true} type="warning" />
<jr-badge text="circle" circle={true} type="error" />

API

KLBadge

Kind: global class
Extend: Component

new KLBadge()

Param Type Default Description
[options.data] object = 绑定属性
[options.data.text] string "–" <=> 内容
[options.data.circle] boolean false => 是否圆角
[options.data.type] string "default" => 文本样式