bug fixed

This commit is contained in:
pqcqaq 2024-10-19 01:28:02 +08:00
parent 82f27ea216
commit b3192b98aa
2 changed files with 6 additions and 1 deletions

View File

@ -110,6 +110,7 @@ const FrontendBody = () => {
<EssaysByLabel
oakPath='essaysByLabel'
oakId={selectedLabelId!}
categoryId={selectedCategoryId!}
></EssaysByLabel>
)}
</div>

View File

@ -17,6 +17,8 @@ export default OakComponent({
},
},
formData({ data }) {
const categoryId = this.props.categoryId;
return {
list: data.essayLabels$label
?.map((item) => {
@ -39,7 +41,9 @@ export default OakComponent({
...item,
cover: '',
};
}),
})
// 只能在这里做筛选,不知道有没有更好的做法
.filter((item) => item.categoryId === categoryId),
};
},
});