|
@@ -1,7 +1,8 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="phone-client-tabbar">
|
|
<view class="phone-client-tabbar">
|
|
|
<view class="tabbar-item" v-for="(item, index) in tabList" :key="index" @click="switchTab(item.path,index)">
|
|
<view class="tabbar-item" v-for="(item, index) in tabList" :key="index" @click="switchTab(item.path,index)">
|
|
|
- <icon class="tabbar-item-icon" :style="{ backgroundImage: 'url(' + (currentTab == index ? item.activePath : item.iconPath) + ')' }"></icon>
|
|
|
|
|
|
|
+ <!-- <icon :style="{ backgroundImage: 'url(' + (currentTab == index ? item.activePath : item.iconPath) + ')' }"></icon> -->
|
|
|
|
|
+ <image class="tabbar-item-icon" :src="currentTab === index ? item.activePath : item.iconPath" mode="aspectFit"></image>
|
|
|
<text class="tabbar-item-text">{{item.text}}</text>
|
|
<text class="tabbar-item-text">{{item.text}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -24,14 +25,14 @@
|
|
|
tabList: [{
|
|
tabList: [{
|
|
|
text: '首页',
|
|
text: '首页',
|
|
|
path: `/pages/client/ShouYe/shouye`,
|
|
path: `/pages/client/ShouYe/shouye`,
|
|
|
- iconPath: 'static/images/tabbar/unselect/client-jz-icon.png',
|
|
|
|
|
- activePath:'static/images/tabbar/select/client-jz-icon.png',
|
|
|
|
|
|
|
+ iconPath: '/static/images/tabbar/unselect/client-jz-icon.png',
|
|
|
|
|
+ activePath:'/static/images/tabbar/select/client-jz-icon.png',
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
text: '我的',
|
|
text: '我的',
|
|
|
path: `/pages/client/my/index`,
|
|
path: `/pages/client/my/index`,
|
|
|
- iconPath: 'static/images/tabbar/unselect/client-my-icon.png',
|
|
|
|
|
- activePath: 'static/images/tabbar/select/client-my-icon.png',
|
|
|
|
|
|
|
+ iconPath: '/static/images/tabbar/unselect/client-my-icon.png',
|
|
|
|
|
+ activePath: '/static/images/tabbar/select/client-my-icon.png',
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
};
|
|
};
|