button 多個條件判斷渲染
阿新 • • 發佈:2021-08-11
{data.judgeVoteList && data.judgeNum === data.judgeVoteList.length ? ( <Button disabled={isDisable || vote.code === 1 || vote.code === 2 || !clickName.de281} className={styles.submitBtn} type="primary" onClick={onSubmit} > {/*{vote.code === 2 && <Button type="primary">進入評審</Button>}*/} {!isDisable && vote.code !== 2 && vote.code !== 1 ? '提交' : '已提交' && ( <> 已提交 {vote.code === 1 && ( <p className={styles.subResult}>已提交,請耐心等待評審結果</p> )} </> )} </Button> ) : ( <div> <Button disabled className={styles.submitBtn} type="primary" onClick={onSubmit}> 提交 </Button> <p>評委邀請中, 請稍後...</p> </div> )}