2025-08-13 11:53:14 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="tabbar">
|
|
|
|
|
<view class="tabbar_item" @click="tabChange(0)">
|
|
|
|
|
<image v-if="tabIndex == 1"
|
2025-08-17 17:59:04 +08:00
|
|
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/home_icon_normal.png"
|
2025-08-13 11:53:14 +08:00
|
|
|
class="tabbar_img" />
|
|
|
|
|
<image v-if="tabIndex == 0"
|
2025-08-15 13:44:27 +08:00
|
|
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/home_icon_pre.png"
|
2025-08-13 11:53:14 +08:00
|
|
|
class="tabbar_img" />
|
2025-08-15 13:44:27 +08:00
|
|
|
<text class="tabbar_title" :style="{ color: tabIndex == 0 ? '#D13E3C' : '#757A80' }">海外资讯</text>
|
2025-08-13 11:53:14 +08:00
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="tabbar_item" @click="tabChange(1)">
|
|
|
|
|
<image v-if="tabIndex == 0"
|
2025-08-15 13:44:27 +08:00
|
|
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/mine_icon_normal.png"
|
2025-08-13 11:53:14 +08:00
|
|
|
class="tabbar_img" />
|
|
|
|
|
<image v-if="tabIndex == 1"
|
2025-08-15 13:44:27 +08:00
|
|
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/mine_icon_pre.png"
|
|
|
|
|
class="tabbar_img" />
|
|
|
|
|
<text class="tabbar_title" :style="{ color: tabIndex == 1 ? '#D13E3C' : '#757A80' }">全部</text>
|
2025-08-13 11:53:14 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
2025-08-13 13:21:40 +08:00
|
|
|
const emit = defineEmits(["tabChange"]);
|
2025-08-13 11:53:14 +08:00
|
|
|
|
|
|
|
|
const tabIndex = ref(0);
|
|
|
|
|
function tabChange(index) {
|
|
|
|
|
tabIndex.value = index;
|
2025-08-13 13:21:40 +08:00
|
|
|
emit("tabChange", index);
|
|
|
|
|
|
2025-08-13 11:53:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(async () => { });
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.tabbar {
|
|
|
|
|
display: flex;
|
2025-08-15 13:44:27 +08:00
|
|
|
width: 100vw;
|
2025-08-13 11:53:14 +08:00
|
|
|
height: 150rpx;
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
2025-08-15 13:44:27 +08:00
|
|
|
left: 0;
|
2025-08-13 11:53:14 +08:00
|
|
|
box-shadow: 0 -2rpx 10rpx rgba(128, 128, 128, 0.2);
|
|
|
|
|
width: 100vw;
|
2025-08-13 12:25:12 +08:00
|
|
|
background-color: white;
|
2025-08-15 13:44:27 +08:00
|
|
|
z-index: 9999999;
|
2025-08-13 11:53:14 +08:00
|
|
|
|
|
|
|
|
.tabbar_item {
|
|
|
|
|
width: 50%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tabbar_img {
|
|
|
|
|
width: 44rpx;
|
|
|
|
|
height: 44rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tabbar_title {
|
|
|
|
|
display: flex;
|
|
|
|
|
font-family: PingFangSC, PingFang SC;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
color: #666666;
|
|
|
|
|
line-height: 28rpx;
|
|
|
|
|
text-align: left;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
margin-top: 5rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|