前端js文件中定义itemId
xtype: 'fieldset',
title:'不合格对策书',
hidden:true,
itemId:'defectiveReport',//自己定义itemId
margin: 5,
//某个代码中监听触发显示未显示 本次不讨论监听 简写
listeners: {
change: 'onIsDefectiveReportChange'//监听事件名
}
前端controller文件中进行处理
//监听事件名
onIsDefectiveReportChange: function(combo, newValue, oldValue, eOpts) {
var me = this;
//获得操作对象 通过itemId获取注意#要添加不然头秃也获取不到哦
var cmVehicle = me.view.down('#defectiveReport');
//这是是我判断是否显示的逻辑
if(newValue.isDefectiveReportOption){
//显示
cmVehicle.show();
}else{
//隐藏
cmVehicle.hide();
}
},