mirror of
https://github.com/PlayEdu/backend
synced 2025-06-14 15:48:31 +08:00
资源分类组件增加未分类方法
This commit is contained in:
parent
6b459a551c
commit
cbbf4da042
@ -25,6 +25,15 @@ export const TreeCategory = (props: PropInterface) => {
|
||||
const categories = res.data.categories;
|
||||
if (JSON.stringify(categories) !== "{}") {
|
||||
const new_arr: Option[] = checkArr(categories, 0);
|
||||
new_arr.unshift({
|
||||
key: 0,
|
||||
title: (
|
||||
<div className="d-flex">
|
||||
未分类
|
||||
<span className="tree-num">({props.categoryCount[0] || 0})</span>
|
||||
</div>
|
||||
),
|
||||
});
|
||||
setTreeData(new_arr);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user