vault backup: 2024-01-18 20:56:42

This commit is contained in:
2024-01-18 20:56:42 +08:00
parent f4c1ed82e8
commit ec8607ffa0

View File

@@ -8,9 +8,7 @@ v-for
<li v-for="item in list">{{ item }}</li> <li v-for="item in list">{{ item }}</li>
``` ```
## 輸入雙向綁定 ## 輸入雙向綁定`v-model`
v-model
```html ```html
<input v-model="message"> <input v-model="message">
``` ```
@@ -25,8 +23,7 @@ var app = Vue.createApp({
}); });
``` ```
## 事件 ## 事件`v-on`
v-on
```html ```html
<button v-on:click="testEvent">按我</button> <button v-on:click="testEvent">按我</button>
@@ -43,8 +40,7 @@ var app = Vue.createApp({
``` ```
## 條件式 ## 條件式`v-if`
v-if
```html ```html
<div v-if="isShow"></div> <div v-if="isShow"></div>
@@ -59,4 +55,7 @@ var app = Vue.createApp({
} }
} }
}); });
``` ```
## 屬性綁定
### `v-bind`