mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-09-08 21:19:30 +00:00
fix(form): 修复隐藏字段校验处理
This commit is contained in:
parent
6f3f321736
commit
78b34a452b
@ -5,7 +5,9 @@
|
|||||||
:class="`m-form-container m-container-${type || ''} ${config.className || ''}${config.tip ? ' has-tip' : ''}`"
|
:class="`m-form-container m-container-${type || ''} ${config.className || ''}${config.tip ? ' has-tip' : ''}`"
|
||||||
:style="config.style"
|
:style="config.style"
|
||||||
>
|
>
|
||||||
<MHidden v-if="type === 'hidden'" :name="`${name}`" :prop="itemProp" :model="model"></MHidden>
|
<TMagicFormItem v-if="type === 'hidden'" v-bind="formItemProps" style="display: none">
|
||||||
|
<MHidden :name="`${name}`" :prop="itemProp" :model="model"></MHidden>
|
||||||
|
</TMagicFormItem>
|
||||||
|
|
||||||
<component
|
<component
|
||||||
v-else-if="items && !text && type && display"
|
v-else-if="items && !text && type && display"
|
||||||
|
|||||||
@ -590,7 +590,7 @@ const removeTabItemsLazy = (node: any): void => {
|
|||||||
* 无法校验到这些标签页内的字段。校验场景需要一次性渲染全部字段,故在此统一去除 lazy。
|
* 无法校验到这些标签页内的字段。校验场景需要一次性渲染全部字段,故在此统一去除 lazy。
|
||||||
* 处理基于深拷贝,不会污染调用方传入的原始 config。
|
* 处理基于深拷贝,不会污染调用方传入的原始 config。
|
||||||
*/
|
*/
|
||||||
const stripTabItemsLazy = (config: FormConfig): FormConfig => {
|
export const stripTabItemsLazy = (config: FormConfig): FormConfig => {
|
||||||
const cloned = cloneConfigValue(config);
|
const cloned = cloneConfigValue(config);
|
||||||
removeTabItemsLazy(cloned);
|
removeTabItemsLazy(cloned);
|
||||||
return cloned;
|
return cloned;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user