【功能修复】商品分类界面,有 categoryId 匹配不对的问题

pull/134/MERGE
YunaiV 2025-01-04 09:10:58 +08:00
parent 515b8bb00f
commit bc0e731fc3
1 changed files with 3 additions and 3 deletions

View File

@ -136,14 +136,14 @@
await getList(); await getList();
// //
const foundCategory = state.categoryList.find(category => category.id === params.id); const foundCategory = state.categoryList.find((category) => category.id === Number(params.id));
// onMenu onMenu(0) // onMenu onMenu(0)
onMenu(foundCategory ? state.categoryList.indexOf(foundCategory) : 0); onMenu(foundCategory ? state.categoryList.indexOf(foundCategory) : 0);
}); });
function handleScrollToLower() { function handleScrollToLower() {
loadMore(); loadMore();
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>