打印

查看源码

属性参考

注册名 data-controller="print"
Targets
Values
Outlets

打印:doPrint() 创建隐藏 iframe 加载 url value 并调用 print();batchPrint() 先把所有勾选的 name value 复选框拼成 ids 参数,toggleAll() 全选。

<button data-controller="print" data-print-url-value="/orders/1.pdf" data-action="click->print#doPrint">打印</button>

会打开隐藏 iframe 并调起打印对话框;示例用结构示意。