update src/views/chart/ContentEdit/components/EditRule/index.vue.

修改 宽度*2  低于1920时拖不动和修改宽高时滚动条没变化

Signed-off-by: zhong <1781507490@qq.com>
This commit is contained in:
zhong 2024-06-29 04:09:58 +00:00 committed by 奔跑的面条
parent 0866ceccac
commit ef912f91b2

View File

@ -13,7 +13,7 @@
>
</sketch-rule>
<div ref="$app" class="edit-screens" @scroll="handleScroll">
<div ref="$container" class="edit-screen-container" :style="{ width: width * 2 + 'px' }">
<div ref="$container" class="edit-screen-container" :style="{ width: containerWidth }">
<div
ref="refSketchRuleBox"
class="canvas"
@ -62,8 +62,13 @@ const scale = computed(() => {
return chartEditStore.getEditCanvas.scale
})
//
//
const containerWidth = computed(() => {
return `${window.innerWidth * 2}px`
})
//
const containerHeight = computed(() => {
return `${height.value * 2}px`
})
@ -203,14 +208,12 @@ watch(
(newValue, oldValue) => {
if (oldValue !== newValue && chartLayoutStore.getRePositionCanvas) {
chartLayoutStore.setItemUnHandle(ChartLayoutStoreEnum.RE_POSITION_CANVAS, false)
handleScroll()
setTimeout(() => {
}
handleScroll()
setTimeout(() => {
canvasPosCenter()
reDraw()
}, 400)
} else {
reDraw();
}
}, 400)
}
)
@ -337,7 +340,7 @@ window.onKeySpacePressHold = (isHold: boolean) => {
.edit-screen-container {
position: absolute;
height: v-bind('containerWidth');
height: v-bind('containerHeight');
top: 0;
left: 0;
}