append时dom结构非常长时用引号和加号拼接特别麻烦 一次看到了setContent(dom)这个方法,他不用去引号加号拼接。但是不知道这个方法从何而来怎么用 有哪个大神知道吗,代码示例如下:this.setContent(` <div class="markup3D-label" > <div class="definLeader" ></div> <div class="markup3D ceee clearfix"> <div class="markup3DHead"> </div> <div class="markup3DBody"> <div class="progressbar markBar1"> <div class="progress"> <div class="progress-bar progress-bar-striped progress-bar-warning active" role="progressbar" aria-valuenow="28" aria-valuemin="0" aria-valuemax="100" style="width: 28%"> 28℃ </div> </div> </div> <div class="progressbar markBar2"> <div class="progress"> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="30" aria-valuemin="0" aria-valuemax="100" style="width: 30%"> 30% </div> </div> </div> </div> </div></div>`)
添加回答
举报
0/150
提交
取消