uni-admission-fee/components/my-tabbar/my-tabbar.vue

62 lines
1.6 KiB
Vue
Raw Normal View History

2023-10-27 05:40:47 +00:00
<template>
<view class="content">
2023-10-27 08:43:30 +00:00
<u-tabbar :value="value4"
@change="change"
:fixed="true"
:border="false"
:placeholder="false"
activeColor="#40BE94"
:safeAreaInsetBottom="true">
2023-10-27 05:40:47 +00:00
<u-tabbar-item text="场馆">
2023-10-27 08:43:30 +00:00
<image style="width: 52rpx;height: 52rpx"
class="u-page__item__slot-icon"
slot="active-icon"
src="../../static/zu618@3x (1).png"></image>
<image style="width: 52rpx;height: 52rpx"
class="u-page__item__slot-icon"
slot="inactive-icon"
src="../../static/zu759@3x.png"></image>
2023-10-27 05:40:47 +00:00
</u-tabbar-item>
<u-tabbar-item text="我的">
2023-10-27 08:43:30 +00:00
<image style="width: 52rpx;height: 52rpx"
class="u-page__item__slot-icon"
slot="active-icon"
src="../../static/zu760@3x.png"></image>
<image style="width: 52rpx;height: 52rpx"
class="u-page__item__slot-icon"
slot="inactive-icon"
src="../../static/zu628@3x (1).png"></image>
2023-10-27 05:40:47 +00:00
</u-tabbar-item>
</u-tabbar>
</view>
</template>
<script>
export default {
2023-10-27 08:43:30 +00:00
data () {
2023-10-27 05:40:47 +00:00
return {
title: 'Hello',
value4: 0,
}
},
2023-10-27 08:43:30 +00:00
onLoad () {
2023-10-27 05:40:47 +00:00
},
methods: {
2023-10-27 08:43:30 +00:00
change (name) {
if (name === 0) {
uni.switchTab({
url: '/pages/ticket/index'
});
} else if (name === 1) {
uni.switchTab({
url: '/pages/my/my'
});
}
2023-10-27 06:58:37 +00:00
2023-10-27 08:43:30 +00:00
this.value4 = name
}
2023-10-27 05:40:47 +00:00
}
}
</script>