hookehuyr

fix 预览页面滚动条显示问题

1 <!-- 1 <!--
2 * @Date: 2023-12-18 15:01:00 2 * @Date: 2023-12-18 15:01:00
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-07-15 11:23:30 4 + * @LastEditTime: 2024-07-15 16:22:18
5 * @FilePath: /vue-flow-editor/src/editor/vue-flow-editor-preview1.vue 5 * @FilePath: /vue-flow-editor/src/editor/vue-flow-editor-preview1.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
8 <template> 8 <template>
9 <transition name="vue-flow-editor-preview-transition"> 9 <transition name="vue-flow-editor-preview-transition">
10 <div class="vue-flow-editor-preview1" v-if="p_value"> 10 <div class="vue-flow-editor-preview1" v-if="p_value">
11 - <div class="vue-flow-editor-preview-body" ref="body" style="overflow: auto;"> 11 + <div class="vue-flow-editor-preview-body" ref="body">
12 <div class="vue-flow-editor-preview-target" ref="target"></div> 12 <div class="vue-flow-editor-preview-target" ref="target"></div>
13 </div> 13 </div>
14 <div style="position: fixed; bottom: 1rem; right: 1rem; font-size: 25px;"> 14 <div style="position: fixed; bottom: 1rem; right: 1rem; font-size: 25px;">
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
80 this.$emit('input', this.p_value) 80 this.$emit('input', this.p_value)
81 }, 81 },
82 zoomIn() { 82 zoomIn() {
83 + this.$refs.body.style.overflow = 'auto';
83 const container = this.$refs.target 84 const container = this.$refs.target
84 this.currentWidth = this.currentWidth + 100; 85 this.currentWidth = this.currentWidth + 100;
85 this.currentHeight = this.currentHeight + 100; 86 this.currentHeight = this.currentHeight + 100;
...@@ -105,6 +106,7 @@ ...@@ -105,6 +106,7 @@
105 this.graph.fitView(20) 106 this.graph.fitView(20)
106 }, 107 },
107 zoomOut() { 108 zoomOut() {
109 + this.$refs.body.style.overflow = 'auto';
108 const container = this.$refs.target 110 const container = this.$refs.target
109 this.currentWidth = this.currentWidth - 100; 111 this.currentWidth = this.currentWidth - 100;
110 this.currentHeight = this.currentHeight - 100; 112 this.currentHeight = this.currentHeight - 100;
......