你好,我是撇号世界的新手,我有一个问题是,如果从外部召唤,是否可以使用showFields隐藏数组的元素。
module.exports = {
extend: 'apostrophe-widgets',
label: 'One Column',
addFields: [
{
type: 'select',
name: 'columnType',
label: ' How many type columns do you want?',
choices: [
{
label: '1',
value: '1',
showFields: [ ...]
},
},
{
name: 'columns',
label: 'Column',
type: 'array',
titleField: 'array',
schema: [
{
type: 'select',
name: 'column1',
label: 'size column 1',
choices: [
{label: '',value: '',},
{label: '1',value: '-1',},
]
},
]
}
],
}
可以隐藏元素'column1'。如果你从showfiel的'columnType'属性调用?
目前,showFields
无法访问嵌套在数组模式中的字段。但是,您可以使用showFields显示和隐藏具有不同模式的两个单独的数组字段,并根据所选的数据使用相应的数据。