提交 d82c5d9a authored 作者: quanlili's avatar quanlili

修改提交模块的清空input

上级 16cb4412
...@@ -547,8 +547,7 @@ var mapOption = { ...@@ -547,8 +547,7 @@ var mapOption = {
coordinateSystem: 'geo', coordinateSystem: 'geo',
symbol: 'pin', symbol: 'pin',
data:[ data:[
{name: "天安门",value:[116.403694,39.914271, 258]},
{name: "四惠桥",value:[116.49568,39.914271,333]}
], ],
symbolSize: function(val) { symbolSize: function(val) {
// var a = (maxSize4Pin - minSize4Pin) / (max - min); // var a = (maxSize4Pin - minSize4Pin) / (max - min);
......
...@@ -414,6 +414,7 @@ export default { ...@@ -414,6 +414,7 @@ export default {
refPage(){ refPage(){
this.loading=true; this.loading=true;
this.resetSearch(); this.resetSearch();
this.bus.$emit("resetSearch",'');
setTimeout(()=>{ setTimeout(()=>{
this.loading=false; this.loading=false;
},1000) },1000)
......
...@@ -244,6 +244,7 @@ export default { ...@@ -244,6 +244,7 @@ export default {
refPage(){ refPage(){
this.loading=true; this.loading=true;
this.resetSearch(); this.resetSearch();
this.bus.$emit("resetSearch",'');
setTimeout(()=>{ setTimeout(()=>{
this.loading=false; this.loading=false;
},1000) },1000)
......
...@@ -227,6 +227,7 @@ export default { ...@@ -227,6 +227,7 @@ export default {
refPage(){ refPage(){
this.loading=true; this.loading=true;
this.resetSearch(); this.resetSearch();
this.bus.$emit("resetSearch",'');
setTimeout(()=>{ setTimeout(()=>{
this.loading=false; this.loading=false;
},1000) },1000)
......
...@@ -418,6 +418,7 @@ export default { ...@@ -418,6 +418,7 @@ export default {
refPage(){ refPage(){
this.loading=true; this.loading=true;
this.resetSearch(); this.resetSearch();
this.bus.$emit("resetSearch",'');
setTimeout(()=>{ setTimeout(()=>{
this.loading=false; this.loading=false;
},1000) },1000)
......
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
}else{ }else{
this.showSearch=false; this.showSearch=false;
} }
this.resetInput();
}, },
watch: { watch: {
$route(to,from){ $route(to,from){
...@@ -74,14 +75,6 @@ export default { ...@@ -74,14 +75,6 @@ export default {
} }
}, },
methods:{ methods:{
// valueChange(value) {
// console.log(value,'value')
// if (value.length < 30) {
// this.$store.dispatch("SetSearchValue", value).then(res => {});
// }else{
// return
// }
// },
search(){ search(){
let meta=this.$route.meta; let meta=this.$route.meta;
if(this.$route.name=="atlasRich"||this.$route.name=="atlas"){ if(this.$route.name=="atlasRich"||this.$route.name=="atlas"){
...@@ -90,10 +83,16 @@ export default { ...@@ -90,10 +83,16 @@ export default {
this.bus.$emit("searchList",this.value); this.bus.$emit("searchList",this.value);
} }
//console.log(this.$store.state.pageTemp,'11111111111') //console.log(this.$store.state.pageTemp,'11111111111')
},
resetInput(){
this.bus.$off('resetSearch').$on('resetSearch', content => {
this.value='';
console.log('清空了,哈哈哈')
});
} }
}, },
beforeDestroy () { beforeDestroy () {
this.bus.$off('resetSearch');
} }
} }
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论