From 50519c29e23a00f620d465ffc1705b89b08a4245 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Sat, 12 Jun 2021 18:11:41 +0900 Subject: [PATCH 1/4] Fix tip colons https://github.com/vuejs/docs-next/commit/4f661584abf721bed9aff0e25ffb1ed7c0047ce0 --- src/api/options-dom.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/options-dom.md b/src/api/options-dom.md index 5aca0f1a..aa3d191c 100644 --- a/src/api/options-dom.md +++ b/src/api/options-dom.md @@ -15,7 +15,8 @@ ::: :::tip Note - If render function is present in the Vue option, the template will be ignored.::: + If render function is present in the Vue option, the template will be ignored. + ::: - **See also:** - [Lifecycle Diagram](../guide/instance.html#lifecycle-diagram) From a698f97eac6f8ef865a3c33fba5ccc51b379c1a5 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Sat, 12 Jun 2021 18:13:54 +0900 Subject: [PATCH 2/4] docs: reduce the reliance on the global Vue in API Reference examples https://github.com/vuejs/docs-next/commit/35f5b524de556d68b03d16e3de756726b178e3aa --- src/api/options-dom.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/options-dom.md b/src/api/options-dom.md index aa3d191c..f11407af 100644 --- a/src/api/options-dom.md +++ b/src/api/options-dom.md @@ -39,11 +39,12 @@ ``` ```js - const app = Vue.createApp({}) + const { createApp, h } = Vue + const app = createApp({}) app.component('my-title', { render() { - return Vue.h( + return h( 'h1', // tag name, this.blogTitle // tag content ) From cf0080933c729e41995ccad462cced06f0ef102f Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Sat, 12 Jun 2021 18:15:44 +0900 Subject: [PATCH 3/4] Mention application mounting changes in migration guide and API https://github.com/vuejs/docs-next/commit/3147cc5791b2cc46aa2f99d8930754c393c5d44c --- src/api/options-dom.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/options-dom.md b/src/api/options-dom.md index f11407af..c6eb4385 100644 --- a/src/api/options-dom.md +++ b/src/api/options-dom.md @@ -6,7 +6,7 @@ - **Details:** - A string template to be used as the markup for the component instance. The template will **replace** the mounted element. Any existing markup inside the mounted element will be ignored, unless content distribution slots are present in the template. + A string template to be used as the markup for the component instance. The template will **replace** the `innerHTML` of mounted element. Any existing markup inside the mounted element will be ignored, unless content distribution slots are present in the template. If the string starts with `#` it will be used as a `querySelector` and use the selected element's innerHTML as the template string. This allows the use of the common `