Code Monkey home page Code Monkey logo

Comments (4)

0zcl avatar 0zcl commented on June 2, 2024

看了下源码

// mescroll-uni/components/mescroll-uni/mescroll-uni.vue组件
// 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效”
const sys = `uni.getSystemInfoSync()
vm.mescroll.setBodyHeight(sys.windowHeight);

由于 在created初始化对象。

在IOS16版本 &&竖屏的小程序A时,sys.windowHeight 其实是宽度

from mescroll.

0zcl avatar 0zcl commented on June 2, 2024

https://developers.weixin.qq.com/community/develop/doc/0002ee8ce94820355b5f80d8b51000?highLine=created%2520windowHeight

如果开发者请求wx.getSystemInfoSync().windowHeigh的时机很早,早到视图都没有布局完成,我们会返回一个经验值;布局完成后再请求wx.getSystemInfoSync().windowHeigh,这时我们会返回实际值。经验值和实际值可能会有出入

https://developers.weixin.qq.com/community/develop/doc/000ea808414a8885534d0bf7b56c00?highLine=created%28%29%2520%2520windowHeight

from mescroll.

0zcl avatar 0zcl commented on June 2, 2024

@Leotw @rni-l @cuteCloud @Skura23 大大们,看着在微信小程序中 在created初始化对象 sys.windowHeight 是有问题的,看看可以对小程序特殊处理,在onReady初始化吗,或者其它方法

from mescroll.

agracehopper avatar agracehopper commented on June 2, 2024

this.height = uni.getSystemInfoSync().windowHeight 写在onReady里,mescroll 无法触发上拉加载,页面卡死

from mescroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.