1
0
Эх сурвалжийг харах

Merge pull request #726 from HugoDF/patch-5

docs(x-model `.number` modifier)
Caleb Porzio 4 жил өмнө
parent
commit
d6bada81d1
1 өөрчлөгдсөн 5 нэмэгдсэн , 0 устгасан
  1. 5 0
      README.md

+ 5 - 0
README.md

@@ -400,6 +400,11 @@ The `camel` modifier will attach an event listener for the camel case equivalent
 
 > Note: `x-model` is smart enough to detect changes on text inputs, checkboxes, radio buttons, textareas, selects, and multiple selects. It should behave [how Vue would](https://vuejs.org/v2/guide/forms.html) in those scenarios.
 
+**`.number` modifier**
+**Example:** `<input x-model.number="age">`
+
+The `number` modifier will convert the input's value to a number. If the value cannot be parsed as a valid number, the original value is returned.
+
 **`.debounce` modifier**
 **Example:** `<input x-model.debounce="search">`