# 4.5 开关栏(Switch Bar)
带图标的开关组件
# 基础用法
<template>
<dof-switch-bar v-model="checked"></dof-switch-bar>
</template>
1
2
3
2
3
# Attributes
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
icon-on | String | N | 内置图标 | 开启状态图标 |
icon-off | String | N | 内置图标 | 关闭状态图标 |
width | String | N | 106 | 宽度 |
height | String | N | 48 | 高度 |
checked | Boolean | N | false | 是否选中 |
# Events
| 事件名 | 说明 | 回调参数 |
|---|---|---|
dofChange | 状态变化事件 | e |