uni-ticket-system/src/components/self-tabbar/index.vue
2023-12-06 17:54:52 +08:00

32 lines
1.1 KiB
Vue

<template>
<tm-tabbar :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>
</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>