uView2.0
uView2.0 copied to clipboard
u-picker组件语法错误
版本
2.0.33
转载链接
重现步骤
<text
v-if="$u.test.array(item)"
class="u-picker__view__column__item u-line-1"
v-for="(item1, index1) in item"
:key="index1"
:style="{
height: $u.addUnit(itemHeight),
lineHeight: $u.addUnit(itemHeight),
fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal',
}"
>{{ getItemText(item1) }}</text
>
期望的结果是什么?
不报错
实际的结果是什么?
报错
v-if不能和v-for一起使用
https://staging-cn.vuejs.org/guide/essentials/conditional.html#v-if-vs-v-show
v-if和v-for有优先级问题,你if用一层template就好了