Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个场景,我使用滑块和单选按钮提供选项让我们说“A”和“B”
当滑块改变时,我需要知道滑块的 CustomJS 函数中活动单选按钮的值。
这可能吗。我知道我可以使用 cb_obj 访问该值,但是当通过滑块完成回调时 cb_obj 将是滑块而不是我的单选按钮组。
您可以将单选按钮作为参数发送给回调函数。例如
radio_group = RadioGroup( labels=["Option 1", "Option 2", "Option 3"], active=1,callback=callback_radio) callback_slider.args["selected"] = radio_group