我写了后字体颜色是可以切换了,但是点击一下其他的字体颜色也改变了,我想问一下怎么修改可以不同步改变颜色
xml
<view class="paix">
<view bindtap="changeColor" style="color:{{color}}" class="gekai">
<text class="zhonhe">综合排序</text>
<text class="jiage">价格排序 </text>
<image class="img" src="http://i1.fuimg.com/710528/81e2bf847d9659ee.png"></image>
<text class="xiala" data-index='1' catchtap='panel'>促销</text>
</view>
</view>
js
changeColor:function(e){
this.setData({
color:'#2fbdc7'
})
},
css
.img{
width: 10px;
height: 10px;
position: relative;
top: 1px;
}
.paix{
text-align: center;
background-color: #fff;
width: 100%;
padding: 10px 10px 10px 18px;
}
.gekai{
padding: 0px 40px 0px 0px;
font-size: 13px;
}
.zhonhe{
float: left;
}
.xiala{
float: right;
background-color: #d0d0d0;
}
bqbiao{
transition: 1s;
opacity: 0;
}