let sysInfo = uni.getSystemInfoSync();
windowHeight = sysInfo.windowHeight; // 屏幕的高度
windowWidth = sysInfo.windowWidth; // 屏幕的宽度
this.mapCtx = uni.createMapContext('map',this);
let controls = this.controls
controls[0].position.left= windowWidth - 50
controls[1].position.left= windowWidth - 50
this.controls = controls

- 发布:2021-09-14 10:55
- 更新:2022-07-08 21:56
- 阅读:343
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 11
HBuilderX类型: 正式
HBuilderX版本号: 3.2.6
手机系统: Android
手机系统版本号: Android 9.0
手机厂商: 小米
手机机型: mi6
页面类型: nvue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
根据屏幕宽度计算controls位置
根据屏幕宽度计算controls位置
预期结果:
动态设置control位置
动态设置control位置
实际结果:
无效
无效
bug描述:
动态设置map controls position 无效
0 个回复