html52.com
我爱小程序-开发者交流社区

使用WeUI2.4.0中的mp-loading时,显示不正确?

在学习使用WeUI时,使用mp-loading设置type为dot-gray和dot-white时,页面展示的高度太小,和案例上给出的不一样在学习使用WeUI时,使用mp-loading设置type为dot-gray和dot-white时,页面展示的高度太小,和案例上给出的不一样wxml:
<view>
    <mp-loading animated="{{animated}}" duration="900" ex

wxml:
<view>
    <mp-loading animated="{{animated}}" duration="900" ext-class="demo0" type="dot-gray" show="{{loading_show}}" ></mp-loading>
  <mp-loading type="dot-white" ext-class="demo1"></mp-loading>
</view>
js:
data:{
  tips'请稍后',
  loading_showtrue,
  animatedtrue
},
onShow() {
 this.timer = setInterval(() => {
   this.setData({
     loading_show: !this.data.loading_show,
   })
 }, 2000)
},
onUnload() {
 clearInterval(this.timer)
}

还有就是设置了animated,动画也不显示,只是每隔2秒瞬间消失这样,这是怎么回事?

使用的版本是2.4.0

网友回复

社区技术运营专员-CJiang:

你好,先自行参考下文档:

https://developers.weixin.qq.com/miniprogram/dev/extended/weui/loading.html

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付