线上课列表切换tab重置分类、部门组件

This commit is contained in:
禺狨
2023-04-24 09:19:58 +08:00
parent 27ec0e6c4a
commit b34cd955c4
7 changed files with 20 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ const CoursePage = () => {
children: (
<div className="float-left">
<TreeCategory
refresh={refresh}
type=""
text={"分类"}
onUpdate={(keys: any, title: any) => {
@@ -331,6 +332,14 @@ const CoursePage = () => {
};
const onChange = (key: string) => {
setCategoryIds([]);
setDepIds([]);
if (Number(key) === 1) {
setLabel("全部分类");
} else {
setLabel("全部部门");
}
setRefresh(!refresh);
setTabKey(Number(key));
};