1
我需要使打印功能,我使用JQuery printThis plugin by Jason Day模式工作正常,除非我测试与包含文件。它忽略/不打印包含文件的内容。模态不打印内容包括
模态:
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title text-center">Participe desta Promoção</h4>
</div>
<div class="modal-body">
<div class="printable">
THIS IS PRINTED
@include('default.modal-voucher')
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button type="button" class="btn btn-primary" id="btnPrint">PRINT</button>
</div>
</div>
我的JS:
$(document).ready(function() {
$("#btnPrint").click(function() {
$(".printable").printThis({
debug: false,
printContainer: false,
pageTitle: $("#info-modal .short-info .panel-headline-wrapper h1").html(),
formValues: true,
printDelay: 0
})
});
});
内容:@include('default.modal-voucher')
没有出现在打印文件中,谁能告诉我为什么?
可能是它尚未加载?你能在打印之前延迟吗?我还没有遇到过@include。你在使用框架吗? –
当您显示弹出窗口(在尝试打印之前)是否看到“包含”内容?你有公开的网址,所以我们可以看到它吗? '@ include'是'php'语法还是其他库/框架/语言? –
我使用Laravel 5.2框架。我解决了编辑调用js的问题。 – let