Files
heroui-vue/apps/docs/demos/switch-render-props.vue
T

17 lines
351 B
Vue

<script setup lang="ts">
import {
Switch,
SwitchContent,
SwitchControl,
SwitchThumb,
} from "@heroui-vue/components";
</script>
<template>
<Switch v-slot="{ isSelected }">
<SwitchContent>
<SwitchControl><SwitchThumb /></SwitchControl>
{{ isSelected ? "已开启" : "已关闭" }}
</SwitchContent>
</Switch>
</template>