fix
This commit is contained in:
@@ -387,7 +387,10 @@ export default defineComponent({
|
||||
})
|
||||
data.designSingleItemDTOList.forEach((item)=>{
|
||||
let front = arr
|
||||
let imageCategory1 = arr[1].imageCategory
|
||||
let imageCategory1
|
||||
if(arr.length > 1){
|
||||
imageCategory1 = arr[1].imageCategory
|
||||
}
|
||||
arr.forEach((i)=>{
|
||||
let imageCategory = i.imageCategory.split('_')[0]
|
||||
if(item.id == i.id){
|
||||
@@ -402,7 +405,7 @@ export default defineComponent({
|
||||
// item.offset = [(i?.style?.left.replace(/px/g,'')*ratio).toFixed(0),(i?.style?.top.replace(/px/g,'')*ratio).toFixed(0)]
|
||||
}
|
||||
})
|
||||
if(item.type == this.capitalizeFirstLetter(imageCategory1)){
|
||||
if(arr.length > 1 && item.type == this.capitalizeFirstLetter(imageCategory1)){
|
||||
item.scale = front?.imageSize?Number(((front?.style?.width.replace(/px/g,'')*ratio)/front?.imageSize[0]).toFixed(2)):1
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user