ContextToolExtension
Interface
The extension interface for ContextTool extension point.
Properties
Property | Type | Notes |
---|---|---|
string | The unique id. For widget's provided extension, the id pattern is: widgetId + extensionName | |
number | If an extension point supports multiple extensions, the index is used to determine the extension order. | |
string | The extension name. | |
string | The widget id that provides the extension. No widget id means the extension is provided by Jimu. |
index
index: number
If an extension point supports multiple extensions, the index is used to determine the extension order.
widgetId
widgetId: string
The widget id that provides the extension. No widget id means the extension is provided by Jimu.
Methods
Method | Returns | Notes |
---|---|---|
checked(props) | boolean | Check whether this tool is checked. |
disabled(props) | boolean | Check whether this tool is disabled. |
string | Return group id. | |
getIcon() | ComponentClass<SVGAttributes<SVGElement>, any> | Return the icon. |
getSettingPanel(props) | ComponentClass<unknown, any> | The setting panel of the tool. Returning null means there is no setting panel for the tool. If the returned value is not null, the setting panel will be rendered. |
getTitle(props) | string | Return the title. |
onClick(props, evt?) | void | OnClick callback. |
visible(props) | boolean | Check whether this tool is visible. |
checked
checked(props: LayoutContextToolProps): boolean
Check whether this tool is checked.
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
boolean
disabled
disabled(props: LayoutContextToolProps): boolean
Check whether this tool is disabled.
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
boolean
getIcon
Interface MethodgetIcon(): ComponentClass<SVGAttributes<SVGElement>, any>
Return the icon.
Returns
ComponentClass<SVGAttributes<SVGElement>, any>
getSettingPanel
Interface MethodgetSettingPanel(props: LayoutContextToolProps): ComponentClass<unknown, any>
The setting panel of the tool. Returning null means there is no setting panel for the tool. If the returned value is not null, the setting panel will be rendered.
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
ComponentClass<unknown, any>
getTitle
Interface MethodgetTitle(props: LayoutContextToolProps): string
Return the title.
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
string
id: string
The unique id. For widget's provided extension, the id pattern is: widgetId + extensionName