diff --git "a/\345\273\226\344\273\262\350\276\211/20260427vue\346\214\207\344\273\244-v-bind.md" "b/\345\273\226\344\273\262\350\276\211/20260427vue\346\214\207\344\273\244-v-bind.md" new file mode 100644 index 0000000000000000000000000000000000000000..8254b9a88bf0d506e88c4fa844b5156fdfb8f0e3 --- /dev/null +++ "b/\345\273\226\344\273\262\350\276\211/20260427vue\346\214\207\344\273\244-v-bind.md" @@ -0,0 +1,29 @@ +# 笔记 +## v-bind class绑定 +``` +(1) +js 定义obj,如果有-,加"",如 + +{ active: isActive, 'text-danger': hasError }; + +const obj = { + 'is-active': true +} + +template v-bind:class="obj" +(2) +template v-bind:class={txtfont:obj1, +center:obj2} + +``` + +## v-bind style绑定 +``` +(1) +绑定对象 +v-bind:style=js中的对象 +(2) +绑定数组 +v-bind style=[js中的对象,js中的对象,js中的对象] + +``` \ No newline at end of file diff --git "a/\345\273\226\344\273\262\350\276\211/20260429\344\272\213\344\273\266\347\273\221\345\256\232\344\270\216\350\241\250\345\215\225\345\244\204\347\220\206.md" "b/\345\273\226\344\273\262\350\276\211/20260429\344\272\213\344\273\266\347\273\221\345\256\232\344\270\216\350\241\250\345\215\225\345\244\204\347\220\206.md" new file mode 100644 index 0000000000000000000000000000000000000000..7081f64b0e6e4127f685bb032b58b03278057bef --- /dev/null +++ "b/\345\273\226\344\273\262\350\276\211/20260429\344\272\213\344\273\266\347\273\221\345\256\232\344\270\216\350\241\250\345\215\225\345\244\204\347\220\206.md" @@ -0,0 +1,97 @@ +# 笔记 + +``` + +事件绑定 v-on= @ +属性绑定 v-bind=: + +``` + +## 事件绑定 + +``` +<标签名 v-on:事件名="事件处理器">....<标签名> + +
669
+``` + + - 事件名 +``` +click鼠标点击 +keydown键盘按下 +keyup键盘抬起 +mouseover鼠标移入 +mousemove鼠标移动 +input输入时就触发 +keyup键盘抬起 +``` + - 事件修饰符 +``` +click.caption +事件冒泡->事件捕获 +click.stop,click.self +阻止传递 +``` + ## 表单输入绑定 +``` +v-model=其他数据 +``` + + ## 源代码 +``` + + + + +``` \ No newline at end of file diff --git "a/\345\273\226\344\273\262\350\276\211/20260430Vue\345\255\246\347\224\237\350\241\250\346\240\274(\345\217\257\346\237\245\350\257\242)" "b/\345\273\226\344\273\262\350\276\211/20260430Vue\345\255\246\347\224\237\350\241\250\346\240\274(\345\217\257\346\237\245\350\257\242)" new file mode 100644 index 0000000000000000000000000000000000000000..3dba0499684d575f85f3933e1cd3c42318a0b280 --- /dev/null +++ "b/\345\273\226\344\273\262\350\276\211/20260430Vue\345\255\246\347\224\237\350\241\250\346\240\274(\345\217\257\346\237\245\350\257\242)" @@ -0,0 +1,168 @@ + + + + + \ No newline at end of file diff --git "a/\345\273\226\344\273\262\350\276\211/20260430\350\241\250\345\215\225\344\277\256\351\245\260\347\254\246\344\270\216\347\224\237\345\221\275\345\221\250\346\234\237\345\207\275\346\225\260.md" "b/\345\273\226\344\273\262\350\276\211/20260430\350\241\250\345\215\225\344\277\256\351\245\260\347\254\246\344\270\216\347\224\237\345\221\275\345\221\250\346\234\237\345\207\275\346\225\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..7e173b146c26114fc3552d111be619ed010b56e0 --- /dev/null +++ "b/\345\273\226\344\273\262\350\276\211/20260430\350\241\250\345\215\225\344\277\256\351\245\260\347\254\246\344\270\216\347\224\237\345\221\275\345\221\250\346\234\237\345\207\275\346\225\260.md" @@ -0,0 +1,12 @@ +# 笔记 + +## 表单修饰符 +``` +.lazy 修饰change事件(失去焦点) +``` + +## 生命周期函数(钩子函数) +``` +引入onMount,然后直接在st里使用 +onMount(),监听页面所有挂载完成之后进行执行 +``` \ No newline at end of file