فهرست منبع

Merge branch 'need_pool332'

shanbinzhang 2 ماه پیش
والد
کامیت
a1de83cfc4
1فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 8 1
      src/views/ppt_manage/newVersion/utils/untils.js

+ 8 - 1
src/views/ppt_manage/newVersion/utils/untils.js

@@ -638,6 +638,11 @@ export const getShapeOptions = (el,position,scale)=>{
 export const getTableData = (data,fontSize=10)=>{
   //data:[{m:'表格数据',mc:{rs:2,cs:1}}] -> [{text:'表格数据',options:{rowspan:2,colspan:1}}]
   const tableData = []
+  let alignMap = {
+    0: 'center',
+    1: 'left',
+    2: 'right'
+  }
   for(let i=0;i<data.length;i++){
     const row = data[i]
     const _row =[]
@@ -658,7 +663,9 @@ export const getTableData = (data,fontSize=10)=>{
           : '',
         bold: cell.bl ? true : false,
         italic: cell.it ? true : false,
-        fontSize: cell.fs || fontSize
+        fontSize: cell.fs || fontSize,
+        align: alignMap[cell.HorizontalType] || alignMap[cell.ht] || 'center',
+        valign: 'center'
       }
         _row.push({
           text:cell.m,