本组件库仅供学习交流,请勿在生产环境中使用
$ npm install zulu-vue-ui
$ yarn add zulu-vue-ui
<template>
<div>
<Switch v-model:value="switchValue" />
</div>
</template>
<script lang="ts" setup>
import { ref } from "vue";
import Switch from "zulu-vue-ui";
const switchValue = ref(false);
</script>需要注意的是,样式文件需要单独引入。
使用 zulu-vue-ui 时,需要使用 border-box 盒模型,否则会影响样式。代码示例:
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}如果您觉得还不错,请 star