liyongli 2 年之前
父節點
當前提交
31f4c7b123
共有 2 個文件被更改,包括 14 次插入2 次删除
  1. 7 1
      src/views/report/SilkRoadData/index.vue
  2. 7 1
      src/views/report/SilkRoadDetail/index.vue

+ 7 - 1
src/views/report/SilkRoadData/index.vue

@@ -7,7 +7,7 @@
         @load="load"
         :src="isOnlyDay"
       />
-      <span class="days" :style="'font-size:' + fontSizeFunc() + 'px'">{{
+      <span class="days" :style="'font-size:' + fontSizeTitleFunc() + 'px'">{{
         times.join(' 到 ')
       }}</span>
     </div>
@@ -154,6 +154,12 @@ export default {
       if (size < 12) return 12;
       return size;
     },
+    fontSizeTitleFunc() {
+      let size = this.width / 25;
+      if (size > 18) return 18;
+      if (size < 12) return 12;
+      return size;
+    },
   },
   beforeUnmount() {},
   components: {

+ 7 - 1
src/views/report/SilkRoadDetail/index.vue

@@ -8,7 +8,7 @@
         @load="load"
         :src="isOnlyDay"
       />
-      <span class="days" :style="'font-size:' + fontSizeFunc() + 'px'">{{
+      <span class="days" :style="'font-size:' + fontSizeTitleFunc() + 'px'">{{
         times.join(' 到 ')
       }}</span>
     </div>
@@ -141,6 +141,12 @@ export default {
       if (size < 12) return 12;
       return size;
     },
+    fontSizeTitleFunc() {
+      let size = this.width / 25;
+      if (size > 18) return 18;
+      if (size < 12) return 12;
+      return size;
+    },
     onClickLeft() {
       this.$router.go(-1);
     },