parent
b8434958cd
commit
d4b9405de9
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 66 KiB |
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div>
|
||||
<iframe id="mobsf"
|
||||
frameborder="0" scrolling="no"
|
||||
src="https://map.baidu.com/search/%E9%95%BF%E6%B2%99%E5%B8%82/@12573169,3258221.75,12z?querytype=s&da_src=shareurl&wd=%E9%95%BF%E6%B2%99&c=1&src=0&pn=0&sug=0&l=8&b=(11885167.325861586,2839554.975477234;12824971.19424195,3276416.92991967)&from=webmap&biz_forward=%7B%22scaler%22:2,%22styles%22:%22pl%22%7D&device_ratio=2"
|
||||
style="position:absolute;top:180px;left: 220px;right:0px;bottom:100px;"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
/**
|
||||
* iframe-宽高自适应显示
|
||||
*/
|
||||
function changeMobsfIframe() {
|
||||
const mobsf = document.getElementById('mobsf');
|
||||
const deviceWidth = document.body.clientWidth;
|
||||
const deviceHeight = document.body.clientHeight;
|
||||
mobsf.style.width = (Number(deviceWidth) - 320) + 'px'; //数字是页面布局宽度差值
|
||||
mobsf.style.height = (Number(deviceHeight) - 180) + 'px'
|
||||
//mobsf.style.height = (Number(deviceHeight)-64) + 'px'; //数字是页面布局高度差
|
||||
}
|
||||
|
||||
changeMobsfIframe()
|
||||
|
||||
window.onresize = function () {
|
||||
changeMobsfIframe()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1 @@
|
||||
$themeTextColor: #efefef;
|
@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
configureWebpack: {
|
||||
externals: {
|
||||
'AMap': 'AMap' // 表示CDN引入的高德地图
|
||||
}
|
||||
},
|
||||
css: {
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
data: `@import "~@/styles/scss/_global.scss";`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue