mirror of
https://github.com/PlayEdu/backend
synced 2025-06-16 16:07:03 +08:00
课程新建组件切换课时列表弹窗确认
This commit is contained in:
parent
c7f0abf69f
commit
b0709630cd
@ -7,11 +7,15 @@ import {
|
|||||||
Form,
|
Form,
|
||||||
Cascader,
|
Cascader,
|
||||||
Input,
|
Input,
|
||||||
|
Modal,
|
||||||
message,
|
message,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import styles from "./create.module.less";
|
import styles from "./create.module.less";
|
||||||
import { course, department } from "../../../api/index";
|
import { course, department } from "../../../api/index";
|
||||||
import { UploadImageButton } from "../../../compenents";
|
import { UploadImageButton } from "../../../compenents";
|
||||||
|
import { ExclamationCircleFilled } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const { confirm } = Modal;
|
||||||
|
|
||||||
interface PropInterface {
|
interface PropInterface {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@ -119,7 +123,22 @@ export const CourseCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getChapterType = (e: any) => {
|
const getChapterType = (e: any) => {
|
||||||
|
confirm({
|
||||||
|
title: "操作确认",
|
||||||
|
icon: <ExclamationCircleFilled />,
|
||||||
|
content: "切换列表选项会清空已添加课时,确认切换?",
|
||||||
|
centered: true,
|
||||||
|
okText: "确认",
|
||||||
|
cancelText: "取消",
|
||||||
|
onOk() {
|
||||||
setChapterType(e.target.value);
|
setChapterType(e.target.value);
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
form.setFieldsValue({
|
||||||
|
hasChapter: chapterType,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user