From 0fd9ec385a20dd57bc65c0984d19d058dce6da99 Mon Sep 17 00:00:00 2001 From: HeGang <493910728@qq.com> Date: Sun, 8 Oct 2017 09:44:13 -0500 Subject: [PATCH] Update custom-directive.md (#1198) 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 --- src/v2/guide/custom-directive.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/v2/guide/custom-directive.md b/src/v2/guide/custom-directive.md index 28fb161ef..cf730df64 100644 --- a/src/v2/guide/custom-directive.md +++ b/src/v2/guide/custom-directive.md @@ -44,6 +44,9 @@ Vue.directive('focus', { directives: { focus: { // ディレクティブ定義 + inserted: function (el) { + el.focus() + } } } ```