示例
语义状态标签
PCPhonePad
<page>
<module title="语义状态标签">
<tag type="status" status="info" text="普通"></tag>
<tag type="status" status="info-secondary" text="普通-二级"></tag>
<tag type="status" status="info-tertiary" text="普通-三级"></tag>
<tag type="status" status="info-fourth" text="普通-四级"></tag>
<tag type="status" status="warning" text="警告"></tag>
<tag type="status" status="warning-secondary" text="警告-二级"></tag>
<tag type="status" status="success" text="成功"></tag>
<tag type="status" status="success-secondary" text="成功-二级"></tag>
<tag type="status" status="danger" text="危险"></tag>
<tag type="status" status="danger" text="危险" tips='提示内容'></tag>
</module>
</page>
export default XPage({
});
分类标签
PCPhonePad
<page>
<module title="语义状态标签">
<tag status="gray" text="灰色" @click="()=>{clickEvt(7)}"></tag>
<tag status="blue" text="蓝色" @click="()=>{clickEvt(7)}"></tag>
<tag status="indigo" text="蓝紫色" @click="()=>{clickEvt(7)}"></tag>
<tag status="purple" text="紫色" @click="()=>{clickEvt(7)}"></tag>
<tag status="orange" text="橙色" @click="()=>{clickEvt(4)}"></tag>
<tag status="yellow" text="黄色" @click="()=>{clickEvt(5)}"></tag>
<tag status="green" text="绿色" @click="()=>{clickEvt(6)}"></tag>
<tag status="teal" text="青色" @click="()=>{clickEvt(7)}"></tag>
<tag status="red" text="红色" @click="()=>{clickEvt(1)}"></tag>
</module>
</page>
export default XPage({
});
Attributes
属性 | 说明 | 类型 | 可选值 | 默认值 | 端 | 版本 |
---|---|---|---|---|---|---|
type | 类型 | String | normal/status | normal | PC/Mobile | -- |
status | 状态 | String | 请看status属性说明 | -- | PC/Mobile | -- |
text | 文案 | String | -- | -- | PC/Mobile | -- |
tips | 文案 | String | -- | -- | PC | -- |
Attributes - status
type值为 | status可选值 | 端 | 版本 |
---|---|---|---|
normal(分类标签) | red/orange/yellow/green/teal/blue/indigo/purple/gray | PC/Mobile | -- |
status(语义状态标签) | info/info-secondary/info-tertiary/info-fourth/warning/warning-secondary/success/success-secondary/danger | PC/Mobile | -- |
Events
名称 | 说明 | 回调参数 | 端 | 版本 |
---|---|---|---|---|
click | 点击tag标签 | -- | PC/Mobile | -- |