mirror of
https://github.com/PlayEdu/backend
synced 2025-12-26 12:31:15 +08:00
线上课列表切换tab重置分类、部门组件
This commit is contained in:
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user