优化TextEditor控件,显示Font Size下滑条
This commit is contained in:
parent
089e6c0d2f
commit
93b4eef7a2
@ -108,12 +108,6 @@ function init() {
|
||||
modules: { toolbar, imageResize: {}, magicUrl: true }
|
||||
})
|
||||
|
||||
try {
|
||||
const root = host.value as HTMLElement
|
||||
const label = root.querySelector('.ql-size .ql-picker-label') as HTMLElement | null
|
||||
if (label) label.setAttribute('data-value', 'font size')
|
||||
} catch {}
|
||||
|
||||
setHtml(String((props.record as any)?.[props.df.fieldname] ?? ''))
|
||||
|
||||
quill.on('text-change', (_d: any, _o: any, source: string) => {
|
||||
@ -167,7 +161,13 @@ watch(() => props.canEdit, (v) => { (quill as any)?.enable(!!v) })
|
||||
|
||||
.text-editor :deep(.ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before),
|
||||
.text-editor :deep(.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=""]::before) {
|
||||
content: 'font size';
|
||||
content: 'Font Size';
|
||||
}
|
||||
|
||||
/* 字号下拉:限制最大高度并启用滚动 */
|
||||
.text-editor :deep(.ql-snow .ql-picker.ql-size .ql-picker-options) {
|
||||
max-height: 240px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user