Skip to content

Commit 3dbe532

Browse files
docs: add eventAttr description in vue integration docs (#1544)
1 parent dba97a3 commit 3dbe532

File tree

1 file changed

+7
-0
lines changed
  • docs/framework-integration

1 file changed

+7
-0
lines changed

docs/framework-integration/vue.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,13 @@ export const config: Config = {
426426
};
427427
```
428428

429+
By default, v-model value is taken from event's `detail.${targetAttr}` property.
430+
This behavior can be overridden by setting `eventAttr` property on the `ComponentModelConfig`:
431+
```tsx
432+
eventAttr: 'detail.nested.value'
433+
```
434+
In this example, if event emits a custom structure like `{ detail: { nested: { value: 'some value' } } }`, the `v-model` will be set to `'some value'`.
435+
429436
### customElementsDir
430437

431438
**Optional**

0 commit comments

Comments
 (0)