Skip to content

Commit 0d86a7a

Browse files
committed
doc: improved multi-root component custom directive warning's clarity
1 parent 42f3656 commit 0d86a7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/guide/migration/custom-directives.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Here’s an example of this:
2929
Vue.directive('highlight', {
3030
bind(el, binding, vnode) {
3131
el.style.background = binding.value
32-
}
32+
},
3333
})
3434
```
3535

@@ -57,7 +57,7 @@ const MyDirective = {
5757
beforeUpdate() {}, // new
5858
updated() {},
5959
beforeUnmount() {}, // new
60-
unmounted() {}
60+
unmounted() {},
6161
}
6262
```
6363

@@ -73,7 +73,7 @@ const app = Vue.createApp({})
7373
app.directive('highlight', {
7474
beforeMount(el, binding, vnode) {
7575
el.style.background = binding.value
76-
}
76+
},
7777
})
7878
```
7979

@@ -100,5 +100,5 @@ mounted(el, binding, vnode) {
100100
```
101101

102102
:::warning
103-
With [fragments](/guide/migration/fragments.html#overview) support, components can potentially have more than one root node. When applied to a multi-root component, a directive will be ignored and a warning will be logged.
103+
With [fragments](/guide/migration/fragments.html#overview) support, components can potentially have more than one root node. When applied to a multi-root component, a custom directive will be ignored and a warning will be logged.
104104
:::

0 commit comments

Comments
 (0)