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

Commit 71d3c27

Browse files
authored
Merge pull request #2 from juanbrujo/master
add placeholder as prop
2 parents d0f675a + a8254fd commit 71d3c27

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

app/app.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
:min="options.min"
1818
:max="options.max"
1919
:maxlength="options.maxlength"
20+
:placeholder="options.placeholder"
2021
@onInputNumberChange="inputChange"></input-number>
2122
</p>
2223

@@ -42,7 +43,8 @@ export default class App extends Vue {
4243
step: 1,
4344
min: 1,
4445
max: 100,
45-
maxlength: 3
46+
maxlength: 3,
47+
placeholder: ''
4648
}
4749
4850
inputValue: number = 1

index.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
> <i class="v-input-number-icon"></i> </a>
1515
</div>
1616

17-
<input type="text" :maxlength="maxlength" autocomplete="off"
17+
<input type="text"
18+
:maxlength="maxlength"
19+
autocomplete="off"
20+
:placeholder="placeholder"
1821
class="v-input-number-input"
1922
v-model.number="quantity"
2023
@keyup="onKeyup($event)"
@@ -55,6 +58,10 @@ export default {
5558
type: Number,
5659
default: 4
5760
},
61+
placeholder: {
62+
type: String,
63+
default: ''
64+
}
5865
},
5966
6067
data () {

0 commit comments

Comments
 (0)