Skip to content

Commit

Permalink
feat(docs): QInput type="number" specific docs #3924
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Apr 19, 2019
1 parent 5db96c7 commit 62b3346
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
20 changes: 20 additions & 0 deletions docs/src/examples/QInput/InputTypeNumber.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<div class="q-pa-md">
<q-input
v-model.number="model"
type="number"
filled
style="max-width: 200px"
/>
</div>
</template>

<script>
export default {
data () {
return {
model: 10
}
}
}
</script>
4 changes: 0 additions & 4 deletions docs/src/examples/QInput/InputTypes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
</template>
</q-input>

<q-input v-model="number" filled type="number" hint="Number" />

<q-input v-model="email" filled type="email" hint="Email" />

<q-input v-model="search" filled type="search" hint="Search">
Expand All @@ -41,8 +39,6 @@ export default {
password: '',
isPwd: true,
number: null,
email: '',
search: '',
tel: '',
Expand Down
6 changes: 6 additions & 0 deletions docs/src/pages/vue-components/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ Support and behavior is the subject entirely of the browser rendering the page a
Some input types (like `date` or `time`) always render some controls, so you if you're using a `label` then you might want to set it along with `stack-label`, otherwise the label will overlap native browser controls.
:::

#### Input of number type

You'll be using `v-model.number` (notice the `number` modifier) along with `type="number"` prop:

<doc-example title="Input of number type" file="QInput/InputTypeNumber" />

#### Input of file type

::: warning
Expand Down

0 comments on commit 62b3346

Please sign in to comment.