hookehuyr

搜索查询操作显示优化

<!--
* @Date: 2024-10-20 16:57:48
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-25 18:13:06
* @LastEditTime: 2024-10-26 14:28:58
* @FilePath: /hager/src/views/search.vue
* @Description: 文件描述
-->
......@@ -109,9 +109,12 @@ export default {
}
},
watch: {
'$route.query.keyword': function(newKeyword) {
'$route.query.keyword': function(newKeyword, oldKeyword) {
this.keyword = newKeyword || '';
if (newKeyword !== oldKeyword) {
this.activeName = 'product';
this.getList();
}
},
},
async mounted () {
......