提交 c9a04704 编写于 作者: Q qiang

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

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