<!--custom-tab-bar/index.wxml-->
<view class="tab">
<view class="item" bindtap="switchPage" data-index="0">
<text class="iconfont icon-shouye icon {{selectedIndex == 0 ?
'selected' : '' }}"></text>
<text class="title {{selectedIndex == 0 ? 'selected' : '' }}">首页</text>
</view>
<view class="item" bindtap="switchPage" data-index="1">
<text class="iconfont icon-shangpinfenlei icon {{selectedIndex == 1 ?
'selected' : '' }}"></text>
<text class="title {{selectedIndex == 1 ? 'selected' : '' }}">商品分类</text>
</view>
<view class="item" bindtap="switchPage" data-index="2">
<text class="iconfont icon-gouwuche icon {{selectedIndex == 2 ?
'selected' : '' }}"></text>
<text class="title {{selectedIndex == 2 ? 'selected' : '' }}">购物车</text>
</view>
<view class="item" bindtap="switchPage" data-index="3">
<text class="iconfont icon-wo icon {{selectedIndex == 3 ?
'selected' : '' }}"></text>
<text class="title {{selectedIndex == 3 ? 'selected' : '' }}">我</text>
</view>
</view>
/*custom-tab-bar/index.wxss*/
@import'./icon/icon.wxss';
.tab{
height: 49px;
width: 100%;
background-color: white;
border-top: solid 1px #b5afb2;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.item{
height: 100%;
width: 25%;
text-align: center;
padding-top:5px ;
display: flex;
flex-direction: column;
}
.icon{
font-size: 20px;
color: gray;
}
.title{
margin-top: 2px;
font-size: 10px;
color: gray;
}
.selected{
color: #d63329;
}
以上两种代码带有找不到文件(File not found)和意外字符(unexpected character)的提示,应该怎样解决?