小程序
小游戏
企业微信
微信支付
扫描小程序码分享
一个页面有图片,在bindload的函数里写了高度的计算,跳转页面再回来,图片的高度没有了,而且不走bindload函数。大神求解..........
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
用真机测试一下。。。。
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
对啊,就是真机也会这样。
那你在把图片换成本地图试试
也会哦,为什么会这样
<swiper class="list" current="{{currentTab}}" bindchange="bindChange">
<swiper-item bindtap='img' scroll-top="{{top}}" class="{{item.height > sys.windowHeight?'noCurrent cblock':'noCurrent'}};" wx:for="{{list}}" wx:if="{{item.url}}" wx:key>
<image style="{{item.width?'width:'+ item.width +'px;height:' + item.height + 'px;':'display:none;'}}" mode="aspectFill" bindload='loadimg' data-url='{{item.url}}' data-index='{{index}}' src='{{item.url}}'></image>
</swiper-item>
</swiper>
我是这样写的
我之前也有过类似的,真机测试 !!!!莫得问题,,官方还没修复??
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
用真机测试一下。。。。
对啊,就是真机也会这样。
那你在把图片换成本地图试试
也会哦,为什么会这样
<swiper class="list" current="{{currentTab}}" bindchange="bindChange">
<swiper-item bindtap='img' scroll-top="{{top}}" class="{{item.height > sys.windowHeight?'noCurrent cblock':'noCurrent'}};" wx:for="{{list}}" wx:if="{{item.url}}" wx:key>
<image style="{{item.width?'width:'+ item.width +'px;height:' + item.height + 'px;':'display:none;'}}" mode="aspectFill" bindload='loadimg' data-url='{{item.url}}' data-index='{{index}}' src='{{item.url}}'></image>
</swiper-item>
</swiper>
我是这样写的
我之前也有过类似的,真机测试 !!!!莫得问题,,官方还没修复??