beetl模板渲染问题
@闲.大赋 你好,想跟你请教个问题:
我的模板
<style type="text/css">.anormal{ text-align: LEFT;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .aD19B5BC669D42C2FF1BCCD71A85A273B{ text-align: LEFT;background-color: #f0f8ff;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .a01DD4328E2469975EDC0CD71B370E55F{ text-align: LEFT;background-color: #e6e6fa;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .aDFB0407AC5BD6AFEE90CCD726C26E7DA{ text-align: LEFT;background-color: #e0ffff;font-family: Microsoft YaHei,微软雅黑;font-size: 16px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .a23E6732FD331D41ADFD0CD726C26E9F3{ text-align: LEFT;background-color: #e0ffff;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .a513684A4B3AD86E3B321CD727AC79A43{ text-align: LEFT;background-color: #f5f5dc;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} </style> <div id="myPrintArea" style="width:630px"> <div id="report-head"> <table style="border:none;table-layout:fixed;"> <tr> <td style="width: 70px;height: 22px;text-align: LEFT;background-color: #f0f8ff;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;"> </td> </tr> </table> </div> <div id="report-body"> <table> <thead> <tr> <th style="width: 70px;height: 22px;text-align: LEFT;background-color: #e6e6fa;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;"> </th> </tr> </thead> <tbody> <tr> <input name="rowIndex" type="hidden" value="0"/> <input name="rowId" type="hidden" value="${rows[0].rowId!}"/> <input name="rowType" type="hidden" value="${rows[0].rowType!}"/> <td style="width: 70px;height: 22px;text-align: LEFT;background-color: #e0ffff;font-family: Microsoft YaHei,微软雅黑;font-size: 16px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;" rowHid="0" colHid="6" readHid="true">AAA <input type="hidden" name="f7" value="${rows[0].f7!}"/> </td> <td colspan="2" style="width: 70px;height: 22px;text-align: LEFT;background-color: #e0ffff;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;" rowHid="0" colHid="7" readHid="true">BBB <input type="hidden" name="f8" value="${rows[0].f8!}"/> <input type="hidden" name="f9" value="${rows[0].f9!}"/> </td> </tr> </tbody> </table> </div> <div id="report-foot"> <table style="border:none;"> <tr> <td style="width: 70px;height: 22px;text-align: LEFT;background-color: #f5f5dc;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;"> </td> </tr> </table> </div> </div>
<style type="text/css">.anormal{ text-align: LEFT;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .aD19B5BC669D42C2FF1BCCD71A85A273B{ text-align: LEFT;background-color: #f0f8ff;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .a01DD4328E2469975EDC0CD71B370E55F{ text-align: LEFT;background-color: #e6e6fa;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .aDFB0407AC5BD6AFEE90CCD726C26E7DA{ text-align: LEFT;background-color: #e0ffff;font-family: Microsoft YaHei,微软雅黑;font-size: 16px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .a23E6732FD331D41ADFD0CD726C26E9F3{ text-align: LEFT;background-color: #e0ffff;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} .a513684A4B3AD86E3B321CD727AC79A43{ text-align: LEFT;background-color: #f5f5dc;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;} </style> div id="myPrintArea" style="width:630px"> div id="report-head"> <table style="border:none;table-layout:fixed;"> <tr> <td style="width: 70px;height: 22px;text-align: LEFT;background-color: #f0f8ff;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;"> </td> </tr> </table> /div> div id="report-body"> <table> <thead> <tr> <th style="width: 70px;height: 22px;text-align: LEFT;background-color: #e6e6fa;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;"> </th> </tr> </thead> <tbody> <tr> <input name="rowIndex" type="hidden" value="0"/> <input name="rowId" type="hidden" value=""/> <input name="rowType" type="hidden" value="11"/> <td style="width: 70px;height: 22px;text-align: LEFT;background-color: #e0ffff;font-family: Microsoft YaHei,微软雅黑;font-size: 16px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;" rowHid="0" colHid="6" readHid="true">AAA <input type="hidden" name="f7" value=""/> </td> <td colspan="2" style="width: 70px;height: 22px;text-align: LEFT;background-color: #e0ffff;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;" rowHid="0" colHid="7" readHid="true">BBB <input type="hidden" name="f8" value=""/> <input type="hidden" name="f9" value=""/> </td> </tr> </tbody> </table> /div> div id="report-foot"> <table style="border:none;"> <tr> <td style="width: 70px;height: 22px;text-align: LEFT;background-color: #f5f5dc;font-family: Microsoft YaHei,微软雅黑;font-size: 12px;font-weight: normal;color: #000000;text-decoration: none;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;"> </td> </tr> </table> /div> /div>
div id="myPrintArea" style="width:630px"> div id="report-head">
少html的起始标签了"<"号
我的模板不加style标签的内容就没问题,不知道我的style标签里有什么特殊的地方,查看语法也没发现什么特殊的地方
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试了一下,果然是这个问题,谢谢了,大赋
检查一下回车换行符号,估计是你有的地方用的是rn,后面用的是n, beetl 碰到的第一个回车符号认为是文本的回车换行符号。
你这种情况有人反映过,你统一一下回车换行符号就行了。在你缺少<的地方上一行检查一下即可