Преглед изворни кода

feat: 更新DataFrame和Plotly图表容器的宽度设置,支持自适应宽度

zhch158_admin пре 1 месец
родитељ
комит
3ca33ce0d1
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      streamlit_test/container滚动条.md

+ 2 - 2
streamlit_test/container滚动条.md

@@ -186,7 +186,7 @@ def container_dataframe():
     })
     
     with st.container(height=300, border=True):
-        st.dataframe(wide_df, use_container_width=True)
+        st.dataframe(wide_df, width='stretch')
     
     st.write("☝️ DataFrame自动支持横向滚动")
 
@@ -251,7 +251,7 @@ def container_plotly_chart():
     )
     
     with st.container(height=450, border=True):
-        st.plotly_chart(fig, use_container_width=False)
+        st.plotly_chart(fig, width='content')
     
     st.write("☝️ Plotly图表在容器中自动支持横向滚动")