我用的
_g().getWidgetByName('report0').setVisible(false);
_g().getWidgetByName('report1').setVisible(true);
这个js,但是却报了CustomJSError : Cannot read properties of undefined (reading 'setVisible') 设置点击事件无法读取未定义的属性(读取“setVisible”),拿不到对象,想问一下是语法问题吗?该怎么修改?
setTimeout(function() {
},300)
可以用另一个获取元素的方法
$("div[widgetname=控件名]")可以定位到控件,控件名必须全部大写。
参考
https://help.fanruan.com/finereport/doc-view-3312.html
正常这个语法没有问题
怀疑你的版本过低,需要换两一个写法