Switch 开关

Switch 开关

何时使用

  • 需要表示两种互斥状态(开/关)的切换时。

基础用法

当前状态:开
<script setup lang="ts">
import { ref } from "vue";
const checked = ref(true);
</script>

<template>
  <Switch v-model="checked" />
</template>

导入

import { Switch } from "@reglow/reui";

Props

属性类型默认值说明
modelValuebooleanfalse开关状态(v-model)
disabledbooleanfalse禁用