Commit 6ef9f307 authored by zhengke's avatar zhengke

no message

parent 2586c75d
......@@ -406,14 +406,13 @@ export default (
}
let baseFontSize = 0
let aaa = '<p style=""><span style="font-size: 97.62px;">日本旅游</span></p>'
// let arr = aaa.split(';')
let arr = el.content.split(';')
let fontSize = arr.filter((z:any)=>z.indexOf('font-size:')!=-1)
if(fontSize&&fontSize.length>0){
let arrs = fontSize[0].split(':')
let arrs2 = arrs[1].split('px')
baseFontSize = Number(arrs2[0])
baseFontSize = arrs2[0]
}
const w = parseInt(el.width-width)
......@@ -433,11 +432,16 @@ export default (
content+=arr[i]+';'
}else content+=arr[i]
}
console.log(el.content,'----content')
console.log(arr,'----arr')
console.log(content,'------组装结果')
// console.log(el.content,'----content')
// console.log(arr,'----arr')
// console.log(content,'------组装结果')
     
let value = baseFontSize+'px'
console.log(value,'111---')
let command = 'fontsize'
emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command, value } })
return { ...el, left, top, width, height, content}
return { ...el, left, top, width, height}
})
}
......@@ -458,6 +462,7 @@ export default (
slidesStore.updateSlide({ elements: elementList.value })
mainStore.setScalingState(false)
addHistorySnapshot()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment