Vue Router widgets for trame
Project description
Trame-router extend trame widgets and ui with Vue Router components and helper to streamline its usage with trame. Vue Router is the official router for Vue.js on which trame is based.
Installing
trame-router can be installed with pip:
pip install --upgrade trame-router
Usage
The Trame Tutorial is the place to go to learn how to use the library and start building your own application.
The API Reference documentation provides API-level documentation.
The original Vue Router documentation provide a great introduction resource.
The router elements can be used as follow in trame:
# [...]
from trame.ui.router import RouterViewLayout
from trame.widgets import router
with RouterViewLayout(server, "/"):
with vuetify.VCard():
vuetify.VCardTitle("This is home")
with RouterViewLayout(server, "/foo"):
with vuetify.VCard():
vuetify.VCardTitle("This is foo")
with RouterViewLayout(server, "/bar/:id"):
with vuetify.VList():
vuetify.VListItem("Bar {{ $route.params.id }} item 1")
vuetify.VListItem("Bar {{ $route.params.id }} item 2")
vuetify.VListItem("Bar {{ $route.params.id }} item 3")
with SinglePageWithDrawerLayout(server) as layout:
with layout.toolbar:
vuetify.VBtn("Home", to="/")
vuetify.VBtn("Foo", to="/foo")
vuetify.VBtn("Bar 1", to="/bar/1")
vuetify.VBtn("Bar 2", to="/bar/2")
vuetify.VBtn("Bar 3", to="/bar/3")
with layout.content:
router.RouterView()
License
trame-router is made available under the MIT License. For more details, see LICENSE This license has been chosen to match the one use by Vue Router which is used under the cover.
Community
Trame | Discussions | Issues | RoadMap | Contact Us
Enjoying trame?
Share your experience with a testimonial or with a brand approval.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for trame_router-2.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edf5a8572a6b38db1f6f831deff49d11c698c095261243085b79799b1d948dff |
|
MD5 | 12b7e9cd2bc44cdd1dee3a0658d94c5f |
|
BLAKE2b-256 | 35e0a2f9b05ba0237025cf484069909c9cd02f7d10c5176bfe91af02456927ee |