<template> <view class="demo"> <view class="choiceBox"> <checkbox-group class="choice" @change="checkboxChange"> <image src="../../static/img/gouxuan_s.png" mode="" class="img" v-if="checkboxIndex == 0"></image> <image src="../../static/img/gouxuan_n.png" mode="" class="img" v-if="checkboxIndex == 1"></image> <checkbox value="cb" checked="true" class="checkbox" /><text class="txt" @click="pactClick()">本人已认真阅览图纸,认同图纸设计</text> </checkbox-group> </view> </view> </template> <script> export default { components: { }, data() { return { pageNum: 1, checkboxIndex: "0", } }, // 页面加载 onLoad(e) { uni.hideTabBar(); //不让底部显示tab选项 }, // 页面显示 onShow() { }, // 方法 methods: { // 点击审批合同 checkboxChange(e) { var values = e.detail.value; if (values.length > 0) { console.log("选中") this.checkboxIndex = 0 } else { this.checkboxIndex = 1 console.log("未选中") } console.log(values, '98') }, }, // 计算属性 computed: { }, // 侦听器 watch: { }, // 页面隐藏 onHide() { }, // 页面卸载 onUnload() { }, // 触发下拉刷新 onPullDownRefresh() { this.pageNum = 1 this.getListData() }, // 页面上拉触底事件的处理函数 onReachBottom() { this.pageNum++ this.getListData() }, } </script> <style lang="scss" scoped> .demo {} </style>