File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11<template >
2- <vue-number v-bind =" config" v-model =" price" />
2+ <div >
3+ <vue-number v-bind =" config" v-model =" price" />
4+ {{ price }}
5+ </div >
36</template >
47
58<script >
@@ -10,6 +13,7 @@ export default {
1013 config: {
1114 prefix: ' $' ,
1215 // min: 0,
16+ reverseFill: true
1317 }
1418 }
1519 },
Original file line number Diff line number Diff line change @@ -163,7 +163,10 @@ export default class NumberFormat {
163163 */
164164 unformat ( input : Input ) : string {
165165 this . input = input
166- if ( this . isNull ( ) && ! this . options . reverseFill ) {
166+ if ( this . isNull ( ) ) {
167+ return this . options . nullValue
168+ }
169+ if ( this . options . reverseFill && this . realNumber ( ) <= 0 ) {
167170 return this . options . nullValue
168171 }
169172 return this . sign ( ) + this . realNumber ( )
You can’t perform that action at this time.
0 commit comments