current position:Home>Byte applet [TMA] rangeerror: invalid array length

Byte applet [TMA] rangeerror: invalid array length

2022-01-27 01:32:47 CSDN Q & A

tt.createSelectorQuery() This can't be put in... In byte development onLoad in , Put it in onReady Report an error in the Invalid array length, I've been looking for it for a long time, but I can't find the problem
HeightW: function () {
var that = this; //  Get the left height var query = tt.createSelectorQuery();query.select('#sbtop').boundingClientRect(function (rect) {  that.setData({    tab: rect.height  });}).exec();query.select('#arrow').boundingClientRect(function (rect) {  that.setData({    arrow: rect.height  });}).exec(); // Don't slide the height of the page let allWidth, allHeight;tt.getSystemInfo({  success: function (res, rect) {    that.setData({      allWidth: res.windowWidth,      allHeight: res.windowHeight    });  }});

},

Results show : RangeError: Invalid array length

img




Refer to the answer 1:

Invalid array length . explain You called lengeh Method . But you Array non-existent perhaps Is not an array




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270132441141.html

Random recommended