目录
- <template>
- <view class="switchBox">
- <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>