Skip to content

Commit 68b64ee

Browse files
committed
docs (#145): fix vue 3 code example setup
1 parent adc5750 commit 68b64ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/guide/migration/custom-directives.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ The resulting API could be used like this, mirroring the example from earlier:
6767
```
6868

6969
```js
70-
Vue.directive('highlight', {
70+
const app = Vue.createApp({})
71+
72+
app.directive('highlight', {
7173
beforeMount(el, binding, vnode) {
7274
el.style.background = binding.value
7375
}

0 commit comments

Comments
 (0)