多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
?: ``` const isTrue = true return ( <div className={isTrue?'red':'green'}><h1 className="question">{text}<hr/></h1> <h2 className={gettrue()}>{dateToString(new Date())}</h2> </div> ) ``` function ``` function gettrue(){ const istru = true return istru?'g':'bule' } ``` && ``` const isTrue = false return ( <div className={isTrue?'red':'green'}><h1 className="question">{text}<hr/></h1> <h2 className={gettrue()}>{dateToString(new Date())}</h2> <h3 className={isTrue &&'p'}>{props.children}</h3> </div> ) ```