Karsa 3 anos atrás
pai
commit
54711ba1ce

+ 0 - 1
index.html

@@ -8,7 +8,6 @@
   </head>
   <body>
     <div id="app"></div>
-    <script src="/src/static/js/rem.js"></script>
     <script type="module" src="/src/main.ts"></script>
   </body>
 </html>

+ 1 - 1
src/components/chart.vue

@@ -5,7 +5,7 @@
 
 <script lang="ts">
 import { defineComponent, ref, watch,onMounted,PropType } from 'vue';
-import Highcharts,{} from 'highcharts/highstock';
+import Highcharts from 'highcharts/highstock';
 import HighchartszhCN  from '@/utils/highcahrts-zh_CN';
 import { defaultOpts } from '@/utils/chartOptions';
 import { IChart } from '@/types';

+ 0 - 13
src/static/js/rem.js

@@ -1,13 +0,0 @@
-! function () {
-	var timer,
-		rem = function rem() {
-			var w = window.innerWidth >= 1200 ? 1200 : window.innerWidth;
-			document.querySelector('html').style.fontSize = parseInt(w / 1200 * 100) + 'px';
-		};
-
-	window.addEventListener('resize', function () {
-		clearTimeout(timer);
-		timer = setTimeout(rem, 10);
-	});
-	rem();
-}();

+ 3 - 3
src/views/chartShow/index.less

@@ -38,7 +38,7 @@
 		}
 		.notfound {
 			padding: 2rem;
-			font-size: 0.25rem;
+			font-size: 25px;
 			color: #777;
 			text-align: center;
 			.el-icon-warning {
@@ -64,7 +64,7 @@
 	@media (max-width: 1200px) {
 		.chart-header {
 			font-size: 16px;
-			padding: 0.04rem 0.2rem;
+			padding: 4px 20px;
 		}
 		.chart-show {
 			width: 100%;
@@ -73,6 +73,6 @@
 			width: 100vw;
 			height: calc(100vh - 60px);
 			max-height: calc(100vw - 60px);
-			padding: 0 0.05rem 0.1rem;
+			padding: 0 5px 10px;
 		}
 	}

+ 4 - 4
src/views/chartShow/index.vue

@@ -11,7 +11,7 @@
         element-loading-spinner="el-icon-loading"
         element-loading-text="加载中..."
       >
-        <chart :options="options" :chartId="1" />
+        <chart :options="options" :chartId="chartInfo.ChartInfoId" />
       </div>
     </template>
     <div class="chart-wrapper notfound" v-else>
@@ -347,9 +347,9 @@ export default defineComponent({
             };
 
         //农历图调整顶部缩进
-        if (state.chartInfo.Calendar === '农历') chart = {
-          spacingTop: -24,
-        }
+        // if (state.chartInfo.Calendar === '农历') chart = {
+        //   spacingTop: -24,
+        // }
 
         state.options = {
           colors: