- 发布:2020-09-14 17:41
- 更新:2021-06-11 18:38
- 阅读:709
产品分类: HbuilderX
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win7旗舰
HBuilderX版本号: 2.8.11
示例代码:
<view class="openYSteps" @click="click_ navigation()" :class=" [trajectoryList. length>o?'op</view>
<view class="openYSteps"
@click="click_ navigation()" :class=" [trajectoryList. length>o?'op
enYStepcolor' :trajectoryL ist. length]"
<view style="width: 100%; height: 100%; ">{{trajectoryList . length}◆
<image class=" pull-up- img" :class="{'is-xun':is show trajectoryList==1}"
src="'/static/jbimg/rise. png '| domainName" ></ image>
</view>
</view>
</view>
操作步骤:
<view class="openYSteps" @click="click_ navigation()" :class=" [trajectoryList. length>o?'op</view>
<view class="openYSteps"
@click="click_ navigation()" :class=" [trajectoryList. length>o?'op
enYStepcolor' :trajectoryL ist. length]"
<view style="width: 100%; height: 100%; ">{{trajectoryList . length}◆
<image class=" pull-up- img" :class="{'is-xun':is show trajectoryList==1}"
src="'/static/jbimg/rise. png '| domainName" ></ image>
</view>
</view>
</view>
预期结果:
结果是 :class="{'openYStepcolor':trajectoryList.length!=0}" openYStepcolor这个样式要显示
结果是 :class="{'openYStepcolor':trajectoryList.length!=0}" openYStepcolor这个样式要显示
实际结果:
结果是 :class="{'openYStepcolor':trajectoryList.length!=0}" openYStepcolor 这个样式没有出来
结果是 :class="{'openYStepcolor':trajectoryList.length!=0}" openYStepcolor 这个样式没有出来
bug描述:
trajectoryList数组的长度,样式里的trajectoryList的长度没有改变
我在标签里是trajectoryList.length是8
在样式里是0