线上课编辑优化

This commit is contained in:
禺狨
2023-03-17 16:50:06 +08:00
parent 34246017da
commit 6eb8cb5c60
10 changed files with 808 additions and 16 deletions

View File

@@ -256,12 +256,9 @@ export const CourseCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
};
const delChapterHour = (index: number, id: number) => {
console.log(index, id);
const keys = [...chapterHours];
const data = [...chapters];
const current = data[index].hours.findIndex((i: any) => i.rid === id);
console.log(current);
if (current >= 0) {
data[index].hours.splice(current, 1);
}