File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ <h2 class="subtitle">
34
34
< vue-numeric
35
35
class ="input is-large "
36
36
v-model ="money "
37
+ :allow-clear ="allowClear "
38
+ :empty-value ="emptyValue "
37
39
:min ="minValue "
38
40
:max ="maxValue "
39
41
:currency ="currency "
@@ -77,6 +79,12 @@ <h1 class="title is-4">
77
79
< input class ="input " type ="number " v-model.number ="decimals ">
78
80
</ p >
79
81
</ div >
82
+ < div class ="column is-12 ">
83
+ < p class ="control ">
84
+ < label class ="label "> Empty Value </ label >
85
+ < input class ="input " type ="text " v-model ="emptyValue ">
86
+ </ p >
87
+ </ div >
80
88
< div class ="column is-12 ">
81
89
< label class ="label "> Separator </ label >
82
90
< p class ="control ">
@@ -100,6 +108,12 @@ <h1 class="title is-4">
100
108
Read Only
101
109
</ p >
102
110
</ div >
111
+ < div class ="column is-12 ">
112
+ < p class ="control ">
113
+ < input type ="checkbox " v-model ="allowClear ">
114
+ Allow clear
115
+ </ p >
116
+ </ div >
103
117
</ div >
104
118
</ div >
105
119
@@ -143,6 +157,8 @@ <h1 class="title is-4">
143
157
144
158
data : {
145
159
money : 1000 ,
160
+ allowClear : true ,
161
+ emptyValue : '' ,
146
162
minValue : 0 ,
147
163
maxValue : 999999 ,
148
164
currency : '$' ,
Original file line number Diff line number Diff line change 5
5
:placeholder =" placeholder"
6
6
:disabled =" disabled"
7
7
v-model =" amount"
8
- type =" tel"
8
+ : type =" allowClear ? 'search' : ' tel' "
9
9
@blur =" onBlurHandler"
10
10
@input =" onInputHandler"
11
11
@focus =" onFocusHandler"
@@ -24,6 +24,15 @@ export default {
24
24
name: ' VueNumeric' ,
25
25
26
26
props: {
27
+ /**
28
+ * Allow clear.
29
+ */
30
+ allowClear: {
31
+ type: Boolean ,
32
+ default: false ,
33
+ required: false
34
+ },
35
+
27
36
/**
28
37
* Currency symbol.
29
38
*/
You can’t perform that action at this time.
0 commit comments