#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @Contact : liuyuqi.gov@msn.cn @Time : 2024/10/06 17:41:46 @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved. @Desc : Streamlit 应用中集成 Ant Design 组件 ''' import streamlit as st import streamlit_antd_components as sac st.set_page_config( page_title="Ant Design", page_icon="👋", layout="wide", initial_sidebar_state="expanded", menu_items={ "Report a bug": "https://github.com/streamlit/streamlit/issues/new/choose", "Get help": "https://discuss.streamlit.io/" } ) # 三个按钮 btn = sac.buttons( items=['button1', 'button23', 'button3'], index=0, format_func='title', align='center', direction='horizontal', radius='lg', return_index=False, ) st.write(f'The selected button label is: {btn}')