优化Code.vue控件

This commit is contained in:
jingrow 2026-03-17 00:10:21 +08:00
parent ec5a32f907
commit 77084a0de9

View File

@ -196,8 +196,8 @@ onBeforeUnmount(disposeEditor)
.code-editor {
width: 100%;
display: grid;
grid-template-rows: 1fr auto;
display: flex;
flex-direction: column;
gap: 6px;
}
@ -216,11 +216,13 @@ onBeforeUnmount(disposeEditor)
}
.code-editor__monaco-wrap.collapsed {
height: auto;
height: auto;
min-height: 150px;
}
.code-editor__monaco-wrap:not(.collapsed) {
height: auto;
height: auto;
min-height: 400px;
}
/* 只读模式样式 */
@ -231,12 +233,14 @@ onBeforeUnmount(disposeEditor)
.code-editor__monaco-host {
width: 100%;
height: 100%;
min-height: 150px;
height: 300px;
}
.code-editor__preview {
width: 100%;
height: 100%;
min-height: 120px;
max-height: 400px;
padding: 12px;
overflow: auto;
}