效果图:
调整大小
或添加:style=“zoom:.6”
<template>
<view class="switchBox">
<!-- <switch @change="switchChange" color="#F21177" :checked="form.checked" style="zoom:.6" /> -->
<switch @change="switchChange" color="#F21177" :checked="form.checked" />
</view>
</template>
<script>
export default {
data(){
return{
form: {
checked: false,
},
}
},
methods: {
//change方法
switchChange(e) {
console.log(e,e.detail.value,'85');
},
}
}
</script>
<style>
.switchBox{
// 调整大小
transform: scale(0.8,0.8)
}
</style>