fix(NcRichText): include all label items
Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
This commit is contained in:
Родитель
d7976726c1
Коммит
dc105c8a60
|
@ -484,7 +484,7 @@ export default {
|
|||
if (String(type) === 'li' && Array.isArray(children)
|
||||
&& children[0].type === 'input'
|
||||
&& children[0].props.type === 'checkbox') {
|
||||
const [inputNode, , label] = children
|
||||
const [inputNode, , ...labelParts] = children
|
||||
const id = 'markdown-input-' + GenRandomId(5)
|
||||
const propsToForward = { ...inputNode.props }
|
||||
// The checked prop is name modelValue for NcCheckboxRadioSwitch
|
||||
|
@ -495,9 +495,9 @@ export default {
|
|||
id,
|
||||
disabled: !this.interactive,
|
||||
'onUpdate:modelValue': (value) => {
|
||||
this.$emit('interact:todo', { id, label, value })
|
||||
this.$emit('interact:todo', { id, label: labelParts.join(''), value })
|
||||
},
|
||||
}, [label])
|
||||
}, labelParts)
|
||||
return h(type, props, [inputComponent])
|
||||
}
|
||||
}
|
||||
|
@ -551,4 +551,8 @@ export default {
|
|||
a:not(.rich-text--component) {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
:deep(.checkbox-content__text) {
|
||||
gap: 4px;
|
||||
}
|
||||
</style>
|
||||
|
|
Загрузка…
Ссылка в новой задаче