From 641ccaf57ee5147baac6a5979e24de99beedcd60 Mon Sep 17 00:00:00 2001 From: HeGang <493910728@qq.com> Date: Sun, 8 Oct 2017 09:24:29 -0500 Subject: [PATCH] Update custom-directive.md 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 1efb31377e..dcfc5b8e67 100644 --- a/src/v2/guide/custom-directive.md +++ b/src/v2/guide/custom-directive.md @@ -43,6 +43,9 @@ If you want to register a directive locally instead, components also accept a `d directives: { focus: { // directive definition + inserted: function (el) { + el.focus() + } } } ```