完成我的成长脚印UI

This commit is contained in:
kron
2025-05-27 12:38:39 +08:00
parent e9070438f2
commit 6b4eff428c
10 changed files with 336 additions and 51 deletions

View File

@@ -1,16 +1,16 @@
<script setup>
import { ref } from "vue";
const activeTab = ref("member");
const tabs = [
{ id: "member", image: "../static/tab-vip.png" },
{ id: "growth", image: "../static/tab-grow.png" },
{ id: "shop", image: "../static/tab-mall.png" },
{ image: "../static/tab-vip.png" },
{ image: "../static/tab-grow.png" },
{ image: "../static/tab-mall.png" },
];
function handleTabClick(tabId) {
activeTab.value = tabId;
function handleTabClick(index) {
if (index === 1) {
uni.navigateTo({
url: "/pages/my-growth",
});
}
}
</script>
@@ -19,10 +19,9 @@ function handleTabClick(tabId) {
<image class="footer-bg" src="../static/tab-bg.png" mode="widthFix" />
<view
v-for="(tab, index) in tabs"
:key="tab.id"
:key="index"
class="tab-item"
:class="{ active: activeTab === tab.id }"
@click="handleTabClick(tab.id)"
@click="handleTabClick(index)"
>
<image
:src="tab.image"