var that = this; /** * 获取当前设备的宽高 */ wx.getSystemInfo({ success: function (res) { that.setData({ clientHeight: res.windowHeight -30 }); } });
style="height: {{clientHeight?clientHeight+‘px‘:‘auto‘}}"
2023-10-16 10:18:16
var that = this; /** * 获取当前设备的宽高 */ wx.getSystemInfo({ success: function (res) { that.setData({ clientHeight: res.windowHeight -30 }); } });
style="height: {{clientHeight?clientHeight+‘px‘:‘auto‘}}"
下一篇:小程序如何写动态标签