From 90d2419fe6609421900455f144abe41299a88a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=9B=BD=E5=B9=BF?= <2918120921@qq.com> Date: Mon, 31 May 2021 21:29:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?add=20=E8=B0=A2=E5=9B=BD=E5=B9=BF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\350\260\242\345\233\275\345\271\277/21-05-29.md" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\350\260\242\345\233\275\345\271\277/21-05-29.md" diff --git "a/\350\260\242\345\233\275\345\271\277/21-05-29.md" "b/\350\260\242\345\233\275\345\271\277/21-05-29.md" new file mode 100644 index 0000000..e69de29 -- Gitee From b1cbc0f02a62fc7313124c322a933aa9763898fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=9B=BD=E5=B9=BF?= <2918120921@qq.com> Date: Mon, 31 May 2021 21:29:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20=E8=B0=A2=E5=9B=BD=E5=B9=BF/21-05-?= =?UTF-8?q?29.md.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../21-05-29.md" | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git "a/\350\260\242\345\233\275\345\271\277/21-05-29.md" "b/\350\260\242\345\233\275\345\271\277/21-05-29.md" index e69de29..c420b8e 100644 --- "a/\350\260\242\345\233\275\345\271\277/21-05-29.md" +++ "b/\350\260\242\345\233\275\345\271\277/21-05-29.md" @@ -0,0 +1,102 @@ +### 模板语法 +1、插值 +🅰 文本(数据绑定最常见的形式就是使用 “Mustache” 语法(双大括号)的文本插值)。 +``` + + + + + + + Document + + + + +
+ {{content}} +
+ + + + +``` +🌸🌸 绑定的数据对象上 content 属性发生了改变,插值处的内容都会更新。 + + + +🌸🌸 在使用 v-once指令的时,也能执行一次性地插值,当数据改变时,插值处的内容不会更新。 +``` + + + + + + + Document + + + + +
+ {{content}} +

{{content}}

+
+ + + +h +``` + + +🅱 纯HTML +双大括号会将数据解释为纯文本,而非 HTML 。为了输出真正的 HTML ,你需要使用 v-html 指令。 +``` + + + + + + + Document + + + + +
+ {{content}} + +
+ + + + +``` + + +🆎特性 +🌸🌸 mustache 语法不能作用在 HTML 属性上,遇到这种情况应该使用 v-bind 指令: \ No newline at end of file -- Gitee