{"action":"created","comment":{"url":"https://api.github.com/repos/hayeah/vuejs.org/pulls/comments/83526276","pull_request_review_id":4367397,"id":83526276,"diff_hunk":"@@ -5,8 +5,13 @@ order: 16\n ---\n \n ## Intro\n+## <font color=\"#FF6347\">简介</font>\n \n In addition to the default set of directives shipped in core (`v-model` and `v-show`), Vue also allows you to register your own custom directives. Note that in Vue 2.0, the primary form of code reuse and abstraction is components - however there may be cases where you just need some low-level DOM access on plain elements, and this is where custom directives would still be useful. An example would be focusing on an input element, like this one:\n+<font color=\"#FF6347\">\n+除了vue默认提供的指令，vue也支持自定义指令。在Vue 2.0中，代码重用和抽象化的主要形式是组件化，但也有一些只需要对网页元素做一些低级的DOM操作的情况，此时自定义指令仍会非常有用。下面是一个置焦点到input上的例子：","path":"src/guide/custom-directive.md","position":8,"original_position":8,"commit_id":"1c295c701d3d127c3b8e69c3fa8491ea813ac563","original_commit_id":"1c295c701d3d127c3b8e69c3fa8491ea813ac563","user":{"login":"milkmeowo","id":22437128,"avatar_url":"https://avatars.githubusercontent.com/u/22437128?v=3","gravatar_id":"","url":"https://api.github.com/users/milkmeowo","html_url":"https://github.com/milkmeowo","followers_url":"https://api.github.com/users/milkmeowo/followers","following_url":"https://api.github.com/users/milkmeowo/following{/other_user}","gists_url":"https://api.github.com/users/milkmeowo/gists{/gist_id}","starred_url":"https://api.github.com/users/milkmeowo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milkmeowo/subscriptions","organizations_url":"https://api.github.com/users/milkmeowo/orgs","repos_url":"https://api.github.com/users/milkmeowo/repos","events_url":"https://api.github.com/users/milkmeowo/events{/privacy}","received_events_url":"https://api.github.com/users/milkmeowo/received_events","type":"User","site_admin":false},"body":"中文排版，中英空格\r\n> 除了 vue 默认提供的指令(`v-model` 和 `v-show`)\r\n","created_at":"2016-10-15T05:42:18Z","updated_at":"2016-10-15T05:47:26Z","html_url":"https://github.com/hayeah/vuejs.org/pull/83#discussion_r83526276","pull_request_url":"https://api.github.com/repos/hayeah/vuejs.org/pulls/83","_links":{"self":{"href":"https://api.github.com/repos/hayeah/vuejs.org/pulls/comments/83526276"},"html":{"href":"https://github.com/hayeah/vuejs.org/pull/83#discussion_r83526276"},"pull_request":{"href":"https://api.github.com/repos/hayeah/vuejs.org/pulls/83"}}},"pull_request":{"url":"https://api.github.com/repos/hayeah/vuejs.org/pulls/83","id":89330437,"html_url":"https://github.com/hayeah/vuejs.org/pull/83","diff_url":"https://github.com/hayeah/vuejs.org/pull/83.diff","patch_url":"https://github.com/hayeah/vuejs.org/pull/83.patch","issue_url":"https://api.github.com/repos/hayeah/vuejs.org/issues/83","number":83,"state":"open","locked":false,"title":"translate custom-directive.md","user":{"login":"lsslu","id":9826174,"avatar_url":"https://avatars.githubusercontent.com/u/9826174?v=3","gravatar_id":"","url":"https://api.github.com/users/lsslu","html_url":"https://github.com/lsslu","followers_url":"https://api.github.com/users/lsslu/followers","following_url":"https://api.github.com/users/lsslu/following{/other_user}","gists_url":"https://api.github.com/users/lsslu/gists{/gist_id}","starred_url":"https://api.github.com/users/lsslu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsslu/subscriptions","organizations_url":"https://api.github.com/users/lsslu/orgs","repos_url":"https://api.github.com/users/lsslu/repos","events_url":"https://api.github.com/users/lsslu/events{/privacy}","received_events_url":"https://api.github.com/users/lsslu/received_events","type":"User","site_admin":false},"body":"resolve #21 ","created_at":"2016-10-14T06:24:42Z","updated_at":"2016-10-15T05:47:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96e8e2660ebea98ca103d317102934938bf10e89","assignee":{"login":"milkmeowo","id":22437128,"avatar_url":"https://avatars.githubusercontent.com/u/22437128?v=3","gravatar_id":"","url":"https://api.github.com/users/milkmeowo","html_url":"https://github.com/milkmeowo","followers_url":"https://api.github.com/users/milkmeowo/followers","following_url":"https://api.github.com/users/milkmeowo/following{/other_user}","gists_url":"https://api.github.com/users/milkmeowo/gists{/gist_id}","starred_url":"https://api.github.com/users/milkmeowo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milkmeowo/subscriptions","organizations_url":"https://api.github.com/users/milkmeowo/orgs","repos_url":"https://api.github.com/users/milkmeowo/repos","events_url":"https://api.github.com/users/milkmeowo/events{/privacy}","received_events_url":"https://api.github.com/users/milkmeowo/received_events","type":"User","site_admin":false},"assignees":[{"login":"milkmeowo","id":22437128,"avatar_url":"https://avatars.githubusercontent.com/u/22437128?v=3","gravatar_id":"","url":"https://api.github.com/users/milkmeowo","html_url":"https://github.com/milkmeowo","followers_url":"https://api.github.com/users/milkmeowo/followers","following_url":"https://api.github.com/users/milkmeowo/following{/other_user}","gists_url":"https://api.github.com/users/milkmeowo/gists{/gist_id}","starred_url":"https://api.github.com/users/milkmeowo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milkmeowo/subscriptions","organizations_url":"https://api.github.com/users/milkmeowo/orgs","repos_url":"https://api.github.com/users/milkmeowo/repos","events_url":"https://api.github.com/users/milkmeowo/events{/privacy}","received_events_url":"https://api.github.com/users/milkmeowo/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hayeah/vuejs.org/pulls/83/commits","review_comments_url":"https://api.github.com/repos/hayeah/vuejs.org/pulls/83/comments","review_comment_url":"https://api.github.com/repos/hayeah/vuejs.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hayeah/vuejs.org/issues/83/comments","statuses_url":"https://api.github.com/repos/hayeah/vuejs.org/statuses/1c295c701d3d127c3b8e69c3fa8491ea813ac563","head":{"label":"lsslu:translate-custom-directive","ref":"translate-custom-directive","sha":"1c295c701d3d127c3b8e69c3fa8491ea813ac563","user":{"login":"lsslu","id":9826174,"avatar_url":"https://avatars.githubusercontent.com/u/9826174?v=3","gravatar_id":"","url":"https://api.github.com/users/lsslu","html_url":"https://github.com/lsslu","followers_url":"https://api.github.com/users/lsslu/followers","following_url":"https://api.github.com/users/lsslu/following{/other_user}","gists_url":"https://api.github.com/users/lsslu/gists{/gist_id}","starred_url":"https://api.github.com/users/lsslu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsslu/subscriptions","organizations_url":"https://api.github.com/users/lsslu/orgs","repos_url":"https://api.github.com/users/lsslu/repos","events_url":"https://api.github.com/users/lsslu/events{/privacy}","received_events_url":"https://api.github.com/users/lsslu/received_events","type":"User","site_admin":false},"repo":{"id":70878753,"name":"vuejs.org","full_name":"lsslu/vuejs.org","owner":{"login":"lsslu","id":9826174,"avatar_url":"https://avatars.githubusercontent.com/u/9826174?v=3","gravatar_id":"","url":"https://api.github.com/users/lsslu","html_url":"https://github.com/lsslu","followers_url":"https://api.github.com/users/lsslu/followers","following_url":"https://api.github.com/users/lsslu/following{/other_user}","gists_url":"https://api.github.com/users/lsslu/gists{/gist_id}","starred_url":"https://api.github.com/users/lsslu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsslu/subscriptions","organizations_url":"https://api.github.com/users/lsslu/orgs","repos_url":"https://api.github.com/users/lsslu/repos","events_url":"https://api.github.com/users/lsslu/events{/privacy}","received_events_url":"https://api.github.com/users/lsslu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lsslu/vuejs.org","description":"The website.","fork":true,"url":"https://api.github.com/repos/lsslu/vuejs.org","forks_url":"https://api.github.com/repos/lsslu/vuejs.org/forks","keys_url":"https://api.github.com/repos/lsslu/vuejs.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsslu/vuejs.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsslu/vuejs.org/teams","hooks_url":"https://api.github.com/repos/lsslu/vuejs.org/hooks","issue_events_url":"https://api.github.com/repos/lsslu/vuejs.org/issues/events{/number}","events_url":"https://api.github.com/repos/lsslu/vuejs.org/events","assignees_url":"https://api.github.com/repos/lsslu/vuejs.org/assignees{/user}","branches_url":"https://api.github.com/repos/lsslu/vuejs.org/branches{/branch}","tags_url":"https://api.github.com/repos/lsslu/vuejs.org/tags","blobs_url":"https://api.github.com/repos/lsslu/vuejs.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsslu/vuejs.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsslu/vuejs.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsslu/vuejs.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsslu/vuejs.org/statuses/{sha}","languages_url":"https://api.github.com/repos/lsslu/vuejs.org/languages","stargazers_url":"https://api.github.com/repos/lsslu/vuejs.org/stargazers","contributors_url":"https://api.github.com/repos/lsslu/vuejs.org/contributors","subscribers_url":"https://api.github.com/repos/lsslu/vuejs.org/subscribers","subscription_url":"https://api.github.com/repos/lsslu/vuejs.org/subscription","commits_url":"https://api.github.com/repos/lsslu/vuejs.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsslu/vuejs.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsslu/vuejs.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsslu/vuejs.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsslu/vuejs.org/contents/{+path}","compare_url":"https://api.github.com/repos/lsslu/vuejs.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsslu/vuejs.org/merges","archive_url":"https://api.github.com/repos/lsslu/vuejs.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsslu/vuejs.org/downloads","issues_url":"https://api.github.com/repos/lsslu/vuejs.org/issues{/number}","pulls_url":"https://api.github.com/repos/lsslu/vuejs.org/pulls{/number}","milestones_url":"https://api.github.com/repos/lsslu/vuejs.org/milestones{/number}","notifications_url":"https://api.github.com/repos/lsslu/vuejs.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsslu/vuejs.org/labels{/name}","releases_url":"https://api.github.com/repos/lsslu/vuejs.org/releases{/id}","deployments_url":"https://api.github.com/repos/lsslu/vuejs.org/deployments","created_at":"2016-10-14T06:00:53Z","updated_at":"2016-10-14T06:00:54Z","pushed_at":"2016-10-14T06:15:25Z","git_url":"git://github.com/lsslu/vuejs.org.git","ssh_url":"git@github.com:lsslu/vuejs.org.git","clone_url":"https://github.com/lsslu/vuejs.org.git","svn_url":"https://github.com/lsslu/vuejs.org","homepage":"vuejs.org","size":19924,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"lang-zh-2.0"}},"base":{"label":"hayeah:lang-zh-2.0","ref":"lang-zh-2.0","sha":"c2456c7f557c870be3129cdfdf21de8bccbaf13f","user":{"login":"hayeah","id":50120,"avatar_url":"https://avatars.githubusercontent.com/u/50120?v=3","gravatar_id":"","url":"https://api.github.com/users/hayeah","html_url":"https://github.com/hayeah","followers_url":"https://api.github.com/users/hayeah/followers","following_url":"https://api.github.com/users/hayeah/following{/other_user}","gists_url":"https://api.github.com/users/hayeah/gists{/gist_id}","starred_url":"https://api.github.com/users/hayeah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hayeah/subscriptions","organizations_url":"https://api.github.com/users/hayeah/orgs","repos_url":"https://api.github.com/users/hayeah/repos","events_url":"https://api.github.com/users/hayeah/events{/privacy}","received_events_url":"https://api.github.com/users/hayeah/received_events","type":"User","site_admin":false},"repo":{"id":68792625,"name":"vuejs.org","full_name":"hayeah/vuejs.org","owner":{"login":"hayeah","id":50120,"avatar_url":"https://avatars.githubusercontent.com/u/50120?v=3","gravatar_id":"","url":"https://api.github.com/users/hayeah","html_url":"https://github.com/hayeah","followers_url":"https://api.github.com/users/hayeah/followers","following_url":"https://api.github.com/users/hayeah/following{/other_user}","gists_url":"https://api.github.com/users/hayeah/gists{/gist_id}","starred_url":"https://api.github.com/users/hayeah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hayeah/subscriptions","organizations_url":"https://api.github.com/users/hayeah/orgs","repos_url":"https://api.github.com/users/hayeah/repos","events_url":"https://api.github.com/users/hayeah/events{/privacy}","received_events_url":"https://api.github.com/users/hayeah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hayeah/vuejs.org","description":"The website.","fork":true,"url":"https://api.github.com/repos/hayeah/vuejs.org","forks_url":"https://api.github.com/repos/hayeah/vuejs.org/forks","keys_url":"https://api.github.com/repos/hayeah/vuejs.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hayeah/vuejs.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hayeah/vuejs.org/teams","hooks_url":"https://api.github.com/repos/hayeah/vuejs.org/hooks","issue_events_url":"https://api.github.com/repos/hayeah/vuejs.org/issues/events{/number}","events_url":"https://api.github.com/repos/hayeah/vuejs.org/events","assignees_url":"https://api.github.com/repos/hayeah/vuejs.org/assignees{/user}","branches_url":"https://api.github.com/repos/hayeah/vuejs.org/branches{/branch}","tags_url":"https://api.github.com/repos/hayeah/vuejs.org/tags","blobs_url":"https://api.github.com/repos/hayeah/vuejs.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hayeah/vuejs.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hayeah/vuejs.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/hayeah/vuejs.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hayeah/vuejs.org/statuses/{sha}","languages_url":"https://api.github.com/repos/hayeah/vuejs.org/languages","stargazers_url":"https://api.github.com/repos/hayeah/vuejs.org/stargazers","contributors_url":"https://api.github.com/repos/hayeah/vuejs.org/contributors","subscribers_url":"https://api.github.com/repos/hayeah/vuejs.org/subscribers","subscription_url":"https://api.github.com/repos/hayeah/vuejs.org/subscription","commits_url":"https://api.github.com/repos/hayeah/vuejs.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/hayeah/vuejs.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/hayeah/vuejs.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/hayeah/vuejs.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/hayeah/vuejs.org/contents/{+path}","compare_url":"https://api.github.com/repos/hayeah/vuejs.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hayeah/vuejs.org/merges","archive_url":"https://api.github.com/repos/hayeah/vuejs.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hayeah/vuejs.org/downloads","issues_url":"https://api.github.com/repos/hayeah/vuejs.org/issues{/number}","pulls_url":"https://api.github.com/repos/hayeah/vuejs.org/pulls{/number}","milestones_url":"https://api.github.com/repos/hayeah/vuejs.org/milestones{/number}","notifications_url":"https://api.github.com/repos/hayeah/vuejs.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hayeah/vuejs.org/labels{/name}","releases_url":"https://api.github.com/repos/hayeah/vuejs.org/releases{/id}","deployments_url":"https://api.github.com/repos/hayeah/vuejs.org/deployments","created_at":"2016-09-21T07:42:05Z","updated_at":"2016-10-08T08:28:01Z","pushed_at":"2016-10-15T05:03:56Z","git_url":"git://github.com/hayeah/vuejs.org.git","ssh_url":"git@github.com:hayeah/vuejs.org.git","clone_url":"https://github.com/hayeah/vuejs.org.git","svn_url":"https://github.com/hayeah/vuejs.org","homepage":"vuejs.org","size":20336,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":23,"forks":15,"open_issues":23,"watchers":13,"default_branch":"lang-zh-2.0"}},"_links":{"self":{"href":"https://api.github.com/repos/hayeah/vuejs.org/pulls/83"},"html":{"href":"https://github.com/hayeah/vuejs.org/pull/83"},"issue":{"href":"https://api.github.com/repos/hayeah/vuejs.org/issues/83"},"comments":{"href":"https://api.github.com/repos/hayeah/vuejs.org/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/hayeah/vuejs.org/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/hayeah/vuejs.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hayeah/vuejs.org/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/hayeah/vuejs.org/statuses/1c295c701d3d127c3b8e69c3fa8491ea813ac563"}}}}
{"actor":{"display_login":"milkmeowo"}}