Просмотр исходного кода

Merge pull request #1963 from visuddhinanda/agile

🐛 课本内导航按钮不起作用
visuddhinanda 2 лет назад
Родитель
Сommit
2b4ecf9f57

+ 5 - 1
dashboard/src/components/article/Article.tsx

@@ -217,7 +217,11 @@ const ArticleWidget = ({
           channelId={channelId}
           courseId={courseId}
           mode={mode}
-          onArticleChange={(type: ArticleType, id: string, target: string) => {
+          onArticleChange={(
+            newType: ArticleType,
+            id: string,
+            target: string
+          ) => {
             if (typeof onArticleChange !== "undefined") {
               onArticleChange(type, id, target);
             }

+ 5 - 1
dashboard/src/components/article/TypeCourse.tsx

@@ -209,7 +209,11 @@ const TypeCourseWidget = ({
         mode={mode}
         anthologyId={anthologyId}
         active={true}
-        onArticleChange={(type: ArticleType, id: string, target: string) => {}}
+        onArticleChange={(type: ArticleType, id: string, target: string) => {
+          if (typeof onArticleChange !== "undefined") {
+            onArticleChange(type, id, target);
+          }
+        }}
         onLoad={(data: IArticleDataResponse) => {}}
         onAnthologySelect={(id: string) => {}}
       />