visuddhinanda 3 лет назад
Родитель
Сommit
167c2e1211
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      dashboard/src/components/template/Exercise.tsx

+ 4 - 2
dashboard/src/components/template/Exercise.tsx

@@ -2,13 +2,15 @@ import { Button, Card } from "antd";
 
 
 interface IWidgetExerciseCtl {
 interface IWidgetExerciseCtl {
   id?: string;
   id?: string;
+  title?: string;
   channel?: string;
   channel?: string;
   children?: React.ReactNode;
   children?: React.ReactNode;
 }
 }
-const ExerciseCtl = ({ id, channel, children }: IWidgetExerciseCtl) => {
+const ExerciseCtl = ({ id, title, channel, children }: IWidgetExerciseCtl) => {
+  const cardTitle = title ? title : "练习";
   return (
   return (
     <Card
     <Card
-      title="练习"
+      title={cardTitle}
       extra={<Button type="primary">做练习</Button>}
       extra={<Button type="primary">做练习</Button>}
       style={{ backgroundColor: "wheat" }}
       style={{ backgroundColor: "wheat" }}
     >
     >