1
在主字段中寫入應該顯示子域fieldGroup !!!,但只顯示兄弟域!!! '孩子'中的'hideExpression'不起作用??? !!!角形,嵌套形式,hideExpression不起作用
在這個例子中,當字段沒有嵌套時,它們的'hideExpression'和嵌套組不響應。
vm.fields = [
{
key: 'sibling',
type: 'input',
templateOptions: {
required: true,
type: 'text',
label: 'Sibling'
},
hideExpression: '!model.parent.main'
},
{
key: 'parent',
wrapper: 'panel',
templateOptions: { label: 'Parent' },
fieldGroup: [
{
key: 'main',
type: 'input',
templateOptions: {
required: true,
type: 'text',
label: 'Main'
}
},
{
key: 'child',
wrapper: 'panel',
templateOptions: { label: 'Child' },
hideExpression: '!model.parent.main', //why it does not work ???!!!!!!!!
fieldGroup: [
{
key: 'child1',
type: 'input',
templateOptions: {
required: true,
type: 'text',
label: 'Child1'
}
},
{
key: 'child2',
type: 'input',
templateOptions: {
required: true,
type: 'number',
label: 'Child2'
}
}]
}]
}
];
The nested group remains hidden.
JS斌here。 有什麼想法?
感謝您的幫助@ckniffen! –