网速慢重复问题
This commit is contained in:
parent
5e52c240d0
commit
64705ce7b7
@ -40,7 +40,7 @@ type ProjModType = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function AiHelper(props: PropsType) {
|
export default function AiHelper(props: PropsType) {
|
||||||
|
const [isDisabled, setIsDisabled] = useState(false)
|
||||||
// 页面样式相关
|
// 页面样式相关
|
||||||
const [pageImgArray, setpageImgArray] = useState<any[]>([])
|
const [pageImgArray, setpageImgArray] = useState<any[]>([])
|
||||||
const [pageTotal, setPageTotal] = useState(0)
|
const [pageTotal, setPageTotal] = useState(0)
|
||||||
@ -833,6 +833,7 @@ export default function AiHelper(props: PropsType) {
|
|||||||
// getProjDesc()
|
// getProjDesc()
|
||||||
generateProjModArray();
|
generateProjModArray();
|
||||||
}}
|
}}
|
||||||
|
isDisabled={isDisabled}
|
||||||
handleSave={(index, mod) => {
|
handleSave={(index, mod) => {
|
||||||
if (projModArray.length > MAX_MOD_SIZE) {
|
if (projModArray.length > MAX_MOD_SIZE) {
|
||||||
messageApi.error(`模块最大数量为${MAX_MOD_SIZE}`);
|
messageApi.error(`模块最大数量为${MAX_MOD_SIZE}`);
|
||||||
@ -847,6 +848,7 @@ export default function AiHelper(props: PropsType) {
|
|||||||
},
|
},
|
||||||
onBefore() {
|
onBefore() {
|
||||||
setIsProjModArrayLoading(true);
|
setIsProjModArrayLoading(true);
|
||||||
|
setIsDisabled(true)
|
||||||
},
|
},
|
||||||
onSuccess() {
|
onSuccess() {
|
||||||
messageApi.success('提交成功')
|
messageApi.success('提交成功')
|
||||||
@ -883,6 +885,7 @@ export default function AiHelper(props: PropsType) {
|
|||||||
},
|
},
|
||||||
onFinally() {
|
onFinally() {
|
||||||
setIsProjModArrayLoading(false);
|
setIsProjModArrayLoading(false);
|
||||||
|
setIsDisabled(false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
@ -42,6 +42,7 @@ type PropsType = {
|
|||||||
setisFast: any;
|
setisFast: any;
|
||||||
setIsProjModArrayLoading: any;
|
setIsProjModArrayLoading: any;
|
||||||
chargeType: string;
|
chargeType: string;
|
||||||
|
isDisabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProjModType = {
|
type ProjModType = {
|
||||||
@ -391,7 +392,12 @@ export default function AiHelperMod(props: PropsType) {
|
|||||||
// </Button>
|
// </Button>
|
||||||
<span style={{ cursor: 'pointer' }}
|
<span style={{ cursor: 'pointer' }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.handleSave(index, record);
|
if (props.isDisabled) {
|
||||||
|
return
|
||||||
|
}else{
|
||||||
|
props.handleSave(index, record);
|
||||||
|
}
|
||||||
|
// props.handleSave(index, record);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
添加
|
添加
|
||||||
|
Loading…
Reference in New Issue
Block a user