File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ provide('theme', themeComputed)
120120const { copy, copied } = useClipboard ({ source: store .state .activeFile .code , legacy: true })
121121
122122const isCollapse = ref (props .collapse )
123+ const minHeightForCode = computed (() => isCollapse .value ? ' 0' : ' var(--vue-preview-editor-min-height)' )
123124const maxHeightForCode = computed (() => isCollapse .value ? ' 0' : ' var(--vue-preview-editor-max-height)' )
124125
125126const previewBodyStyle = computed <Partial <CSSStyleDeclaration >>(() => typeof props .previewBodyStyle === ' string' ? JSON .parse (decodeURIComponent (props .previewBodyStyle )) : props .previewBodyStyle )
@@ -168,6 +169,7 @@ const isHover = useElementHover(vuePreviewContainerRef)
168169 --vue-preview-color-icon-bg-hover : hsl (220 , 95% , 95% );
169170 --vue-preview-color-model-bg : hsla (0 , 0% , 80% , 0.1 );
170171 --vue-preview-editor-max-height : 50vh ;
172+ --vue-preview-editor-min-height : 200px ;
171173}
172174 </style >
173175
@@ -253,6 +255,7 @@ const isHover = useElementHover(vuePreviewContainerRef)
253255 box-sizing : border-box ;
254256 overflow-y : scroll ;
255257 border-radius : 0 0 var (--vue-preview-radius ) var (--vue-preview-radius );
258+ min-height : v-bind (' minHeightForCode' );
256259 max-height : v-bind (' maxHeightForCode' );
257260 transition : max-height 0.3s ;
258261 }
You can’t perform that action at this time.
0 commit comments