From dfe7d3f4c479d758ee84d557b063e9cc7d6e1cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9D=A8=E6=96=87?= <2112133735@qq.com> Date: Sun, 26 Apr 2026 21:38:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20260420-\345\210\235\350\257\206vue.md" | 46 ++++++++++++++++ ...60\346\215\256\347\273\221\345\256\232.md" | 32 ++++++++++++ ...16\347\233\221\345\220\254\345\231\250.md" | 52 +++++++++++++++++++ .../20260424-vue\346\214\207\344\273\244.md" | 47 +++++++++++++++++ 4 files changed, 177 insertions(+) create mode 100644 "\351\231\210\346\235\250\346\226\207/20260420-\345\210\235\350\257\206vue.md" create mode 100644 "\351\231\210\346\235\250\346\226\207/20260422-\346\225\260\346\215\256\347\273\221\345\256\232.md" create mode 100644 "\351\231\210\346\235\250\346\226\207/20260423-\350\256\241\347\256\227\345\261\236\346\200\247\344\270\216\347\233\221\345\220\254\345\231\250.md" create mode 100644 "\351\231\210\346\235\250\346\226\207/20260424-vue\346\214\207\344\273\244.md" diff --git "a/\351\231\210\346\235\250\346\226\207/20260420-\345\210\235\350\257\206vue.md" "b/\351\231\210\346\235\250\346\226\207/20260420-\345\210\235\350\257\206vue.md" new file mode 100644 index 0000000..70bd58a --- /dev/null +++ "b/\351\231\210\346\235\250\346\226\207/20260420-\345\210\235\350\257\206vue.md" @@ -0,0 +1,46 @@ +## 笔记 + +``` +一、数据绑定 + - 文本插值 + const message = '我是文本插值的内容' +

{{message}}

+ - HTML绑定 + const htmlContent = '我是红色的 HTML (v-html)' +

2. HTML 绑定:

+ - 属性绑定 + const imgSrc = 'https://v2.cn.vuejs.org/images/logo.png' + Logo [v-bind 或简写 :,用来控制 src, href, class 等 ] + + -ref() [给单个值穿外套] + import { ref } from 'vue' + + // 1. 创建一个响应式数字 + const count = ref(0) // 给数字 0 穿上了“智能外套” + + // 2. 在 JavaScript 中,必须通过 .value 来访问和修改 + console.log(count.value) // 访问: 输出 0 + count.value++ // 修改: count.value 变成 1 + + // 3. 在模板