在执行代码块时临时显示一条消息。
函数签名
st.spinner(text="In progress...")
参数 | 说明 |
---|---|
text (str) | 执行该块时显示的消息 |
示例
with st.spinner('Wait for it...'):
time.sleep(5)
st.success('Done!')
相关用法
- Python Streamlit st.slider用法及代码示例
- Python Streamlit st.subheader用法及代码示例
- Python Streamlit st.success用法及代码示例
- Python Streamlit st.set_page_config用法及代码示例
- Python Streamlit st.selectbox用法及代码示例
- Python Streamlit st.select_slider用法及代码示例
- Python Streamlit st.snow用法及代码示例
- Python Streamlit st.stop用法及代码示例
- Python Streamlit st.experimental_singleton.clear用法及代码示例
- Python Streamlit st.bokeh_chart用法及代码示例
- Python Streamlit st.caption用法及代码示例
- Python Streamlit st.text_input用法及代码示例
- Python Streamlit st.area_chart用法及代码示例
- Python Streamlit st.title用法及代码示例
- Python Streamlit st.cache用法及代码示例
- Python Streamlit st.experimental_singleton用法及代码示例
- Python Streamlit st.empty用法及代码示例
- Python Streamlit st.error用法及代码示例
- Python Streamlit st.video用法及代码示例
- Python Streamlit st.vega_lite_chart用法及代码示例
- Python Streamlit st.header用法及代码示例
- Python Streamlit st.container用法及代码示例
- Python Streamlit st.form_submit_button用法及代码示例
- Python Streamlit st.form用法及代码示例
- Python Streamlit st.plotly_chart用法及代码示例
注:本文由纯净天空筛选整理自streamlit.io大神的英文原创作品 st.spinner。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。