提交 c9a04704 编写于 作者: Q qiang

fix(h5): 修复 uni.chooseLocation、uni.openLocation 页面在启用 leftWindow 后显示错位的问题

上级 32ddd4e1
......@@ -220,7 +220,7 @@ export default {
.uni-system-choose-location {
display: block;
position: fixed;
position: absolute;
left: 0;
top: 0;
width: 100%;
......
<template>
<div class="uni-system-open-location">
<div class="map-content">
<div
class="map-content"
:class="{ 'fix-position': isPoimarkerSrc }"
>
<iframe
ref="map"
:src="src"
allow="geolocation"
sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation allow-modals allow-popups"
frameborder="0"
@load="_load"
@load="_check"
/>
<!-- 去这里 -->
<div
......@@ -46,7 +49,7 @@ export default {
name,
address,
src: latitude && longitude ? `${poimarkerSrc}?type=0&marker=coord:${latitude},${longitude};title:${name};addr:${address};&key=${key}&referer=${referer}` : '',
isPoimarkerSrc: false
isPoimarkerSrc: true
}
},
methods: {
......@@ -56,8 +59,9 @@ export default {
} else {
getApp().$router.back()
}
this._check()
},
_load () {
_check () {
if (this.$refs.map.src.indexOf(poimarkerSrc) === 0) {
this.isPoimarkerSrc = true
} else {
......@@ -75,7 +79,7 @@ export default {
<style>
.uni-system-open-location {
display: block;
position: fixed;
position: absolute;
left: 0;
top: 0;
width: 100%;
......@@ -116,6 +120,11 @@ export default {
overflow: hidden;
}
.map-content.fix-position {
top: -74px;
bottom: -44px;
}
.map-content > iframe {
width: 100%;
height: 100%;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册