<radio class="statusRadio_2" value="2" checked="{{pStatus}}=='2' ? true:false" style="margin-left:20rpx">正在使用</radio>
*[HTML]:
1.因为{{pStatus}}=='2' ? true:false是字符串,所以checked判断为真'
2.而"{{pStatus=='2' ? true:false}}" 这个才是判断pStatus是否等于'2'
正确做法:
<radio class="statusRadio_2" value="2" checked="{{pStatus=='2' ? true:false}}" style="margin-left:20rpx">正在使用</radio>
总结:
主要是自己没有掌握wxml的语法