Skip to content

Commit ac83041

Browse files
committed
sudheerj#25 syntax-highlighting
1 parent 260f7b9 commit ac83041

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,16 +872,16 @@ List of 300 VueJS Interview Questions
872872
There are three modifiers supported for v-model directive.
873873
874874
**1. lazy:** By default, v-model syncs the input with the data after each input event. You can add the lazy modifier to instead sync after change events.
875-
```javascript
875+
```vue
876876
<!-- synced after "change" instead of "input" -->
877877
<input v-model.lazy="msg" >
878878
```
879879
**2. number:** If you want user input to be automatically typecast as a number, you can add the number modifier to your v-model. Even with type="number", the value of HTML input elements always returns a string. So, this typecast modifier is required.
880-
```javascript
880+
```vue
881881
<input v-model.number="age" type="number">
882882
```
883883
**3. trim:** If you want whitespace from user input to be trimmed automatically, you can add the trim modifier to your v-model.
884-
```javascript
884+
```vue
885885
<input v-model.trim="msg">
886886
```
887887

0 commit comments

Comments
 (0)