chore: 删除未使用的自定义 TabBar 组件,AGENTS.md 不入库

H5 端 pages.json 的 tabBar.custom 不生效、由 uni-app 自渲染底栏,该组件自提交起未被任何页面使用(仅 mine.vue 留有 import 与注释占位),已一并清理并回归验证 11 个页面渲染与底栏正常
This commit is contained in:
jacobxu666
2026-09-14 23:39:23 +08:00
parent 0cf11a4163
commit f69bd630a4
2 changed files with 3 additions and 81 deletions
-81
View File
@@ -1,81 +0,0 @@
<template>
<view class="tab-bar">
<view class="tab-bar-item" v-for="(item, index) in tabList" :key="index" @click="switchTab(index)">
<image class="tab-icon" :src="current === index ? item.selectedIconPath : item.iconPath"></image>
<text class="tab-text" :style="{ color: current === index ? selectedColor : color }">{{ item.text }}</text>
</view>
</view>
</template>
<script>
export default {
name: 'TabBar',
props: {
current: {
type: Number,
default: 0
}
},
data() {
return {
color: '#999999',
selectedColor: '#007aff',
backgroundColor: '#ffffff',
tabList: [
{
pagePath: '/pages/index/index',
iconPath: '/static/shouye.png',
selectedIconPath: '/static/shouye_select.png',
text: '首页'
},
{
pagePath: '/pages/mine/mine',
iconPath: '/static/wode.png',
selectedIconPath: '/static/wode_select.png',
text: '我的'
}
]
}
},
methods: {
switchTab(index) {
if (this.current === index) return;
uni.switchTab({
url: this.tabList[index].pagePath
})
}
}
}
</script>
<style scoped>
.tab-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: space-around;
border-top: 1rpx solid rgba(242, 242, 242, 0.5);
padding-bottom: env(safe-area-inset-bottom);
}
.tab-bar-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
height: 100%;
}
.tab-icon {
width: 48rpx;
height: 48rpx;
margin-bottom: 4rpx;
}
.tab-text {
font-size: 22rpx;
}
</style>