|
@@ -1,10 +1,9 @@
|
|
|
<template>
|
|
|
- <view class="custom-tabbar">
|
|
|
- <view class="tab-item" v-for="(item, index) in tabList" :key="index" @click="switchTab(item.path)">
|
|
|
- <!-- 使用图标和文本来表示每个 Tab 项 -->
|
|
|
- <image :src="item.iconPath" class="tab-icon"></image>
|
|
|
- <text>{{ item.text }}</text>
|
|
|
- </view>
|
|
|
+ <view class="ezy-custom-tabbar">
|
|
|
+ <view class="tabbar-item-box">
|
|
|
+ <view class="tabbar-item" v-for="(item, index) in tabList" :key="index" @click="switchTab(item.path)"
|
|
|
+ :style="{backgroundImage: 'url(' + item.iconPath + ')'}"></view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -13,10 +12,10 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
tabList: [
|
|
|
- { text: '学习计划', iconPath: 'static/images/tabbar/unselect/plan-sj.png',path:'/pages/study/index' },
|
|
|
- { text: '成长', iconPath: 'static/images/tabbar/unselect/develop-sj.png',path:'/pages/study/index' },
|
|
|
- { text: '伙伴', iconPath: 'static/images/tabbar/unselect/partner-sj.png',path:'/pages/study/index' },
|
|
|
- { text: '搜索', iconPath: 'static/images/tabbar/unselect/my-sj.png',path:'/pages/my/index' },
|
|
|
+ {iconPath: 'static/images/tabbar/unselect/plan-sj.png',path:'/pages/study/index' },
|
|
|
+ {iconPath: 'static/images/tabbar/unselect/develop-sj.png',path:'/pages/study/index' },
|
|
|
+ {iconPath: 'static/images/tabbar/unselect/partner-sj.png',path:'/pages/study/index' },
|
|
|
+ {iconPath: 'static/images/tabbar/unselect/my-sj.png',path:'/pages/my/index' },
|
|
|
// 更多 Tab 项...
|
|
|
]
|
|
|
};
|