Skip to content

Commit 34be3d4

Browse files
Add AllowClear Button (type search) and allow empty value (#126)
* downgrade docs to vue 2 * docs load local dist * add allowClear and update docs * allow empty string status
1 parent cc56fa8 commit 34be3d4

File tree

5 files changed

+19758
-5868
lines changed

5 files changed

+19758
-5868
lines changed

dist/vue-numeric.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ <h2 class="subtitle">
3434
<vue-numeric
3535
class="input is-large"
3636
v-model="money"
37+
:allow-clear="allowClear"
38+
:empty-value="emptyValue"
3739
:min="minValue"
3840
:max="maxValue"
3941
:currency="currency"
@@ -77,6 +79,12 @@ <h1 class="title is-4">
7779
<input class="input" type="number" v-model.number="decimals">
7880
</p>
7981
</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>
8088
<div class="column is-12">
8189
<label class="label"> Separator </label>
8290
<p class="control">
@@ -100,6 +108,12 @@ <h1 class="title is-4">
100108
Read Only
101109
</p>
102110
</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>
103117
</div>
104118
</div>
105119

@@ -132,8 +146,8 @@ <h1 class="title is-4">
132146
</div>
133147

134148
<script src="https://unpkg.com/accounting-js"></script>
135-
<script src="https://unpkg.com/vue"></script>
136-
<script src="https://unpkg.com/vue-numeric"></script>
149+
<script src="https://unpkg.com/vue@2.6.14"></script>
150+
<script src="../dist/vue-numeric.min.js"></script>
137151

138152
<script>
139153
Vue.use(VueNumeric.default)
@@ -143,6 +157,8 @@ <h1 class="title is-4">
143157

144158
data: {
145159
money: 1000,
160+
allowClear: true,
161+
emptyValue: '',
146162
minValue: 0,
147163
maxValue: 999999,
148164
currency: '$',

0 commit comments

Comments
 (0)