feat(editor): add text locking support and mobile toolbar scroll

This commit is contained in:
2026-04-21 10:34:49 +08:00
parent bb2ae9c139
commit 9091e99a57
3 changed files with 77 additions and 0 deletions

View File

@@ -113,6 +113,40 @@ html, body {
z-index: 10000;
}
/* 移动端:允许横向滚动 */
@media (max-width: 768px) {
.editor-toolbar {
justify-content: flex-start;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
padding: 8px;
}
.editor-toolbar::-webkit-scrollbar {
display: none;
}
.toolbar-group {
gap: 2px;
flex-shrink: 0;
}
.toolbar-btn {
width: 32px;
height: 32px;
font-size: 14px;
}
.toolbar-label {
font-size: 11px;
}
.toolbar-label span {
display: none;
}
.roller-picker {
min-width: 50px;
height: 32px;
padding: 2px 4px;
}
}
.editor-toolbar.active {
visibility: visible;
opacity: 1;
@@ -412,6 +446,19 @@ html, body {
cursor: grab;
}
/* 锁定状态 */
.text-input.locked {
cursor: default !important;
}
.text-input.locked.selected {
outline: 2px dashed rgba(255, 193, 7, 0.8);
}
.text-input.locked .text-delete-btn {
display: none !important;
}
/* 空输入框显示 placeholder */
.text-input.show-placeholder::before {
content: attr(data-placeholder);