From 60aa433589bc80219622d8b131f23a2493c25153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Fri, 17 Mar 2023 10:16:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=BA=BA=E5=91=98=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=A6=81=E6=AD=A2=E7=99=BB=E5=BD=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compenents/upload-video-sub/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compenents/upload-video-sub/index.tsx b/src/compenents/upload-video-sub/index.tsx index 3ae4a13..e083a71 100644 --- a/src/compenents/upload-video-sub/index.tsx +++ b/src/compenents/upload-video-sub/index.tsx @@ -39,7 +39,7 @@ export const UploadVideoSub = (props: PropsInterface) => { const [checkedList, setCheckedList] = useState( props.defaultCheckedList ); - const [indeterminate, setIndeterminate] = useState(true); + const [indeterminate, setIndeterminate] = useState(false); const [checkAll, setCheckAll] = useState(false); // 获取列表 @@ -113,10 +113,10 @@ export const UploadVideoSub = (props: PropsInterface) => { const onCheckAllChange = (e: CheckboxChangeEvent) => { const arr = plainOptions.map((item: any) => item.value); - const arrLabel = videoList.map((item: any) => item.name); setCheckedList(e.target.checked ? arr : []); setIndeterminate(false); setCheckAll(e.target.checked); + const arrLabel = videoList.map((item: any) => item.name); if (e.target.checked) { props.onSelected(arr, arrLabel); } else {