let _this=this let height="" const query = uni.createSelectorQuery() query.select( ...
let _this=this let height="" const query = uni.createSelectorQuery() query.select( ...
onReady(){ let that = this uni.getSystemInfo({ success: function(res) { // res - 各种参数 ...
...
uni.getSystemInfo({ success: function(res) { // res - 各种参数 console.log(res.windowWidth); // 屏 ...
前言 最近在工作中遇到了一个问题,某个需求需要获取元素的高度,就假定是div元素,但是呢因为div中元素的内容高度是不确定的,所以并没有给div设置高度,在获取高度时,我们首先会想到3种方法 1、div.style.height; 我们会发现输出空,这是因为style对象获取的是定义在内 ...
用到的是vue style绑定 其中 v-bind=: 以下是代码 <template> <div class="hello"> <div ...
...
...