Commit b6debe5a authored by 罗超's avatar 罗超

新增判断条件

parent a192041b
......@@ -70,9 +70,12 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
if(objectEFFFects && objectEFFFects.data?.FrFX?.enab){
stroke = getStrokeHandler(objectEFFFects)
}
let content = `<p><span style="${style}">${HtmlUtil.htmlEncodeByRegExp(value)}</span></p>`
const valuesStr = value.split('\r')
let content = ''
valuesStr.forEach((x: any) => {
content += `<p><span style="${style}">${HtmlUtil.htmlEncodeByRegExp(x)}</span></p>`
})
const isVertical = item.layer.adjustments.typeTool.obj.textData.Ornt.value != 'Hrzn'
if(isVertical) {
let checkWord = value[0]+value[value.length-1]
......
......@@ -466,7 +466,7 @@ const GetTripTemplate = async () =>{
}else if(SlidesData.length>0){
SlidesData.forEach((x: any) => {
x.elements.forEach((y:any)=>{
if(y.contentStr && y.content.includes(y.contentStr)){
if(y.contentStr && y.content && y.content.includes(y.contentStr)){
let temp = HtmlUtil.htmlEncodeByRegExp(y.contentStr)
if(temp!=y.contentStr) {
y.content = y.content.replace(y.contentStr,temp)
......@@ -707,10 +707,12 @@ const sellGetTripTemplate = async () =>{
if(SalesBack.value==0) slidesStore.setTitle(dataRes.data.data.Title)
if(SalesBack.value==0&&searchData.value.sellId){
let SlidesData = JSON.parse(dataObj.TempData)
console.log(dataObj.TempData)
let newSlides = []
await SlidesData.forEach((x,i)=>{
SlidesData.forEach((x,i)=>{
x.elements.forEach((y:any)=>{
if(y.contentStr && y.content.includes(y.contentStr)){
if(y.contentStr && y.content && y.content.includes(y.contentStr)){
let temp = HtmlUtil.htmlEncodeByRegExp(y.contentStr)
if(temp!=y.contentStr) {
y.content = y.content.replace(y.contentStr,temp)
......
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