优化商城端可以重复搜索内容

master
Yer 2023-04-21 17:36:02 +08:00
parent ebc79da0fc
commit b30be8efb2
1 changed files with 9 additions and 4 deletions

View File

@ -71,10 +71,15 @@ export default {
this.search();
},
search () { //
this.$router.push({
path: '/goodsList',
query: { keyword: this.searchData }
});
const url = this.$route.path;
if(url == '/goodsList'){
this.$emit('search', this.searchData)
}else{
this.$router.push({
path: '/goodsList',
query: { keyword: this.searchData }
});
}
},
searchStore () { //
this.$emit('search', this.searchData)