使用css @media媒体查询属性
@media print {
.no-print {
display: none;
}
.show-print {
display: block;
}
}
默认都添加no-print属性 然后通过触发打印事件 动态添加show-print属性
printClick() {
this.showSign = false;//控制单个签字
this.showRcord = false;//控制审批记录
this.showSignList = false;//控制签字表
if (
this.data.processType === 'fixed' ||
this.data.processType === 'nonFixed' ||
this.data.processType === 'accountApp'
) {
this.showSign = true
} else if(this.data.processType === 'loading'){
this.showSignList = true;
}else{
this.showRcord = true;
}
},