From dde73d09c3eed2b72ce8e90f6461e827d52269b8 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Tue, 8 Jun 2021 20:36:56 +0900 Subject: [PATCH 1/2] Add created hook to custom directives code example https://github.com/vuejs/docs-next/commit/4d43757ad4b626cf1839c342aa8d1fd37b6eef74 --- src/guide/migration/custom-directives.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index 5c1b84ba..57cdf2cb 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -53,6 +53,7 @@ Vue.directive('highlight', { ```js const MyDirective = { + created() {}, // new beforeMount(el, binding, vnode, prevVnode) {}, mounted() {}, beforeUpdate() {}, // 追加 From a54eac32d6db58a7827c5293c103f1e345102072 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Tue, 8 Jun 2021 20:37:37 +0900 Subject: [PATCH 2/2] Update custom-directives.md https://github.com/vuejs/docs-next/commit/81015036143874f539c3717f650c93e45892e06d --- src/guide/migration/custom-directives.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index 57cdf2cb..06c4f7c4 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -53,8 +53,8 @@ Vue.directive('highlight', { ```js const MyDirective = { - created() {}, // new - beforeMount(el, binding, vnode, prevVnode) {}, + created(el, binding, vnode, prevVnode) {}, // new + beforeMount() {}, mounted() {}, beforeUpdate() {}, // 追加 updated() {},