fixed: 资源分类的数量

This commit is contained in:
none
2023-03-15 15:31:54 +08:00
parent 45321a5918
commit fc90ddf2cc
5 changed files with 13 additions and 4 deletions

View File

@@ -44,6 +44,7 @@ export const ResourceImagesPage = () => {
const [selLabel, setLabel] = useState<string>("全部图片");
const [loading, setLoading] = useState<boolean>(false);
const [categoryCount, setCategoryCount] = useState<any>({});
const [pureTotal, setPureTotal] = useState(0);
// 删除图片
const removeResource = () => {
@@ -89,6 +90,7 @@ export const ResourceImagesPage = () => {
setVisibleArr(arr);
setHoverArr(arr);
setCategoryCount(res.data.category_count);
setPureTotal(res.data.pure_total);
setLoading(false);
})
.catch((err: any) => {
@@ -154,6 +156,7 @@ export const ResourceImagesPage = () => {
<TreeCategory
text={"图片"}
categoryCount={categoryCount}
resourceTotal={pureTotal}
onUpdate={(keys: any, title: any) => {
setCategoryIds(keys);
if (typeof title == "string") {