const extension: JupyterFrontEndPlugin<void> = {
id: 'some-id',
autoStart: true || false,
activate: async(app: JupyterFrontEnd, palette: ICommandPalette) => {
const { commands } = app;
let widget1: widget= new widget(); // create the widget
widget1.id = 'widget1-id';
widget1.title.label = 'widget Label';
widget1.title.caption="widget hovering text description"; // this will show the text when you hover over an extension
app.shell.add(widget1, 'right', { rank: 1 });
...
...
... rest of your code ...
}
1条答案
按热度按时间dgjrabp21#
要在扩展中添加悬停框,您必须将值传递给[widgetInstance].title.caption例如: