遵循 RTK 设计系统的开关组件。
| 属性 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
checked |
boolean |
✅ | - | 开关是否已启用/选中 |
disabled |
boolean |
✅ | - | 开关是否为只读 |
iconPack |
IconPack |
❌ | defaultIconPack |
图标包 |
readonly |
boolean |
✅ | - | 开关是否为只读 |
t |
RtkI18n |
❌ | useLanguage() |
语言 |
<!-- component.html -->
<rtk-switch></rtk-switch><!-- component.html -->
<rtk-switch
[checked]="true"
[disabled]="true"
[readonly]="true">
</rtk-switch>