Using Vue.js to build up the sidebar menu component and the menu bar supports switching multi-pages
Copy paste of the original demo.
- Ensure you have Python 3.8+, Node.js, and npm installed.
- Clone this repo.
- Create a new Python virtual environment for the template:
$ python3 -m venv venv # create venv
$ . venv/bin/activate # activate venv
$ pip install streamlit # install streamlit
- Initialize and run the component template frontend:
$ cd my_component/frontend
$ npm install # Install npm dependencies
$ npm run serve # Start the Webpack dev server
- From a separate terminal, run the template's Streamlit app:
$ . venv/bin/activate # activate the venv you created earlier
$ streamlit run my_component/__init__.py # run the example