mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 修改页面 changeSize 逻辑
This commit is contained in:
@@ -483,9 +483,9 @@ export const useChartEditStore = defineStore({
|
||||
}
|
||||
},
|
||||
// * 设置页面大小
|
||||
setPageSize(): void {
|
||||
this.setPageStyle('height', `${this.editCanvasConfig.height}px`)
|
||||
this.setPageStyle('width', `${this.editCanvasConfig.width}px`)
|
||||
setPageSize(scale: number): void {
|
||||
this.setPageStyle('height', `${this.editCanvasConfig.height * scale}px`)
|
||||
this.setPageStyle('width', `${this.editCanvasConfig.width * scale}px`)
|
||||
},
|
||||
// * 计算缩放
|
||||
computedScale() {
|
||||
@@ -540,6 +540,7 @@ export const useChartEditStore = defineStore({
|
||||
setScale(scale: number, sys = true): void {
|
||||
if (!this.getEditCanvas.lockScale) {
|
||||
this.setPageSizeClass()
|
||||
this.setPageSize(scale)
|
||||
this.setPageStyle('transform', `scale(${scale})`)
|
||||
this.getEditCanvas.userScale = scale
|
||||
if (sys) {
|
||||
|
||||
Reference in New Issue
Block a user