From a46552d469911d30cef84ee6981b59027c3e834f Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Fri, 25 Jun 2021 00:50:50 +0900 Subject: [PATCH] fix: update positioning in lifecycle diagram https://github.com/vuejs/docs/commit/e5bf29e1dc254bfd876a7d9d7d6101eb7fed5198 --- src/.vuepress/public/images/lifecycle.svg | 272 +++++++++++----------- 1 file changed, 130 insertions(+), 142 deletions(-) diff --git a/src/.vuepress/public/images/lifecycle.svg b/src/.vuepress/public/images/lifecycle.svg index 287e1303..ebde4c26 100644 --- a/src/.vuepress/public/images/lifecycle.svg +++ b/src/.vuepress/public/images/lifecycle.svg @@ -1,147 +1,135 @@ - - - - * Template compilation is performed ahead-of-time if using a build step, e.g., with single-file components. + + + + + + app = Vue.createApp(options) - - - - - beforeUnmount - - - - - - when app. unmount () is called - - - - - - beforeCreate - - - - - - - app = Vue. createApp ( options ) app. mount ( el ) - - - - - - - - - - - - - Compile template into render function * - - - - - - Compile el’s innerHTML as template * - - - - - Has “template” option? - - - YES - - - NO + + app.mount(el) - - - - - created - - - - - - - beforeMount - - - - - - - mounted - - - - - - - unmounted - - - - - - - - beforeUpdate - - - - - - updated - - - - - - Virtual DOM re-rendered and patch - - - - when data changes - - - - - - - Init events & lifecycle - - - - - - - Init injections & reactivity - - - - - - - Create app.$el and replace “el” with it - - - - - - Mounted - + + + + + Init + events & lifecycle + + + + + + beforeCreate + + + + + Init + injections & reactivity + + + + + + created + + + + + Has + “template” + option? + YES + NO + + + + + Compile template + into render function * + + + Compile el’s innerHTML + as template * - - - - Unmounted - + + + + + + beforeMount + + + + + Create app.$el and + append it to el + + + + + + mounted + + + + + + + + + beforeUpdate + + + + + + + + updated + + + + + Virtual DOM + re-rendered + and patch + + + when data + changes - \ No newline at end of file + + + Mounted + + + + when + app.unmount() + is called + + + + + + + + beforeUnmount + + + + + + unmounted + + + + Unmounted + + + * Template compilation is performed ahead-of-time if using + a build step, e.g., with single-file components. + +