【问题标题】:Dash change words in dcc.linkdcc.link 中的破折号更改单词
【发布时间】:2021-09-27 11:26:26
【问题描述】:

我正在用 Python Dash 写作。我想动态更改 dcc.Link 中的单词。这是我当前的链接:

dcc.Link("Account", id='login_link', href='/login', style={'padding-left': '20px'})

我想在登录后动态将“帐户”一词更改为“注销”。但是,我在 dcc.Link 中找不到此属性。
https://dash.plotly.com/dash-core-components/link

有没有办法做到这一点?

【问题讨论】:

    标签: python-3.x plotly-dash


    【解决方案1】:

    这就是 children 属性。您可以使用回调根据某些输入进行更改。文档指定传入的第一个参数(如果未命名)始终是 children 属性。

    【讨论】:

      猜你喜欢
      • 2016-06-06
      • 1970-01-01
      • 1970-01-01
      • 2022-07-02
      • 1970-01-01
      • 2012-08-30
      • 2012-11-10
      • 1970-01-01
      • 2011-08-28
      相关资源
      最近更新 更多