在 Dash 中,输出需要有回调,但是如果你想在后端触发事件,而前端没有任何输出,该怎么办?
添加布局中不存在的
Output
和 component_id
并设置 component_property='children'
@callback(
Output('none', 'children'),
...
)...
社区长期以来一直要求不带输出的回调,并且可以从 dash 版本 2.17.0 (2024-05-03) 开始使用,请参阅变更日志以及版本2.17.1中的修复。