瀏覽代碼

fix: 解决右侧代码过长时不缩放啥也做不了的 bug

shizhong 1 年之前
父節點
當前提交
6e5552c02e
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/views/infra/codegen/components/Preview.vue

+ 3 - 1
src/views/infra/codegen/components/Preview.vue

@@ -22,7 +22,9 @@
             :key="item.filePath"
           >
             <XTextButton style="float: right" :title="t('common.copy')" @click="copy(item.code)" />
-            <pre><code v-dompurify-html="highlightedCode(item)" class="hljs"></code></pre>
+            <el-scrollbar height="600px">
+              <pre><code v-dompurify-html="highlightedCode(item)" class="hljs"></code></pre>
+            </el-scrollbar>
           </el-tab-pane>
         </el-tabs>
       </el-card>