perf: 优化待办消息样式

This commit is contained in:
kuaifan 2024-05-10 23:52:41 +09:00
parent d3bda0d869
commit f9d1aa93c4
3 changed files with 19 additions and 1 deletions

View File

@ -3115,7 +3115,7 @@ export default {
this.onPositionId(data.reply_id, data.msg_id) this.onPositionId(data.reply_id, data.msg_id)
}, },
onViewText({target}, el) { onViewText({target, clientX}, el) {
if (this.operateVisible) { if (this.operateVisible) {
return return
} }
@ -3167,6 +3167,9 @@ export default {
case "LI": case "LI":
const dataClass = target.getAttribute('data-list') const dataClass = target.getAttribute('data-list')
if (['checked', 'unchecked'].includes(dataClass)) { if (['checked', 'unchecked'].includes(dataClass)) {
if (clientX - target.getBoundingClientRect().x > 18) {
return;
}
let listElement = el.parentElement; let listElement = el.parentElement;
while (listElement) { while (listElement) {
if (listElement.classList.contains('dialog-scroller')) { if (listElement.classList.contains('dialog-scroller')) {

View File

@ -190,6 +190,14 @@
width: auto; width: auto;
min-width: 1.2em; min-width: 1.2em;
} }
> .ql-ui:before {
color: #0088ff;
}
&[data-list=bullet] {
> .ql-ui:before {
font-weight: 900;
}
}
&[data-list=checked], &[data-list=checked],
&[data-list=unchecked] { &[data-list=unchecked] {
> .ql-ui:before { > .ql-ui:before {
@ -204,6 +212,7 @@
&[data-list=unchecked] { &[data-list=unchecked] {
> .ql-ui:before { > .ql-ui:before {
content: "\e6f1"; content: "\e6f1";
color: #777;
} }
} }
} }

View File

@ -824,6 +824,12 @@
text-align: left; text-align: left;
margin-right: 0.2em; margin-right: 0.2em;
} }
&[data-list=unchecked] {
&::before {
color: #777;
}
}
} }
} }