|
@@ -638,6 +638,11 @@ export const getShapeOptions = (el,position,scale)=>{
|
|
|
export const getTableData = (data)=>{
|
|
|
//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,6 +663,8 @@ export const getTableData = (data)=>{
|
|
|
: '',
|
|
|
bold: cell.bl ? true : false,
|
|
|
italic: cell.it ? true : false,
|
|
|
+ align: alignMap[cell.HorizontalType] || alignMap[cell.ht] || 'center',
|
|
|
+ valign: 'center'
|
|
|
}
|
|
|
_row.push({
|
|
|
text:cell.m,
|