Skip to content

Commit b064cca

Browse files
authored
style: limit code block width (#993)
1 parent f67c66d commit b064cca

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

apps/web/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ body {
3333
::-webkit-scrollbar {
3434
width: 6px;
3535
height: 6px;
36-
background-color: #ffffff;
36+
background-color: rgba(243, 244, 247, 0.5);
3737
}
3838
3939
::-webkit-scrollbar-track {

apps/web/src/components/CodemirrorEditor/UploadImgDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ function emitUploads(file: File) {
11971197
</Form>
11981198
</TabsContent>
11991199

1200-
<TabsContent value="formCustom">
1200+
<TabsContent value="formCustom" class="grid">
12011201
<CustomUploadForm />
12021202
</TabsContent>
12031203
</Tabs>

apps/web/src/components/CustomUploadForm.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ function formCustomSave() {
4545
</script>
4646

4747
<template>
48-
<div class="space-y-4">
49-
<div class="h-60 border flex flex-col overflow-hidden">
48+
<div class="space-y-4 min-w-0">
49+
<div class="h-60 border flex flex-col">
5050
<textarea
5151
ref="formCustomTextarea"
5252
placeholder="Your custom code here."
@@ -68,6 +68,12 @@ function formCustomSave() {
6868
</template>
6969

7070
<style scoped>
71+
/* 覆盖全局的 overflow-x: hidden 设置 */
72+
:deep(.CodeMirror-scroll) {
73+
overflow-x: auto !important;
74+
overflow-y: auto !important;
75+
}
76+
7177
@media (max-width: 768px) {
7278
:deep(.CodeMirror) {
7379
font-size: 12px;

0 commit comments

Comments
 (0)