使用产品:Vue-iClient-MapboxGL
操作系统:win10 x64
问题详情:引用sm-search组件,输入1,按“enter”后,前端控制台报错 this.$message.destroy is not a function
如下:
vue.runtime.esm.js:1888 TypeError: this.$message.destroy is not a function
at VueComponent.clearResult (iclient-mapboxgl-vue.js:84837)
at VueComponent.search (iclient-mapboxgl-vue.js:84863)
at VueComponent.searchButtonClicked (iclient-mapboxgl-vue.js:84860)
at invokeWithErrorHandling (vue.runtime.esm.js:1854)
at VueComponent.invoker (vue.runtime.esm.js:2179)
at invokeWithErrorHandling (vue.runtime.esm.js:1854)
at VueComponent.Vue.$emit (vue.runtime.esm.js:3882)
at VueComponent.handleKeyDown (Input.js:182)
at invokeWithErrorHandling (vue.runtime.esm.js:1854)
at HTMLInputElement.invoker (vue.runtime.esm.js:2179)
前端source指向为:
iclient-mapboxgl-vue.js:
clearResult: function clearResult(isClear) {
this.$message.destroy();
....
}
vue 代码如下:
<sm-search
position="top-left"
:layer-names="['水站列表']"
:address-match="addressMatch"
:rest-map="restMap"
:online-local-search="onlineLocalSearch"
/>
data(){
culsterLayerData: {
type: "FeatureCollection",
features: []
},
pointList: [],
restMap: [
{
url: host + "/iserver/services/map-world/rest/maps/World",
layerName: "Capitals@World.1"
}
],
addressMatch: [
{
url:
host + "/iserver/services/addressmatch-Address/restjsr/v1/address"
}
],
onlineLocalSearch: {
enable: true,
city: "北京市"
}
}