小程序
小游戏
企业微信
微信支付
扫描小程序码分享
items.checked === false ? (items.threelist.length <= 3 ? 'height: auto' : 'height: 410rpx') : 'height: auto'
我是动态绑定行内样式的,用uniapp开发在h5端是正常的,然而在小程序下不给了错误的判断,想不通这是为什么么有人解答一下吗,
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
<view class="centen-rigth-list" wx:for="{{twostageData}}" wx:for-item="items" wx:key="indexs">
<view class="">
<view class="centen-rigth-list-title">
{{items.name}}
</view>
<view class="centen-rigth-list-more" bindtap="more(items)"
v-if="items.threelist.length > 6">
查看更多
<text class="{{items.checked == false ? 'iconfont tabbar-item-icon icon-jinrujiantou1':'iconfont icon-unfold'}}"
style="color: #999999;">
</text>
<view class="centen-item-data" style="height: {{(items.checked || threelist.length <= 3)? 'auto' : '410rpx'}}">
<view class="centen-item" wx:for="{{items.threelist}}" wx:for-item="itemss" wx:key="indexss" bindtap="classify(itemss)">
<image src="{{itemss.thumb}}" style="width: 100%; height: 100%;"></image>
{{itemss.name}}
小程序的一些写法与h5有些区别
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
试试这样:<view :style="{height: (items.checked === false ? (items.threelist.length <= 3 ? 'auto' : '410rpx') : 'auto')}"></view>
<view class="centen-rigth-list" v-for="(items,indexs) in twostageData" :key="indexs">
<view class="centen-rigth-list-more" @click="more(items)" v-if="items.threelist.length > 6">
<text :class="items.checked == false ? 'iconfont tabbar-item-icon icon-jinrujiantou1':'iconfont icon-unfold'"
<view class="centen-item-data" :style="{height: (items.checked === false ? (items.threelist.length <= 3 ? 'auto' : '410rpx') : 'auto')}">
<view class="centen-item" v-for="(itemss,indexss) in items.threelist" :key="indexss" @click="classify(itemss)">
<image :src="itemss.thumb" style="width: 100%; height: 100%;"></image>
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
<view class="centen-rigth-list" wx:for="{{twostageData}}" wx:for-item="items" wx:key="indexs">
<view class="">
<view class="centen-rigth-list-title">
{{items.name}}
</view>
<view class="centen-rigth-list-more" bindtap="more(items)"
v-if="items.threelist.length > 6">
查看更多
<text class="{{items.checked == false ? 'iconfont tabbar-item-icon icon-jinrujiantou1':'iconfont icon-unfold'}}"
style="color: #999999;">
</text>
</view>
</view>
<view class="centen-item-data" style="height: {{(items.checked || threelist.length <= 3)? 'auto' : '410rpx'}}">
<view class="centen-item" wx:for="{{items.threelist}}" wx:for-item="itemss" wx:key="indexss" bindtap="classify(itemss)">
<view class="">
<image src="{{itemss.thumb}}" style="width: 100%; height: 100%;"></image>
</view>
<view class="">
{{itemss.name}}
</view>
</view>
</view>
</view>
小程序的一些写法与h5有些区别
试试这样:<view :style="{height: (items.checked === false ? (items.threelist.length <= 3 ? 'auto' : '410rpx') : 'auto')}"></view>
<view class="centen-rigth-list" v-for="(items,indexs) in twostageData" :key="indexs">
<view class="">
<view class="centen-rigth-list-title">
{{items.name}}
</view>
<view class="centen-rigth-list-more" @click="more(items)" v-if="items.threelist.length > 6">
查看更多
<text :class="items.checked == false ? 'iconfont tabbar-item-icon icon-jinrujiantou1':'iconfont icon-unfold'"
style="color: #999999;">
</text>
</view>
</view>
<view class="centen-item-data" :style="{height: (items.checked === false ? (items.threelist.length <= 3 ? 'auto' : '410rpx') : 'auto')}">
<view class="centen-item" v-for="(itemss,indexss) in items.threelist" :key="indexss" @click="classify(itemss)">
<view class="">
<image :src="itemss.thumb" style="width: 100%; height: 100%;"></image>
</view>
<view class="">
{{itemss.name}}
</view>
</view>
</view>
</view>
试一下