1234567891011121314151617181920 |
- <template>
- <view class="content" style="margin-top: 30rpx;">
- <zzx-switch v-model="switchState" active-color="#6cb3f0" inactive-color="#909399"
- @change="handleSwitchChange" />
- </view>
- </template>
- <script setup lang="ts">
- import { ref } from 'vue'
- import zzxSwitch from '@/components/zzx-switch/zzx-switch.vue'
- const switchState = ref(false)
- const handleSwitchChange = (value : boolean) => {
- console.log('状态:', value)
- }
- </script>
- <style scoped>
- </style>
|