===优化

This commit is contained in:
禺狨
2023-03-22 18:53:21 +08:00
parent c032727588
commit 954386df83
7 changed files with 11 additions and 11 deletions

View File

@@ -387,7 +387,7 @@ export const CourseCreate: React.FC<PropInterface> = ({
setVideoVisible(false);
}}
onSelected={(arr: any, videos: any) => {
if (chapterType == 0) {
if (chapterType === 0) {
selectData(arr, videos);
} else {
selectChapterData(arr, videos);

View File

@@ -362,14 +362,14 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
<div className="float-left mt-24">
<SelectResource
defaultKeys={
chapterType == 0 ? hours : chapterHours[addvideoCurrent]
chapterType === 0 ? hours : chapterHours[addvideoCurrent]
}
open={videoVisible}
onCancel={() => {
setVideoVisible(false);
}}
onSelected={(arr: any, videos: any) => {
if (chapterType == 0) {
if (chapterType === 0) {
selectData(arr, videos);
} else {
selectChapterData(arr, videos);

View File

@@ -73,7 +73,7 @@ export const CoursePage = () => {
text={"分类"}
onUpdate={(keys: any, title: any) => {
setCategoryIds(keys);
if (typeof title == "string") {
if (typeof title === "string") {
setLabel(title);
} else {
setLabel(title.props.children[0]);

View File

@@ -154,7 +154,7 @@ export const ResourceImagesPage = () => {
text={"图片"}
onUpdate={(keys: any, title: any) => {
setCategoryIds(keys);
if (typeof title == "string") {
if (typeof title === "string") {
setLabel(title);
} else {
setLabel(title.props.children[0]);

View File

@@ -169,7 +169,7 @@ export const ResourceVideosPage = () => {
text={"视频"}
onUpdate={(keys: any, title: any) => {
setCategoryIds(keys);
if (typeof title == "string") {
if (typeof title === "string") {
setLabel(title);
} else {
setLabel(title.props.children[0]);