diff --git "a/\346\236\227\344\274\237\347\216\256/Vue-node-2021-05-25.md" "b/\346\236\227\344\274\237\347\216\256/Vue-node-2021-05-25.md" new file mode 100644 index 0000000000000000000000000000000000000000..df547a2f312c00545ffb7b763673a8befe234242 --- /dev/null +++ "b/\346\236\227\344\274\237\347\216\256/Vue-node-2021-05-25.md" @@ -0,0 +1,41 @@ +# 这是 Vue 的第一节课。 + + +### 入门 + +1. 先引入 Vue 。到 Vue 官网去找(开发环境的)。 +![](./img/2021-05-26_Vue01.png) + +### 条件与循环 + + +1. 指令是带有 v- 前缀的特殊属性。 + +* v-if 是根据表达式里面的true和false来决定是否插入p元素。(输入false就看不到那一个属性的东西了。如 see) +![](./img/2021-05-27_Vue08.png) +![](./img/2021-05-27_Vue09.png) + +* v-else:可以给 v-if 添加一个 " else " 块。v-else、v-else-if必须跟在 v-if 或者 v-else-if之后 +![](./img/2021-05-27_Vue20.png) +![](./img/2021-05-27_Vue21.png) + +* v-else-if:可以链式的多次使用。 +![](./img/2021-05-27_Vue22.png) + +* 参数在指令后以冒号指明。 + +* 修饰符以半角句号 . 指明的特殊后缀,用于指出一个指令应该以特殊方式绑定。 + +* v-show:根据条件展示元素 +![](./img/2021-05-27_Vue23.png) +![](./img.2021-05-27_Vue24.png) + + +2. 可以在 Vue 插入/更新/移除元素时自动应用过滤效果。 + +* v-for :可u一绑定数组的数据渲染一个项目列表。 +![](./img/2021-05-27_Vue16.png) +![](./img/2021-05-27_Vue17.png) +F12,点开 Consol 输入 app.todos.push({text:'新的项目'}) 就会多添加一个东西。 +![](./img/2021-05-27_Vue18.png) +![](./img/2021-05-27_Vue19.png) \ No newline at end of file diff --git "a/\346\236\227\344\274\237\347\216\256/Vue-node-2021-05-26.md" "b/\346\236\227\344\274\237\347\216\256/Vue-node-2021-05-26.md" new file mode 100644 index 0000000000000000000000000000000000000000..806bacbbda229ef8dd7b165c6721506115e7add7 --- /dev/null +++ "b/\346\236\227\344\274\237\347\216\256/Vue-node-2021-05-26.md" @@ -0,0 +1,37 @@ +# Vue 的第二节课 + +### 声明式渲染 + +1. 创建一个 Vue 应用 +* 文本插值 :常用形式就是使用 {{}} 。 +![](./img/2021-05-26_Vue02.png) + +2. 使用 v-bind 绑定元素 attribute。 +* v-bind 为指令,前缀为 v- 。 +* 该指令的意思是:将这个元素节点的 title attribute 和 Vue实例的 take property 保持一致。 +* new Date().toLocaleString 默认设置为12小时(具体看显示界面,鼠标停几秒就可以看到时间)。 +![](./img/2021-05-26_Vue03.png) +![](./img/2021-05-26_Vue04.png) + +3. 使用 v-html 指令用于输出 html 代码 +![](./img/2021-05-26_Vue05.png) +![](./img/2021-05-26_Vue06.png) +![](./img/2021-05-26_Vue07.png) + +### 处理用户输入 + +1. 用 v-on 指令添加一个事件监听器,通过它调用在 Vue 实例中定义的方法 + +* 试一下字符串反转 +![](./img/2021-05-27_Vue13.png) +![](./img/2021-05-27_Vue14.png) +![](./img/2021-05-27_Vue15.png) +在 reverseMessage 方法中,更新了应用的状态。 + +* v-model 指令用于 input、select、textarea、checkbox、radio 等表单控件元素上创建双向数据绑定,根据表单的值,自动更新绑定的元素的值 +![](./img/2021-05-27_Vue10.png) +![](./img/2021-05-27_Vue11.png) +![](./img/2021-05-27_Vue12.png) + + +### 组件化应用构建 \ No newline at end of file diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue01.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue01.png" new file mode 100644 index 0000000000000000000000000000000000000000..75283151593b1c69aa508744c1ee48d3bfa1b770 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue01.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue02.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue02.png" new file mode 100644 index 0000000000000000000000000000000000000000..2096859f25541627065e78424e53b65a3a15dcfc Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue02.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue03.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue03.png" new file mode 100644 index 0000000000000000000000000000000000000000..efd1179c26f48d579ca5bf966656293643c3120d Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue03.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue04.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue04.png" new file mode 100644 index 0000000000000000000000000000000000000000..8f56f98184056b2eff6cca1f2603c76915ff874c Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue04.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue05.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue05.png" new file mode 100644 index 0000000000000000000000000000000000000000..b19e2d529b38796b93b47ec11625d60aa354581c Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue05.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue06.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue06.png" new file mode 100644 index 0000000000000000000000000000000000000000..88893a6a3708587acf7766bdba97c4b49dd5b9a5 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue06.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue07.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue07.png" new file mode 100644 index 0000000000000000000000000000000000000000..f1323a8ffaba142b8aee81d23684f294ceecfc06 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-26_Vue07.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue08.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue08.png" new file mode 100644 index 0000000000000000000000000000000000000000..00772b2473c8c0a4c5cad79573ea21906e183140 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue08.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue09.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue09.png" new file mode 100644 index 0000000000000000000000000000000000000000..1c64947e781eb48559a3518db3be94116864af49 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue09.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue10.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue10.png" new file mode 100644 index 0000000000000000000000000000000000000000..de5d40c21a3b0a0ddd7ac383604b139c19ba071f Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue10.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue11.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue11.png" new file mode 100644 index 0000000000000000000000000000000000000000..144c72584d1a30ddecc4ab4e0c74c2ed5f76ac04 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue11.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue12.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue12.png" new file mode 100644 index 0000000000000000000000000000000000000000..8883d1c5d39caa32846b87d03b2bab7d67edc786 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue12.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue13.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue13.png" new file mode 100644 index 0000000000000000000000000000000000000000..1b83f822dc0a03a87985d744f03b670e0bf4ec7e Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue13.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue14.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue14.png" new file mode 100644 index 0000000000000000000000000000000000000000..8b00b9de6d88974467b81ae98115b7e2e69a8731 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue14.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue15.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue15.png" new file mode 100644 index 0000000000000000000000000000000000000000..91d0e545d9a743afbd03bc41845f08f3ba404858 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue15.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue16.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue16.png" new file mode 100644 index 0000000000000000000000000000000000000000..9378510da42698666b4201648f5b0af8d086a1ae Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue16.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue17.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue17.png" new file mode 100644 index 0000000000000000000000000000000000000000..d3b0017a5a4272deaa40b5f8166df04655c983b3 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue17.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue18.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue18.png" new file mode 100644 index 0000000000000000000000000000000000000000..975ceddca058c4d5d294a480d36515347dfa0f0e Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue18.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue19.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue19.png" new file mode 100644 index 0000000000000000000000000000000000000000..dd7047e9c9e9ad611041bdfffc81cdd3a1bb7b18 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue19.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue20.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue20.png" new file mode 100644 index 0000000000000000000000000000000000000000..7659c3929a7e6dd1f8a903d4e03ad1fd4ac913ea Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue20.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue21.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue21.png" new file mode 100644 index 0000000000000000000000000000000000000000..d52911ee8f97e6fe2b858d9a462dd0726976b1fc Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue21.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue22.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue22.png" new file mode 100644 index 0000000000000000000000000000000000000000..188ef601faeb1504547971bba9f7e29e8eafc354 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue22.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue23.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue23.png" new file mode 100644 index 0000000000000000000000000000000000000000..2130754244d86d8e00f851904496716e796602a7 Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue23.png" differ diff --git "a/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue24.png" "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue24.png" new file mode 100644 index 0000000000000000000000000000000000000000..79bcca4235075c53e19b5d9b0a16dd5d7ba9430d Binary files /dev/null and "b/\346\236\227\344\274\237\347\216\256/img/2021-05-27_Vue24.png" differ