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