Commit 120639ae authored by 乐宝呗666's avatar 乐宝呗666

修改tab图

parent 1f09c673
Pipeline #261 failed with stages
node_modules
package-lock.json
<template> <template>
<div class="my-tabbar"> <div class="my-tabbar">
<van-tabbar v-model="activeIndex" active-color="#EE0A24" route> <van-tabbar v-model="activeIndex" active-color="#EE0A24" route>
<van-tabbar-item icon="home-o" to="/commit">观影互动</van-tabbar-item> <van-tabbar-item v-for="item in iconList" :to="item.url" :key="item.title">
<van-tabbar-item icon="search" to="/learn">学习项目</van-tabbar-item> <span>{{item.title}}</span>
<van-tabbar-item icon="friends-o" to="/admin" <template #icon="props">
>管理员信息</van-tabbar-item <img :src="props.active ? item.icon.active : item.icon.inactive" />
> </template>
<van-tabbar-item icon="setting-o" to="/editPsd" </van-tabbar-item>
>修改密码</van-tabbar-item <!-- <van-tabbar-item icon="search" to="/learn">
> <span>学习项目</span>
</van-tabbar> <template #icon="props">
</div> <img :src="props.active ? icon.active : icon.inactive" />
</template>
</van-tabbar-item>
<van-tabbar-item icon="friends-o" to="/admin">
<span>管理员信息</span>
<template #icon="props">
<img :src="props.active ? icon.active : icon.inactive" />
</template>
</van-tabbar-item>
<van-tabbar-item icon="setting-o" to="/editPsd">
<span>修改密码</span>
<template #icon="props">
<img :src="props.active ? icon.active : icon.inactive" />
</template>
</van-tabbar-item> -->
</van-tabbar>
</div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
active: { active: {
type: String, type: String,
default: "0", default: "0"
}
},
data() {
return {
activeIndex: this.active,
iconList: [
{
url: "/commit",
title: "观影互动",
icon: {
inactive: "images/applets/commit.png",
active: "images/applets/commit-active.png"
}
}, },
}, {
data() { url: "/learn",
return { title: "学习项目",
activeIndex: this.active, icon: {
}; inactive: "images/applets/learn.png",
}, active: "images/applets/learn-active.png"
}
},
{
url: "/admin",
title: "管理员信息",
icon: {
inactive: "images/applets/admin.png",
active: "images/applets/admin-active.png"
}
},
{
url: "/editPsd",
title: "修改密码",
icon: {
inactive: "images/applets/editpsd.png",
active: "images/applets/editpsd-active.png"
}
}
]
};
}
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment