优化TextEditor控件,显示Font Size
This commit is contained in:
parent
d0f6383d16
commit
089e6c0d2f
@ -111,9 +111,7 @@ function init() {
|
||||
try {
|
||||
const root = host.value as HTMLElement
|
||||
const label = root.querySelector('.ql-size .ql-picker-label') as HTMLElement | null
|
||||
const firstItem = root.querySelector('.ql-size .ql-picker-item') as HTMLElement | null
|
||||
if (label) label.setAttribute('data-value', '---')
|
||||
if (firstItem) firstItem.setAttribute('data-value', '---')
|
||||
if (label) label.setAttribute('data-value', 'font size')
|
||||
} catch {}
|
||||
|
||||
setHtml(String((props.record as any)?.[props.df.fieldname] ?? ''))
|
||||
@ -166,6 +164,11 @@ watch(() => props.canEdit, (v) => { (quill as any)?.enable(!!v) })
|
||||
.text-editor :deep(.ql-snow .ql-picker.ql-size .ql-picker-label::before) {
|
||||
content: attr(data-value);
|
||||
}
|
||||
|
||||
.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';
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user