Pārlūkot izejas kodu

添加水印图片

Karsa 3 gadi atpakaļ
vecāks
revīzija
daa0f1b1d9

BIN
src/assets/img/mark.png


BIN
src/assets/logo.png


+ 6 - 7
src/components/chart.vue

@@ -4,13 +4,13 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, watch,onMounted,PropType } from 'vue';
+import { defineComponent, ref, watch, onMounted, PropType } from 'vue';
 import Highcharts from 'highcharts/highstock';
-import HighchartszhCN  from '@/utils/highcahrts-zh_CN';
+import HighchartszhCN from '@/utils/highcahrts-zh_CN';
 import { defaultOpts } from '@/utils/chartOptions';
 import { IChart } from '@/types';
 
-HighchartszhCN(Highcharts)
+HighchartszhCN(Highcharts);
 
 export default defineComponent({
   name: '',
@@ -25,7 +25,6 @@ export default defineComponent({
     },
   },
   setup(props) {
-    
     const chart = ref({});
 
     /* 设置options */
@@ -37,14 +36,14 @@ export default defineComponent({
 
     onMounted((): void => {
       init();
-    })
+    });
 
     watch(
       () => props.options,
       (newval) => {
-        console.log('reload')
+        console.log('reload');
         init();
-      },
+      }
       // {
       //   immediate: true
       // }

+ 12 - 0
src/views/chartShow/index.less

@@ -30,6 +30,18 @@
 		}
 		.chart-wrapper {
 			flex: 1;
+			position: relative;
+			.mark {
+				width: 242px;
+				height: 25px;
+				position:absolute;
+				left: 50%;
+				top: 50%;
+				transform: translate(-50%,-50%);
+				background: url('../../assets/img/mark.png') no-repeat center center;
+				background-size: cover;
+				pointer-events: none;
+			}
 		}
 		.bootom-source {
 			font-size: 12px;

+ 1 - 0
src/views/chartShow/index.vue

@@ -12,6 +12,7 @@
         element-loading-text="加载中..."
       >
         <chart :options="options" :chartId="chartInfo.ChartInfoId || 0" />
+        <div class="mark"></div>
       </div>
     </template>
     <div class="chart-wrapper notfound" v-else>