diff --git a/src/views/preview/components/PreviewRenderGroup/index.vue b/src/views/preview/components/PreviewRenderGroup/index.vue index fd7b04c3..354fa29c 100644 --- a/src/views/preview/components/PreviewRenderGroup/index.vue +++ b/src/views/preview/components/PreviewRenderGroup/index.vue @@ -46,11 +46,14 @@ const props = defineProps({ required: true }, groupIndex: { - type: [String, Number], + type: Number, required: true } }) diff --git a/src/views/preview/hooks/useScale.hook.ts b/src/views/preview/hooks/useScale.hook.ts index b0185383..e4c57f97 100644 --- a/src/views/preview/hooks/useScale.hook.ts +++ b/src/views/preview/hooks/useScale.hook.ts @@ -23,6 +23,8 @@ export const useScale = (localStorageInfo: ChartEditStorageType) => { e.preventDefault() e.stopPropagation() removeEvent() + const fitDom = document.querySelector(".go-preview.fit") as HTMLElement + if (fitDom) fitDom.style.overflow = 'auto' const transform = previewRef.value.style.transform // 使用正则解析 scale(1, 1) 中的两个数值 const regRes = transform.match(/scale\((\d+\.?\d*)*/) as RegExpMatchArray