【发布时间】:2022-01-17 20:39:03
【问题描述】:
是否可以对我的破折号情节回调使用多个输入,但只有一个触发回调?好像不是这样的。
我只想在按下按钮时触发回调。如果我不将它作为输入之一传递,我不知道如何在回调函数中获取我需要的其他数据。
如果我“get_file”发生变化,即使“按钮”没有被点击,这也会运行
@app.callback(
Output("file_to_upload", "children"),
[Input("Button", "n_clicks"),
Input("get_file", "filename"),
Input("get_file", "contents")]
)
def get_query_file(n_clicks, uploaded_filenames, uploaded_file_contents):
这不起作用,因为我需要函数中的文件名和内容
@app.callback(
Output("file_to_upload", "children"),
[Input("Button", "n_clicks")]
)
def get_query_file(n_clicks):
【问题讨论】:
标签: python callback plotly plotly-dash