From e182d75a6902f8ca95cab887ad5259cd2ca2e941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Wed, 22 Mar 2023 11:12:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=BB=84=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compenents/tree-category/index.tsx | 1 - src/compenents/tree-department/index.tsx | 13 +++++++++++++ src/pages/course/index.tsx | 1 + src/pages/member/index.tsx | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/compenents/tree-category/index.tsx b/src/compenents/tree-category/index.tsx index 47a173b..af7f36b 100644 --- a/src/compenents/tree-category/index.tsx +++ b/src/compenents/tree-category/index.tsx @@ -11,7 +11,6 @@ interface Option { interface PropInterface { type: string; text: string; - onUpdate: (keys: any, title: any) => void; } diff --git a/src/compenents/tree-department/index.tsx b/src/compenents/tree-department/index.tsx index e64d1c1..e1fd289 100644 --- a/src/compenents/tree-department/index.tsx +++ b/src/compenents/tree-department/index.tsx @@ -9,6 +9,7 @@ interface Option { } interface PropInterface { + type: string; text: string; onUpdate: (keys: any, title: any) => void; } @@ -24,6 +25,12 @@ export const TreeDepartment = (props: PropInterface) => { if (JSON.stringify(departments) !== "{}") { const new_arr: Option[] = checkArr(departments, 0); + if (props.type === "no-course") { + new_arr.unshift({ + key: 0, + title: "公开课", + }); + } setTreeData(new_arr); } else { const new_arr: Option[] = [ @@ -33,6 +40,12 @@ export const TreeDepartment = (props: PropInterface) => { children: [], }, ]; + if (props.type === "no-course") { + new_arr.unshift({ + key: 0, + title: "公开课", + }); + } setTreeData(new_arr); } setLoading(false); diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx index 6ec455c..980b50e 100644 --- a/src/pages/course/index.tsx +++ b/src/pages/course/index.tsx @@ -89,6 +89,7 @@ export const CoursePage = () => { children: (