Browse Source

Merge branch 'yh258' into debug

ldong 2 months ago
parent
commit
50f0a515f3
1 changed files with 20 additions and 4 deletions
  1. 20 4
      src/components/sheet.vue

+ 20 - 4
src/components/sheet.vue

@@ -27,10 +27,11 @@ const HtObj=ref({
 
 <template>
 <div :class="['table-wrapper',dynamicSty ]">
-  <table 
+  <table
     cellpadding="0" 
     cellspacing="0" 
-    :style="`font-size: ${props.config.FontSize||12}px`"
+    :class="props.config.Watermark?'background-watermark':'no-water'"
+    :style="{'font-size':(props.config.FontSize||12)+'px',backgroundImage: 'url('+props.config.Watermark+')'}"
   >
     <tbody>
       <tr 
@@ -39,7 +40,7 @@ const HtObj=ref({
       >
         <td 
           :class="['data-cell',{
-            'one-bg':(index+1)%2&&index>0,
+            'one-bg':(index+1)%2&&index>0&&!props.config.Watermark,
             'tow-bg': (index+1)%2!==0&&index>0,
             'head-column': index === 0
           }]"
@@ -115,7 +116,6 @@ table {
     border: 1px solid #dcdfe6;
     // height: 40px;
     text-align: center;
-    background-color: #fff;
     border-left: none;
     border-top: none;
     &:first-child {
@@ -147,6 +147,17 @@ table {
   }
 }
 
+.no-water{
+  td,
+  th {
+    background-color: #fff;
+  }
+  .head-column {
+    background-color: #505B78;
+    color: #fff;
+  }
+}
+
 .pc-sty table {
   table-layout: auto;
   td,th {
@@ -163,4 +174,9 @@ table {
     height: 40px;
   }
 }
+.background-watermark{
+  background-repeat: no-repeat;
+  background-position: center center;
+  background-size: 100%;
+}
 </style>