Skip to content

Switch 开关组件

开关组件,开/关切换、自定义颜色和文字。

基础用法

vue
<template>
  <parrot-switch />
</template>

API

Props

属性类型默认值说明
modelValuebooleanfalse开关状态(v-model)
disabledbooleanfalse禁用
sizestring'md'尺寸
activeColorstring'#1a7eff'激活颜色
inactiveColorstring'#e5e7eb'未激活颜色

Slots

插槽说明
default默认内容

Released under the MIT License.