收藏
回答

在iphone上打开小程序,progress进度条不显示,安卓显示

在iphone上打开小程序,progress进度条不显示,安卓显示,请问一下是什么原因

回答关注问题邀请回答
收藏

3 个回答

  • 晨
    2018-08-22

    麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),我们定位下问题

    2018-08-22
    有用
    回复 2
    • なくすこ
      なくすこ
      2018-08-23

      <progress percent="{{progress}}"  color="red" stroke-width="2" activeColor="green" backgroundColor="#fff" wx:if="{{progress<100}}" />


      var timer = setInterval(function () {

      that.data.progressNum++;

      //当进度条为100时清除定时任务

      if (that.data.progressNum >= 100) {

      clearInterval(timer);

      }

      //并且把当前的进度值设置到progress中

      that.setData({

      progress: that.data.progressNum

      })


      });



      iphone上都不显示进度条的效果,

      2018-08-23
      回复
    • 晨
      2018-08-23回复なくすこ

      请提供代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

      2018-08-23
      回复
  • 盛捷
    盛捷
    2天前

    <block wx:if="{{isUpload == false}}">

        <progress style="width:200pxpercent="{{uploadProgress}}" border-radius="8show-info stroke-width="10active="trueactive-mode="forwards" ></progress>

        <icon class="progress-canceltype="cancel"></icon>

      </block>

      <block wx:else="">

        <button bindtap="chooseFile">上传缩略图</button>

      </block>


    增加一个宽度,你可以试试,你的问题是增加了wx:if 导致dom元素重新渲染了。增加宽度style="width:200px"就生效了

    2天前
    有用
    回复
  • 杉杉爱吃鱼🐳
    杉杉爱吃鱼🐳
    2018-09-11

    我也遇到这个问题了,得到解决了么?求解

    2018-09-11
    有用
    回复 11
    查看更多(6)
登录 后发表内容