打印不分页问题处理
This commit is contained in:
@@ -46,11 +46,11 @@
|
|||||||
<Icon icon="ep:position"/>
|
<Icon icon="ep:position"/>
|
||||||
抄送
|
抄送
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button type="primary" @click="handleDelegate(item)">
|
<el-button type="primary" @click="handleDelegate(item)">
|
||||||
<Icon icon="ep:position" />
|
<Icon icon="ep:position" />
|
||||||
委派
|
委派
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="handleSign(item)">
|
<!-- <el-button type="primary" @click="handleSign(item)">
|
||||||
<Icon icon="ep:plus" />
|
<Icon icon="ep:plus" />
|
||||||
加签
|
加签
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
@@ -352,3 +352,27 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
/* 打印样式 */
|
||||||
|
@media print {
|
||||||
|
/* 设置页面大小 */
|
||||||
|
@page {
|
||||||
|
size: auto; /* 自动适应页面大小 */
|
||||||
|
margin: 10mm; /* 设置页面边距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 重置页面元素的样式 */
|
||||||
|
body, html, div {
|
||||||
|
height: auto !important; /* 确保内容高度自动调整 */
|
||||||
|
width: auto !important; /* 确保内容宽度自动调整 */
|
||||||
|
overflow: visible !important; /* 允许内容超出页面 */
|
||||||
|
page-break-inside: avoid; /* 避免内容被分页拆分 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 添加分页符 */
|
||||||
|
.page-break {
|
||||||
|
display: block;
|
||||||
|
page-break-before: always; /* 在每个分页符之前强制分页 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user