Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2 from juanbrujo/master
Browse files Browse the repository at this point in the history
add placeholder as prop
  • Loading branch information
joseluisq authored Mar 17, 2018
2 parents d0f675a + a8254fd commit 71d3c27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
:min="options.min"
:max="options.max"
:maxlength="options.maxlength"
:placeholder="options.placeholder"
@onInputNumberChange="inputChange"></input-number>
</p>

Expand All @@ -42,7 +43,8 @@ export default class App extends Vue {
step: 1,
min: 1,
max: 100,
maxlength: 3
maxlength: 3,
placeholder: ''
}
inputValue: number = 1
Expand Down
9 changes: 8 additions & 1 deletion index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
> <i class="v-input-number-icon"></i> </a>
</div>

<input type="text" :maxlength="maxlength" autocomplete="off"
<input type="text"
:maxlength="maxlength"
autocomplete="off"
:placeholder="placeholder"
class="v-input-number-input"
v-model.number="quantity"
@keyup="onKeyup($event)"
Expand Down Expand Up @@ -55,6 +58,10 @@ export default {
type: Number,
default: 4
},
placeholder: {
type: String,
default: ''
}
},
data () {
Expand Down

0 comments on commit 71d3c27

Please sign in to comment.