def __init__(self, parent, props):
super().__init__(layout=ipywidgets.Layout(align_items='flex-end'))
self.parent = parent
self.props = props
self.install_button = ipywidgets.Button()
self.install_button.add_class('nbv-table-row')
self.remove_button = ipywidgets.Button(description='remove')
self.remove_button.add_class('nbv-table-row')
self.html = ipywidgets.HTML()
if self.props['writable'] == 'INSTALLED':
self.chidlren = (self.html,)
else:
self.children = (self.html, self.install_button, self.remove_button)
self.install_button.on_click(self.install)
self.remove_button.on_click(self.uninstall)
self.rerender()
visualization.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录