jwyu 1 年之前
父節點
當前提交
9ed44707d2
共有 2 個文件被更改,包括 13 次插入6 次删除
  1. 10 1
      src/assets/styles/common.scss
  2. 3 5
      src/views/ppt/components/ChartWrap.vue

+ 10 - 1
src/assets/styles/common.scss

@@ -28,11 +28,20 @@ P{
     margin: 0;
     padding: 0;
 }
+
+img {
+    image-rendering: -moz-crisp-edges;
+    image-rendering: -o-crisp-edges;
+    image-rendering: -webkit-optimize-contrast;
+    image-rendering: crisp-edges;
+    -ms-interpolation-mode: nearest-neighbor;
+}
+
 // 全局滚动条样式
 ::-webkit-scrollbar {
     width: 10PX;
     background-color: rgba(0, 0, 0, 0.05);
-  }
+}
   
 ::-webkit-scrollbar-thumb {
     background: #7a7a7a;

+ 3 - 5
src/views/ppt/components/ChartWrap.vue

@@ -25,10 +25,7 @@ async function getChartInfo(){
             chartIsDelete.value=true
             return
         }
-        let lang='zh'
-        if(window.location.pathname.startsWith('/ppten')){
-            lang='en'
-        }
+
         let showChartTitle=false
         const {Source,ChartType}=res.Data.ChartInfo
         if((Source==1&&[2,7,10].includes(ChartType))||(Source==2&&ChartType==8)){
@@ -37,7 +34,7 @@ async function getChartInfo(){
         chartRender({
             data:res.Data,
             renderId:renderId.value,
-            lang,
+            lang:window.location.pathname.startsWith('/ppten')?'en':'zh',
             changeLangIsCheck:true,
             showChartTitle
         })
@@ -71,6 +68,7 @@ onMounted(()=>{
         .empty-img{
             width: 100%;
             height: 100%;
+            object-fit: contain;
         }
     }
 }