ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` function Divider(){ const text = 'Label1 Text' function dateToString(d){ return [ d.getFullYear(), d.getMonth()+1, d.getDate() ].join('-') } return ( <div><h1 className="question">{text}<hr/></h1> <h2>{this.dateToString(new Date())}</h2> </div> ) } ``` ``` function Divider(){ const text = 'Label1 Text' function dateToString(d){ return [ d.getFullYear(), d.getMonth()+1, d.getDate() ].join('-') } return ( <div><h1 className="question">{text}<hr/></h1> <h2>{dateToString(new Date())}</h2> </div> ) } ```