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

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(); this.search();
}, },
search () { // search () { //
this.$router.push({ const url = this.$route.path;
path: '/goodsList', if(url == '/goodsList'){
query: { keyword: this.searchData } this.$emit('search', this.searchData)
}); }else{
this.$router.push({
path: '/goodsList',
query: { keyword: this.searchData }
});
}
}, },
searchStore () { // searchStore () { //
this.$emit('search', this.searchData) this.$emit('search', this.searchData)