Sfoglia il codice sorgente

fix: ppt图表渲染上下限问题

Karsa 7 mesi fa
parent
commit
73806d2f52
1 ha cambiato i file con 11 aggiunte e 2 eliminazioni
  1. 11 2
      src/views/ppt/components/ChartWrap.vue

+ 11 - 2
src/views/ppt/components/ChartWrap.vue

@@ -1,7 +1,10 @@
 <script setup>
 import {computed,onMounted,ref} from 'vue'
 import apiChart from '@/api/chart.js'
-import {chartRender} from '@/hooks/chart/render'
+import {chartRender,useChartRender} from '@/hooks/chart/render'
+
+
+const {setLimitData,isUseSelfLimit}=useChartRender()
 
 const props=defineProps({
     itemData:{
@@ -34,12 +37,18 @@ async function getChartInfo(){
         if((Source==1&&[2,7,10].includes(ChartType))||(Source==2&&ChartType==8)){
             showChartTitle=true
         }
+
+        //初始化上下限
+        isUseSelfLimit.value = true
+        setLimitData(res.Data)
+
         chartRender({
             data:res.Data,
             renderId:renderId.value,
             lang:window.location.pathname.startsWith('/ppten')?'en':'zh',
             changeLangIsCheck:true,
-            showChartTitle
+            showChartTitle,
+            shouldUseSelfLimit:true,
         })
     }
 }