Custom components
声明一个组件
创建并注册一个自定义组件。
from st.components.v1 import declare_component
declare_component(
"custom_slider",
"/frontend",
)
HTML
在iframe中显示一个HTML字符串。
from st.components.v1 import html
html(
"<p>Foo bar.</p>"
)
iframe
在iframe中加载远程URL。
from st.components.v1 import iframe
iframe(
"docs.streamlit.io"
)
还有问题吗?
我们的 论坛 充满了有用的信息和Streamlit专家。