我嘗試使用 vue-html-to-paper 從網頁列印表格,但是當我嘗試列印巨型箭頭時會出現。
這是列印前的預覽,一切都很好。

但是當我列印時,我得到了這個。

我很確定這是因為 b 表的可排序箭頭圖示,因此我試圖洗掉 B 表中的所有可排序功能。但它沒有效果。這是我當前的代碼,我只使用引導程式,沒有使用自定義 css。
這是我的表代碼:
<b-table
:data="selectedShipment.shipmentDetailList"
:header-props="{ sortIcon: null }"
>
<b-table-column
field="productId"
label="ID Produk"
v-slot="props"
>
{{ props.row.product.productId }}
</b-table-column>
<b-table-column
field="productName"
label="Nama Produk"
v-slot="props"
>
{{ props.row.product.productName }}
</b-table-column>
<b-table-column
field="quantity"
label="Kuantitas Dalam Kiriman"
v-slot="props"
>
{{ props.row.quantity }}
</b-table-column>
<b-table-column
field="receivedQuantity"
label="Kuantitas Yang Diterima"
v-slot="props"
>
{{ props.row.receivedQuantity }}
</b-table-column>
</b-table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">
Cancel Shipment
</button>
<button type="button" class="btn btn-success" data-dismiss="modal" @click="print">
Print Shipment
</button>
</div>
</div>
這是我的列印方法:
print() {
// Pass the element id here
this.$htmlToPaper("printShipmentBodyModal", () => {});
console.log("Printing completed or was cancelled!");
},
uj5u.com熱心網友回復:
這是由一個名為 fontawsome for buefy 的 npm 插件引起的,它的圖示沒有通過 CSS 設定樣式,解決方案是洗掉它們。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/331698.html
