getAllWidgets
Method | getAllWidgets() | Get all the component information in the report object |
---|---|---|
Parameter | - | - |
Return value | { [key: string,value:object] } | The key is the component name, and the value is the component object |
Example | View all component information in the report object in the dashboard: _g().getAllWidgets(); | |
Application example | Browser F12 developer tools to view all component information in the dashboard: | |
Mobile | Support mobile terminal |
getWidgetByName
Method | getWidgetByName(name) | Get a component in the report object, you can get the components in the body and the widgets in the parameter pane |
---|---|---|
Parameter | name: string | component name/widget name,string |
Return value | object | component/widget object,need to be used in conjunction with attributes/methods of components/widgets |
Example | Note: When the code is added in the "after initialization" event, it is recommended to add a delay function, otherwise an error may occur because the report object is not fully created. An example is as follows:
Example 1: In the dashboard, get the drop-down box widget comboBox0 on the parameter pane
Example 2: In the dashboard, get the drop-down box widget comboBox0 in the body
Example 3: In the dashboard, get the report block report0 in the body
Example 4: In a dashboard, get the tab block tabpane0 in the body _g().getWidgetByName("tabpane0"); | |
Application example | Customize a button, get the report block when the button is clicked, and set the report block to be invisible to hide it: Click to download the template: | |
Mobile | Suuport mobile terminal |