Vue筆記第一天

2021-09-25 17:19:57 字數 564 閱讀 8024

v-if和v-show

v-if

如果為true 相當於div.style.display=『block』

如果為false 相當於div.style.display=『none』

陣列 物件的插值v-for

v-for=』(item,index) in arrs』

v-for 的優先順序高於v-if v-show } v-html

v-on:原生的js的事件名=『邏輯』

v-on:原生的js的事件名=『方法名』 該方法必須寫在methods

v-bind:標籤中的原生屬性

data*****>view的單向資料繫結

v-model:只能應用在表單控制項中

data*****>view 的雙向資料繫結

示意圖如下:

第一天筆記

ide integrated development environment 整合開發環境 常用開發環境有idle pythcharm wingide eclipse ipython 1.ctrl z 和回車 2.輸入quit 命令 3.直接關閉命令列視窗 ctrl c python中一切皆物件。物...

Vue基礎第一天

foreach function value,index 4 1.filter 過濾器 filter function item,index let arr 1,2,3,4,5,arr.filter function item,index 4 2.map 對映 對於陣列的對映map function...

學習vue第一天

一.框架和庫的區別。框架 是一套完整的解決方案 對專案的侵入性較大,專案如果需要更換框架,則需要重新架構整個專案。例如 node 的 express框架 庫 外掛程式 提供某乙個小功能,對專案的侵入性較小,如果某個庫無法完成某些需求,可以很容易切換到其它庫實現需求.例如 jquery zepot 移...