2026-04-19-00-01-50 - 高亮样式柔化、点击空白取消、打印高亮隔离、下划线配置同步
This commit is contained in:
@@ -60,14 +60,16 @@ export default function ReportEditor() {
|
||||
if (!editorRef.current) return;
|
||||
const allFields = editorRef.current.querySelectorAll('.field-value');
|
||||
allFields.forEach(el => {
|
||||
(el as HTMLElement).style.backgroundColor = '#f8fafc';
|
||||
(el as HTMLElement).style.boxShadow = 'none';
|
||||
(el as HTMLElement).style.backgroundColor = '';
|
||||
(el as HTMLElement).style.outline = '';
|
||||
(el as HTMLElement).style.outlineOffset = '';
|
||||
});
|
||||
if (activeFieldKey) {
|
||||
const targetEl = editorRef.current.querySelector(`.field-value[data-bind="${activeFieldKey}"]`) as HTMLElement;
|
||||
if (targetEl) {
|
||||
targetEl.style.backgroundColor = '#eff6ff';
|
||||
targetEl.style.boxShadow = '0 0 0 2px #3b82f6';
|
||||
targetEl.style.backgroundColor = '#f1f5f9';
|
||||
targetEl.style.outline = '1px solid #94a3b8';
|
||||
targetEl.style.outlineOffset = '1px';
|
||||
targetEl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
@@ -432,6 +434,9 @@ export default function ReportEditor() {
|
||||
return;
|
||||
}
|
||||
|
||||
// 点击空白处清除高亮
|
||||
setActiveFieldKey(null);
|
||||
|
||||
const placeholder = targetEl.closest('.image-placeholder') as HTMLElement | null;
|
||||
if (!placeholder) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user