mirror of
https://github.com/PlayEdu/backend
synced 2025-06-17 21:17:06 +08:00
线上课新建无章节课时选择逻辑优化
This commit is contained in:
parent
0460da6974
commit
e2dba07641
@ -56,6 +56,7 @@ export const SelectResource = (props: PropsInterface) => {
|
||||
closable={false}
|
||||
onCancel={() => {
|
||||
setSelectKeys([]);
|
||||
setSelectVideos([]);
|
||||
props.onCancel();
|
||||
}}
|
||||
open={props.open}
|
||||
|
@ -89,7 +89,12 @@ export const UploadVideoSub = (props: PropsInterface) => {
|
||||
};
|
||||
//重置选中的key
|
||||
useEffect(() => {
|
||||
setCheckedList(props.defaultCheckedList);
|
||||
const arr = [...props.defaultCheckedList];
|
||||
setCheckedList(arr);
|
||||
if (arr.length === 0) {
|
||||
setIndeterminate(false);
|
||||
setCheckAll(false);
|
||||
}
|
||||
}, [props.defaultCheckedList]);
|
||||
|
||||
// 加载列表
|
||||
|
@ -164,6 +164,7 @@ export const CourseCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
|
||||
setChapterType(e.target.value);
|
||||
setChapters([]);
|
||||
setHours([]);
|
||||
setTreeData([]);
|
||||
},
|
||||
onCancel() {
|
||||
form.setFieldsValue({
|
||||
|
Loading…
x
Reference in New Issue
Block a user