资源分类组件增加未分类方法

This commit is contained in:
禺狨 2023-03-17 09:56:55 +08:00
parent 6b459a551c
commit cbbf4da042

View File

@ -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);
}
});