feat(admin): render mltextarea fields per locale
- MLField.vue is the one locale-switching wrapper; MLTextField, MLMarkdownField and the new MLTextareaField are shells around it - isMLFieldType replaces the inline ML type-name checks in formState, FormView and RelationChildModal - register mltextarea as a group-labelled control; rebuild dist
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
fieldErrors,
|
||||
focusField,
|
||||
initialValues,
|
||||
isMLFieldType,
|
||||
mergeMLValue,
|
||||
panelDomId,
|
||||
snapshot,
|
||||
@@ -217,7 +218,7 @@ function adopt(record: AdminRecord, meta?: RecordMeta): void {
|
||||
for (const field of fields.value) {
|
||||
if (field.type === 'password') {
|
||||
next[field.name] = ''
|
||||
} else if (field.type === 'mltext' || field.type === 'mlmarkdown') {
|
||||
} else if (isMLFieldType(field.type)) {
|
||||
next[field.name] = mergeMLValue(record[field.name], locales)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user