perf: 优化提及窗口

This commit is contained in:
kuaifan 2025-07-25 15:52:04 +08:00
parent 13fb9db52b
commit 0eba0c6a4b
3 changed files with 18 additions and 9 deletions

View File

@ -53,7 +53,7 @@
"postcss": "^8.4.5",
"prismjs": "^1.29.0",
"quill-hi": "^2.0.0-rc1",
"quill-mention-hi": "^4.0.0-8",
"quill-mention-hi": "^4.0.0-9",
"resolve-url-loader": "^4.0.0",
"sass": "1.77.4",
"sass-loader": "14.2.1",

View File

@ -1993,10 +1993,10 @@ export default {
})
}
this.userCache.push(...[{
label: [{id: 0, value: this.$L('群内成员'), disabled: true}],
label: [{id: 0, value: this.$L('群内成员'), className: "sticky-top", disabled: true}],
list,
}, {
label: [{id: 0, value: this.$L('群外成员'), disabled: true}],
label: [{id: 0, value: this.$L('群外成员'), className: "sticky-top", disabled: true}],
list: moreUser,
}])
} else {
@ -2005,7 +2005,7 @@ export default {
label: null,
list: [{id: 0, value: this.$L('所有人.All'), tip: ''}]
}, {
label: [{id: 0, value: this.$L('群成员'), disabled: true}],
label: [{id: 0, value: this.$L('群成员'), className: "sticky-top", disabled: true}],
list,
}])
} else {

View File

@ -1078,11 +1078,7 @@
.ql-mention-list-container {
width: auto;
min-width: 220px;
max-width: 280px;
max-height: 360px;
overflow-x: hidden;
overflow-y: auto;
overflow: hidden;
&.task-mention {
.ql-mention-list {
@ -1101,6 +1097,12 @@
}
.ql-mention-list {
min-width: 220px;
max-width: 280px;
max-height: 360px;
overflow-x: hidden;
overflow-y: auto;
> li {
&:first-child {
margin-top: 8px;
@ -1121,6 +1123,13 @@
border-radius: 4px;
}
&.sticky-top {
position: sticky;
background-color: #ffffff;
top: 0;
z-index: 10;
}
.mention-item-at {
flex-shrink: 0;
width: 28px;