10000 Update custom-directive.md (#1198) (#397) · vuejs-jp-bot/jp.vuejs.org@3be93b3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3be93b3

Browse files
potato4dre-fort
authored andcommitted
Update custom-directive.md (vuejs#1198) (vuejs#397)
I suggest add this params demo because i can not understand when i saw this part,i think other people will have the same confusion
1 parent 7b4e84d commit 3be93b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/v2/guide/custom-directive.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Vue.directive('focus', {
4444
directives: {
4545
focus: {
4646
// ディレクティブ定義
47+
inserted: function (el) {
48+
el.focus()
49+
}
4750
}
4851
}
4952
```

0 commit comments

Comments
 (0)
0