赞
踩
/** * 动态加载百度地图api函数 * @param {String} ak 百度地图AK,必传 */ export default function loadBMap(ak) { return new Promise(function(resolve, reject) { if (typeof window.BMap !== 'undefined') { resolve(window.BMap) return true } window.onBMapCallback = function() { resolve(window.BMap) } let script = document.createElement('script') script.type = 'text/javascript' script.src = 'http://api.map.baidu.com/api?v=3.0&ak=' + ak + '&callback=onBMapCallback' script.onerror = reject document.head.appendChild(script) }) }
<template>
<div>
<el-form label-width="80px">
<el-row>
<el-col :span="24">
<el-form-item label="搜索地址">
<el-autocomplete
style="width:100%;"
popper-class="autoAddressClass"
v-model="addressInfo.address"
:fetch-suggestions="querySearchAsync"
:trigger-on-focus="false"
placeholder="详细地址"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。