<template> <tm-app> <tm-tabbar :showSafe="true" :autoSelect="false" v-model:active="acc"> <tm-tabbar-item @click="acc = 0" activeColor="#EB783C" open-type="reLaunch" text="选票" > <div style="width: 52rpx;height: 52rpx"> <img v-if="acc===0" style="width: 100%;height: 100%" src="../../static/zu618.png" alt=""> <img v-else style="width: 100%;height: 100%" src="../../static/zu759@3x (1).png" alt=""> </div> </tm-tabbar-item> <tm-tabbar-item @click="acc = 1" activeColor="#EB783C" text="我的"> <div style="width: 52rpx;height: 52rpx"> <img v-if="acc===0" style="width: 100%;height: 100%" src="../../static/zu628.png" alt=""> <img v-else style="width: 100%;height: 100%" src="../../static/zu-44.png" alt=""> </div> </tm-tabbar-item> </tm-tabbar> </tm-app> </template> <script setup> import {ref, defineEmits, watch,} from 'vue' const emit=defineEmits(['update:modelValue']) const acc = ref(1) watch(acc,()=>{ emit('update:modelValue',acc.value) }) </script>