Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion trame_vuetify/module/vue2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
serve = {"__trame_vuetify": serve_path}
scripts = ["__trame_vuetify/trame-vuetify.umd.min.js"]
styles = ["__trame_vuetify/trame-vuetify.css"]
vue_use = ["trame_vuetify"]
vue_use = [("trame_vuetify", "trame.state.get('trame__vuetify2_config')||{}")]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trame expects the second tuple argument to be a dict and not a string. how can I do that @jourdain ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in v2 the right side does not get evaluated. Also with vuetify2, it is easier to patch the $vuetify variable on the JS side after loading. So you can do it inside you JS library directly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the trame app level (trame-client) as the new (v3) implementation is slightly different.



def setup(server, **kargs):
Expand Down
5 changes: 4 additions & 1 deletion trame_vuetify/ui/vuetify.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ class VAppLayout(AbstractLayout):

:param _server: Server to bound the layout to
:param template_name: Name of the template (default: main)
:param vuetify_config: Dict structure to configure vuetify
"""

def __init__(self, _server, template_name="main", **kwargs):
def __init__(self, _server, template_name="main", vuetify_config=None, **kwargs):
super().__init__(
_server,
vuetify.VApp(id="app", trame_server=_server),
template_name=template_name,
**kwargs,
)
if vuetify_config:
self.server.state.trame__vuetify2_config = vuetify_config


class SinglePageLayout(VAppLayout):
Expand Down
2 changes: 1 addition & 1 deletion vue3/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# trame-vuetify

This directory capture the steps to enable Vuetify 3.x into trame-vuewtify.
This directory capture the steps to enable Vuetify 3.x into trame-vuetify.

## Environment variables

Expand Down