Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
25844276
authored
Jun 18, 2026
by
siigure
Committed by
GitHub
Jun 18, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 短代码块跟随代码长度显示 (#7142)
parent
62ed4655
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
projects/app/src/components/Markdown/index.module.scss
+4
-15
No files found.
projects/app/src/components/Markdown/index.module.scss
View file @
25844276
...
@@ -536,30 +536,20 @@
...
@@ -536,30 +536,20 @@
}
}
}
}
// 完整响应弹窗代码块:
外层固定为弹窗内容区 80%,header 固定,内容区
内部滚动。
// 完整响应弹窗代码块:
短内容随高度收缩,超出弹窗内容区 80% 后
内部滚动。
.codeJsonConstrained
{
.codeJsonConstrained
{
:global
(
.markdown
)
:global
(
.code-block-wrapper
),
:global
(
.markdown
)
:global
(
.code-block-wrapper
),
:global
(
.markdown
)
:global
(
.htmlCodeBlock
)
{
:global
(
.markdown
)
:global
(
.htmlCodeBlock
)
{
display
:
flex
;
flex-direction
:
column
;
height
:
var
(
--
response-code-block-height
);
max-height
:
var
(
--
response-code-block-height
);
width
:
100%
;
width
:
100%
;
overflow
:
hidden
;
overflow
:
hidden
;
border-radius
:
var
(
--
chakra-radii-md
);
border-radius
:
var
(
--
chakra-radii-md
);
}
}
:global
(
.markdown
)
:global
(
.code-header
)
{
flex-shrink
:
0
;
}
:global
(
.markdown
)
:global
(
.code-block-wrapper
)
pre
,
:global
(
.markdown
)
:global
(
.code-block-wrapper
)
pre
,
:global
(
.markdown
)
:global
(
.htmlCodeBlock
)
pre
,
:global
(
.markdown
)
:global
(
.htmlCodeBlock
)
pre
,
:global
(
.markdown
)
:global
(
.code-block-body
)
{
:global
(
.markdown
)
:global
(
.code-block-body
)
{
flex
:
1
1
0
;
min-height
:
0
;
height
:
auto
!
important
;
height
:
auto
!
important
;
max-height
:
none
!
important
;
max-height
:
calc
(
var
(
--
response-code-block-height
)
-
40px
)
!
important
;
overflow
:
auto
!
important
;
overflow
:
auto
!
important
;
margin
:
0
!
important
;
margin
:
0
!
important
;
border-bottom-left-radius
:
var
(
--
chakra-radii-md
);
border-bottom-left-radius
:
var
(
--
chakra-radii-md
);
...
@@ -568,9 +558,8 @@
...
@@ -568,9 +558,8 @@
// HTML 预览区在完整响应弹窗内跟随外层限高,覆盖聊天的 60vh 上限。
// HTML 预览区在完整响应弹窗内跟随外层限高,覆盖聊天的 60vh 上限。
:global
(
.markdown
)
:global
(
.htmlCodeBlock
)
:global
(
.code-block-body
)
{
:global
(
.markdown
)
:global
(
.htmlCodeBlock
)
:global
(
.code-block-body
)
{
flex
:
1
1
0
;
height
:
auto
!
important
;
min-height
:
0
;
max-height
:
calc
(
var
(
--
response-code-block-height
)
-
40px
)
!
important
;
max-height
:
none
!
important
;
overflow
:
auto
!
important
;
overflow
:
auto
!
important
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment