Parcourir la source

修改打印样式,隐藏页眉页脚

liyg il y a 2 ans
Parent
commit
aa751d9d3c
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 7 0
      src/views/index/components/printReceipt1.vue

+ 7 - 0
src/views/index/components/printReceipt1.vue

@@ -394,4 +394,11 @@ export default {
   margin-top: 0.3125rem;
   margin-bottom: 1.25rem;
 }
+@media print {
+  // 打印样式,去除页眉页脚
+  @page {
+    margin-top: 0;
+    margin-bottom: 0;
+  }
+}
 </style>