一: getDescBox () { uni.createSelectorQuery().in(this).select('.' + class).boundingClientRect(result => { if (result) { console.log ...
uni.getSystemInfo success: function res res 各种参数 console.log res.windowWidth 屏幕的宽度 let info uni.createSelectorQuery .select .类名 info.boundingClientRect function data data 各种参数 console.log data.width 获 ...
2019-08-02 09:50 5 16496 推荐指数:
一: getDescBox () { uni.createSelectorQuery().in(this).select('.' + class).boundingClientRect(result => { if (result) { console.log ...
let systemInfo = uni.getSystemInfoSync() // px转换到rpx的比例 let pxToRpxScale = 750 / systemInfo.windowWidth; // 状态栏的高度 let ...
// 异步调用 async tapTab(index) { //点击tab-bar if (this.tabIndex === index) { return fal ...
获取dom元素data-xxx <picker mode="selector" @change='select_pick' :value="(i==1?pack1_index:(i==2?pack2_index:pack3_index))" :range='pack_list ...
...
使用justify-content来定义元素的对齐方式。 1.flex-start 默认元素在主轴上面左对齐 或者 向上对齐(设置flex-direction为column) 2.flex-end 默认右对齐 或者 向下对齐 3.center 居中 ...
一、 1、首先有一个元素 2、确认指针指向 https://developer.mozilla.org/zh-CN/docs/Web/API/Element/getBoundingClientRect 例: 打印出: 可获得 用于描述边框的只读属性 ...