相关疑难解决方法(0)

带有单击事件的基本按钮的 Dash 核心组件?

我正在尝试为不同的信息集创建一个具有多个选项卡的应用程序。我的第一个想法是使用 html 按钮,但没有 dash_core_component 用于此,而且我找不到任何可以在其位置使用的文档。基本上,当我点击一个按钮(或链接)时,我想获得一个带有按钮 id 的“clicked”事件,以便我可以重绘所选页面的布局。

有没有办法用现有的组件来做到这一点?是否有关于如何创建可以连接到回调系统的新组件的文档?我觉得我一定遗漏了一些明显的东西,但经过大量搜索后我没有找到任何东西。

谢谢!

plotly-dash

8
推荐指数
2
解决办法
2万
查看次数

Python Dash,从输入文本中获取值

我有一个输入和一个按钮,我需要在按下按钮时保存文本输入的值。

dcc.Input(id='username', value='Initial Value', type='text'),

html.Button(id='submit-button', children='Submit'),
Run Code Online (Sandbox Code Playgroud)

我的回调中遗漏了一些东西吗?

@app.callback(Output('output_div','children' ),
          [Input('submit-button')],
          [State('input-element', 'value')],
          [Event('submit-button', 'click'])

 def update_output(input_element):
    print(input_element)
Run Code Online (Sandbox Code Playgroud)

谢谢

python-3.x plotly plotly-dash

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

plotly-dash ×2

plotly ×1

python-3.x ×1