forked from github/dataease
Merge pull request #8215 from dataease/pr@dev-v2@fix_cosole
fix(数据大屏): 修复控制台异常报错关闭sourcemap等问题
This commit is contained in:
commit
17994028a3
@ -26,6 +26,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sourcemap: true
|
sourcemap: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,12 +34,12 @@ const showLine = (isDownward, isRightward) => {
|
|||||||
|
|
||||||
hideLine()
|
hideLine()
|
||||||
components.forEach(component => {
|
components.forEach(component => {
|
||||||
|
try {
|
||||||
if (component === curComponent.value) return
|
if (component === curComponent.value) return
|
||||||
const componentStyle = getComponentRotatedStyle(component.style)
|
const componentStyle = getComponentRotatedStyle(component.style)
|
||||||
const { top, left, bottom, right } = componentStyle
|
const { top, left, bottom, right } = componentStyle
|
||||||
const componentHalfWidth = componentStyle.width / 2
|
const componentHalfWidth = componentStyle.width / 2
|
||||||
const componentHalfHeight = componentStyle.height / 2
|
const componentHalfHeight = componentStyle.height / 2
|
||||||
|
|
||||||
const conditions = {
|
const conditions = {
|
||||||
top: [
|
top: [
|
||||||
{
|
{
|
||||||
@ -152,6 +152,9 @@ const showLine = (isDownward, isRightward) => {
|
|||||||
if (needToShow.length) {
|
if (needToShow.length) {
|
||||||
chooseTheTrueLine(needToShow, isDownward, isRightward)
|
chooseTheTrueLine(needToShow, isDownward, isRightward)
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('markLine disabled')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,10 +83,10 @@ const onPositionChange = key => {
|
|||||||
positionMounted.value[key] = 0
|
positionMounted.value[key] = 0
|
||||||
}
|
}
|
||||||
const originRadio = curComponent.value.style.width / curComponent.value.style.height
|
const originRadio = curComponent.value.style.width / curComponent.value.style.height
|
||||||
curComponent.value.style[key] = Math.round(
|
if (curComponent.value.maintainRadio) {
|
||||||
|
curComponent.value.style[key] = Math.ceil(
|
||||||
(positionMounted.value[key] * canvasStyleData.value.scale) / 100
|
(positionMounted.value[key] * canvasStyleData.value.scale) / 100
|
||||||
)
|
)
|
||||||
if (curComponent.value.maintainRadio) {
|
|
||||||
if (key === 'width') {
|
if (key === 'width') {
|
||||||
curComponent.value.style['height'] = curComponent.value.style['width'] / originRadio
|
curComponent.value.style['height'] = curComponent.value.style['width'] / originRadio
|
||||||
positionMounted.value['height'] = Math.round(positionMounted.value['width'] / originRadio)
|
positionMounted.value['height'] = Math.round(positionMounted.value['width'] / originRadio)
|
||||||
@ -94,6 +94,10 @@ const onPositionChange = key => {
|
|||||||
curComponent.value.style['width'] = curComponent.value.style['height'] * originRadio
|
curComponent.value.style['width'] = curComponent.value.style['height'] * originRadio
|
||||||
positionMounted.value['width'] = Math.round(positionMounted.value['height'] * originRadio)
|
positionMounted.value['width'] = Math.round(positionMounted.value['height'] * originRadio)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
curComponent.value.style[key] = Math.round(
|
||||||
|
(positionMounted.value[key] * canvasStyleData.value.scale) / 100
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curComponent.value.component === 'Group') {
|
if (curComponent.value.component === 'Group') {
|
||||||
|
Loading…
Reference in New Issue
Block a user