Skip to content

Commit

Permalink
docs(vue3): New template handling syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Feb 26, 2023
1 parent f306d2d commit fbaffe3
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions docs/content/docs/vue23.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,31 +200,3 @@ def setup(server, **kargs):
f"Trying to initialize trame_XXXX with unknown client_type={client_type}"
)
```

Then if internally your Python Widget code, you set dynamic attribute, you may have to do the following:

```python
# vue2/3 handling (add .value for vue3)
if self.server.client_type == "vue2":
self._attributes["view_id"] = f':viewId="{self.__view_key_id}"'
else:
self._attributes["view_id"] = f':viewId="{self.__view_key_id}.value"'
```

## Python usage

With vue3, the reactive variable needs to be managed in a slightly different manner which means you should expect the following difference

__vue2__

```python
vuetify.VSlider(v_model="resolution")
```

__vue3__

```python
vuetify3.VSlider(v_model="resolution.value")
# or
vuetify3.VSlider(v_model="state.resolution")
```

0 comments on commit fbaffe3

Please sign in to comment.