<a @click="setCCY" class="dropdown-item" href="#">EUR</a> ## href="#"此种写法有毒,相同path在调用
<a @click="setCCY" class="dropdown-item" href="javascript:void(0);">EUR</a> √
setCCY(e){ this.ccy = e.target.text let obj = {} let attrs = [] if(this.$route.query.Color!=null){ obj['Color'] = this.$route.query.Color } if(this.$route.query.Color!=null){ obj['Storage'] = this.$route.query.Storage } if(this.$route.query.Color!=null){ obj['Currency'] = e.target.text } attrs.push(obj) this.$router.push({ path: this.$route.path, query: attrs[0] })