diff --git a/src/pages/StreamerInformation/index.jsx b/src/pages/StreamerInformation/index.jsx index 36ea58b..f405f2e 100644 --- a/src/pages/StreamerInformation/index.jsx +++ b/src/pages/StreamerInformation/index.jsx @@ -298,6 +298,12 @@ const StreamerInformationContent = () => { const [isModalOpen, setIsModalOpen] = useState(false); //点击modal取消按钮 const handleCancel = () => { + setShowData([]); + setDefaultValues({}); + setDefaultMedia({}); + setDisplayVideoId([]); + setDisplayPosterId([]); + setDisplayGalleryId([]); setIsModalOpen(false); }; //modal打开时的默认值 @@ -330,6 +336,14 @@ const StreamerInformationContent = () => { alert("请确保封面、视频不为空,且相册大于2"); return; } + if ( + newPosterId.length > 1 || + newVideoId.length > 1 || + newGalleryId.length > 9 + ) { + alert("请确保封面、视频、相册数量未超过上限"); + return; + } if ( !defaultValues.key || !value.signature ||