You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/3.features.md
+19-9Lines changed: 19 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,17 @@ Nuxt PostHog provides a [Vue directive](https://vuejs.org/guide/reusability/cust
50
50
☝️ Whenever this button is clicked, an event will be sent to PostHog automatically
51
51
::
52
52
53
+
::callout
54
+
---
55
+
icon: i-heroicons-exclamation-triangle
56
+
color: amber
57
+
---
58
+
59
+
You might find that the event is not being triggered when using the directive on a custom component. Citing [Vue official documentation](https://vuejs.org/guide/reusability/custom-directives#usage-on-components):
60
+
61
+
> Using custom directives on components is not recommended. Unexpected behaviour may occur when a component has multiple root nodes.
62
+
::
63
+
53
64
This directive also accepts an object if you want to provide additional properties to this event:
54
65
55
66
```vue [app.vue]
@@ -65,6 +76,14 @@ This directive also accepts an object if you want to provide additional properti
65
76
</template>
66
77
```
67
78
79
+
::callout
80
+
---
81
+
icon: i-heroicons-sparkles
82
+
---
83
+
84
+
This directive is typed and will provide suggestions while coding
85
+
::
86
+
68
87
### Listen to custom events
69
88
70
89
You can listen to custom events (other than the default `click`) by passing in the event to the directive as an argument:
@@ -77,15 +96,6 @@ You can listen to custom events (other than the default `click`) by passing in t
77
96
</template>
78
97
```
79
98
80
-
::callout
81
-
---
82
-
83
-
icon: i-heroicons-sparkles
84
-
---
85
-
86
-
This directive is typed and will provide suggestions while coding
87
-
::
88
-
89
99
### Auto-capture page views
90
100
91
101
By default, this module will capture page views automatically. If not desired, you can change this behavior:
0 commit comments