你至少要两个控件。假如文本框中录入内容。下拉框出现,那么就在文本框中设置编辑结束事件
var bl= this.getValue()
if (bl.length==0) {
this.options.form.getWidgetByName("mycode").setVisible(false); //mycode隐藏
} else {
this.options.form.getWidgetByName("mycode").setVisible(true); //mycode显示
}
还有你设置mycode初始化就隐藏!!
![1693475983138026.png image.png](/upload/wenda/20230831/1693475983138026.png)