Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporate-culture-qd
Commits
d0f6e1ee
Commit
d0f6e1ee
authored
Jun 22, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
styles: 增加评论框的默认高度
parent
98a37f06
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
index.vue
src/components/common/CommentBox/index.vue
+1
-1
index.vue
src/components/common/RichTextarea/index.vue
+13
-2
No files found.
src/components/common/CommentBox/index.vue
View file @
d0f6e1ee
...
...
@@ -55,7 +55,7 @@ interface CommentBoxProps {
}
const
{
textAreaHeight
=
55
,
textAreaHeight
=
100
,
placeholder
=
'请输入内容'
,
showMention
=
true
,
}
=
defineProps
<
CommentBoxProps
>
()
...
...
src/components/common/RichTextarea/index.vue
View file @
d0f6e1ee
...
...
@@ -103,7 +103,7 @@ defineExpose({
<div
ref=
"highlightRef"
aria-hidden=
"true"
class=
"pointer-events-none absolute inset-0 overflow-hidden whitespace-pre-wrap break-words text-sm leading-5"
class=
"
gutter-stable
pointer-events-none absolute inset-0 overflow-hidden whitespace-pre-wrap break-words text-sm leading-5"
:style=
"
{ height: height + 'px' }"
:class="{ invisible: isComposing }"
>
...
...
@@ -114,7 +114,7 @@ defineExpose({
ref=
"textareaRef"
v-model=
"inputStr"
:placeholder=
"placeholder"
class=
"
w-full resize-none border-none bg-transparent outline-none text-sm leading-5
placeholder:text-gray-400 caret-gray-800"
class=
"
gutter-stable w-full resize-none border-none bg-transparent p-0 outline-none text-sm leading-5 whitespace-pre-wrap break-words
placeholder:text-gray-400 caret-gray-800"
:class=
"isComposing ? 'text-gray-800' : 'text-transparent'"
:style=
"
{ height: height + 'px' }"
:maxlength="maxlength"
...
...
@@ -182,4 +182,15 @@ defineExpose({
background
:
rgba
(
37
,
99
,
235
,
0.1
);
border-radius
:
2px
;
}
/**
* textarea 文字是透明的,真正可见的文字由下层镜像高亮层渲染,两层必须逐字对齐。
* 默认情况下 textarea 出现滚动条会占用其可用宽度,使它比无滚动条的高亮层更早换行,
* 两层错位后底部文字落到透明的 textarea 上,看起来就“变透明/看不见”。
* 给两层都加 scrollbar-gutter: stable,无论是否出现滚动条都预留同样的滚动条宽度,
* 保证两层文字可用宽度始终一致、换行同步;同时滚动条照常显示。
*/
.gutter-stable
{
scrollbar-gutter
:
stable
;
}
</
style
>
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