uni-ticket-system/src/components/self-tabbar/index.vue

32 lines
1.1 KiB
Vue
Raw Normal View History

2023-12-05 02:11:10 +00:00
<template>
2023-12-06 09:54:52 +00:00
<tm-tabbar :autoSelect="false" v-model:active="acc">
2023-12-05 02:11:10 +00:00
<tm-tabbar-item
@click="acc = 0"
2023-12-05 10:53:17 +00:00
activeColor="#EB783C"
2023-12-05 02:11:10 +00:00
open-type="reLaunch"
text="选票"
2023-12-05 10:53:17 +00:00
>
<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>
2023-12-05 11:06:19 +00:00
<tm-tabbar-item @click="acc = 1" activeColor="#EB783C" text="我的">
2023-12-05 10:53:17 +00:00
<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>
2023-12-05 02:11:10 +00:00
</tm-tabbar>
2023-12-06 09:54:52 +00:00
2023-12-05 02:11:10 +00:00
</template>
<script setup>
2023-12-05 11:06:19 +00:00
import {ref, defineEmits, watch,} from 'vue'
2023-12-05 02:11:10 +00:00
const emit=defineEmits(['update:modelValue'])
const acc = ref(1)
watch(acc,()=>{
emit('update:modelValue',acc.value)
})
</script>