fix:修改搜索

merge-requests/9/head
张征 2 years ago
parent 17062ed082
commit c0e1a257fb

@ -75,7 +75,7 @@ export default {
-webkit-line-clamp: 2;
&-label {
display: inline-block;
padding: 4px 8px;
padding: 2px 8px;
background: rgba(255, 135, 91, 0.1);
font-size: 12px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;

@ -244,7 +244,12 @@ export default {
},
onSearch() {
//
this.$router.push("/goods/list");
this.$router.push({
path: "/goods/list",
query: {
keyword: this.searchContent,
},
});
},
},
};

@ -46,7 +46,7 @@
class="main__pagination flex flex-right"
@current-change="handleCurrentChange"
:current-page.sync="params.pageIndex"
:page-size="100"
:page-size="20"
layout="prev, pager, next, jumper"
:total="total"
>
@ -77,6 +77,7 @@ export default {
};
},
async created() {
this.params.name = this.$route.query.keyword;
this.getGoodsListData();
},
methods: {
@ -125,6 +126,14 @@ export default {
vm.getGoodsListData();
},
},
watch: {
//
//categoryId
"$route.query.keyword": function () {
this.params.name = this.$route.query.keyword;
this.getGoodsListData();
},
},
};
</script>
<style lang="scss" scoped>
@ -208,4 +217,4 @@ export default {
}
}
}
</style>
</style>

Loading…
Cancel
Save