谢谢!大佬。前来帮忙一下
使用三元表达式动态拼接className,不生效。
1、红色的{{isAction?'wieyi_{{item}}':''}}不生效。
2、蓝色的可以。
各位大佬,还发现了一个问题:
1、wx:for动画失效。
<!-- <view wx:for="{{[1, 2, 3, 4, 5, 6, 7, 8, 9,10,11]}}" wx:key="index" class="qiu_{{item}} diaol_{{item}} {{egg_action?'wieyi_'+item:''}}"></view> -->
2、动画有效。
<view class="qiu_1 diaol_1 {{egg_action?'wieyi_1':''}}"></view>
<view class="qiu_2 diaol_2 {{egg_action?'wieyi_2':''}}"></view>
<view class="qiu_3 diaol_3 {{egg_action?'wieyi_3':''}}"></view>
<view class="qiu_4 diaol_4 {{egg_action?'wieyi_4':''}}"></view>
<view class="qiu_5 diaol_5 {{egg_action?'wieyi_5':''}}"></view>
<view class="qiu_6 diaol_6 {{egg_action?'wieyi_6':''}}"></view>
<view class="qiu_7 diaol_7 {{egg_action?'wieyi_7':''}}"></view>
<view class="qiu_8 diaol_8 {{egg_action?'wieyi_8':''}}"></view>
<view class="qiu_9 diaol_9 {{egg_action?'wieyi_9':''}}"></view>
<view class="qiu_10 diaol_10 {{egg_action?'wieyi_10':''}}"></view>
<view class="qiu_11 diaol_11 {{egg_action?'wieyi_11':''}}"></view>
请问{{isAction?'wieyi_'{{item}}:''}}这个三元表达式表示什么了
{{isAction ? 'wieyi_' + item : ''}}
{{isAction?'wieyi_'{{item}}:''}}试试
是这个没生效哦!
'wieyi_{{item}}'是字符串,里面的{{item}}不是变量了
{{'qiu_'+item}}