forked from 64robots/v-money
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: autoDecimalMode with decimalLength zero
- Loading branch information
Showing
9 changed files
with
64 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* v-currency-field v3.0.1 | ||
* v-currency-field v3.0.3 | ||
* (c) 2019 Philipe Augusto <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -734,7 +734,18 @@ var script = { | |
return attrs; | ||
}, | ||
distractionFree: function distractionFree() { | ||
return !this.autoDecimalMode; | ||
if (this.decimalLength > 0) { | ||
return !this.autoDecimalMode; | ||
} else { | ||
return false; | ||
} | ||
}, | ||
decimalMode: function decimalMode() { | ||
if (this.decimalLength > 0) { | ||
return this.autoDecimalMode; | ||
} else { | ||
return false; | ||
} | ||
} | ||
}, | ||
methods: { | ||
|
@@ -891,7 +902,7 @@ var normalizeComponent_1 = normalizeComponent; | |
const __vue_script__ = script; | ||
|
||
/* template */ | ||
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-text-field',_vm._g(_vm._b({directives:[{name:"currency-directive",rawName:"v-currency-directive",value:({currency: _vm.currency, locale: _vm.locale, distractionFree: _vm.distractionFree, decimalLength: _vm.decimalLength, autoDecimalMode: _vm.autoDecimalMode, min: _vm.min, max: _vm.max}),expression:"{currency, locale, distractionFree, decimalLength, autoDecimalMode, min, max}"}],ref:"textfield",attrs:{"type":"tel"},model:{value:(_vm.formattedValue),callback:function ($$v) {_vm.formattedValue=$$v;},expression:"formattedValue"}},'v-text-field',_vm.attrs,false),_vm.listeners()))}; | ||
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-text-field',_vm._g(_vm._b({directives:[{name:"currency-directive",rawName:"v-currency-directive",value:({currency: _vm.currency, locale: _vm.locale, distractionFree: _vm.distractionFree, decimalLength: _vm.decimalLength, autoDecimalMode: _vm.decimalMode, min: _vm.min, max: _vm.max}),expression:"{currency, locale, distractionFree, decimalLength, autoDecimalMode: decimalMode, min, max}"}],ref:"textfield",attrs:{"type":"tel"},model:{value:(_vm.formattedValue),callback:function ($$v) {_vm.formattedValue=$$v;},expression:"formattedValue"}},'v-text-field',_vm.attrs,false),_vm.listeners()))}; | ||
var __vue_staticRenderFns__ = []; | ||
|
||
/* style */ | ||
|
@@ -919,7 +930,7 @@ var __vue_staticRenderFns__ = []; | |
undefined | ||
); | ||
|
||
var version = '3.0.1'; | ||
var version = '3.0.3'; | ||
|
||
function install(Vue, globalOptions) { | ||
if (globalOptions) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* v-currency-field v3.0.1 | ||
* v-currency-field v3.0.3 | ||
* (c) 2019 Philipe Augusto <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -728,7 +728,18 @@ var script = { | |
return attrs; | ||
}, | ||
distractionFree: function distractionFree() { | ||
return !this.autoDecimalMode; | ||
if (this.decimalLength > 0) { | ||
return !this.autoDecimalMode; | ||
} else { | ||
return false; | ||
} | ||
}, | ||
decimalMode: function decimalMode() { | ||
if (this.decimalLength > 0) { | ||
return this.autoDecimalMode; | ||
} else { | ||
return false; | ||
} | ||
} | ||
}, | ||
methods: { | ||
|
@@ -885,7 +896,7 @@ var normalizeComponent_1 = normalizeComponent; | |
const __vue_script__ = script; | ||
|
||
/* template */ | ||
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-text-field',_vm._g(_vm._b({directives:[{name:"currency-directive",rawName:"v-currency-directive",value:({currency: _vm.currency, locale: _vm.locale, distractionFree: _vm.distractionFree, decimalLength: _vm.decimalLength, autoDecimalMode: _vm.autoDecimalMode, min: _vm.min, max: _vm.max}),expression:"{currency, locale, distractionFree, decimalLength, autoDecimalMode, min, max}"}],ref:"textfield",attrs:{"type":"tel"},model:{value:(_vm.formattedValue),callback:function ($$v) {_vm.formattedValue=$$v;},expression:"formattedValue"}},'v-text-field',_vm.attrs,false),_vm.listeners()))}; | ||
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-text-field',_vm._g(_vm._b({directives:[{name:"currency-directive",rawName:"v-currency-directive",value:({currency: _vm.currency, locale: _vm.locale, distractionFree: _vm.distractionFree, decimalLength: _vm.decimalLength, autoDecimalMode: _vm.decimalMode, min: _vm.min, max: _vm.max}),expression:"{currency, locale, distractionFree, decimalLength, autoDecimalMode: decimalMode, min, max}"}],ref:"textfield",attrs:{"type":"tel"},model:{value:(_vm.formattedValue),callback:function ($$v) {_vm.formattedValue=$$v;},expression:"formattedValue"}},'v-text-field',_vm.attrs,false),_vm.listeners()))}; | ||
var __vue_staticRenderFns__ = []; | ||
|
||
/* style */ | ||
|
@@ -913,7 +924,7 @@ var __vue_staticRenderFns__ = []; | |
undefined | ||
); | ||
|
||
var version = '3.0.1'; | ||
var version = '3.0.3'; | ||
|
||
function install(Vue, globalOptions) { | ||
if (globalOptions) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* v-currency-field v3.0.1 | ||
* v-currency-field v3.0.3 | ||
* (c) 2019 Philipe Augusto <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -734,7 +734,18 @@ | |
return attrs; | ||
}, | ||
distractionFree: function distractionFree() { | ||
return !this.autoDecimalMode; | ||
if (this.decimalLength > 0) { | ||
return !this.autoDecimalMode; | ||
} else { | ||
return false; | ||
} | ||
}, | ||
decimalMode: function decimalMode() { | ||
if (this.decimalLength > 0) { | ||
return this.autoDecimalMode; | ||
} else { | ||
return false; | ||
} | ||
} | ||
}, | ||
methods: { | ||
|
@@ -891,7 +902,7 @@ | |
const __vue_script__ = script; | ||
|
||
/* template */ | ||
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-text-field',_vm._g(_vm._b({directives:[{name:"currency-directive",rawName:"v-currency-directive",value:({currency: _vm.currency, locale: _vm.locale, distractionFree: _vm.distractionFree, decimalLength: _vm.decimalLength, autoDecimalMode: _vm.autoDecimalMode, min: _vm.min, max: _vm.max}),expression:"{currency, locale, distractionFree, decimalLength, autoDecimalMode, min, max}"}],ref:"textfield",attrs:{"type":"tel"},model:{value:(_vm.formattedValue),callback:function ($$v) {_vm.formattedValue=$$v;},expression:"formattedValue"}},'v-text-field',_vm.attrs,false),_vm.listeners()))}; | ||
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-text-field',_vm._g(_vm._b({directives:[{name:"currency-directive",rawName:"v-currency-directive",value:({currency: _vm.currency, locale: _vm.locale, distractionFree: _vm.distractionFree, decimalLength: _vm.decimalLength, autoDecimalMode: _vm.decimalMode, min: _vm.min, max: _vm.max}),expression:"{currency, locale, distractionFree, decimalLength, autoDecimalMode: decimalMode, min, max}"}],ref:"textfield",attrs:{"type":"tel"},model:{value:(_vm.formattedValue),callback:function ($$v) {_vm.formattedValue=$$v;},expression:"formattedValue"}},'v-text-field',_vm.attrs,false),_vm.listeners()))}; | ||
var __vue_staticRenderFns__ = []; | ||
|
||
/* style */ | ||
|
@@ -919,7 +930,7 @@ | |
undefined | ||
); | ||
|
||
var version = '3.0.1'; | ||
var version = '3.0.3'; | ||
|
||
function install(Vue, globalOptions) { | ||
if (globalOptions) { | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "v-currency-field", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Currency component for vuetify v-text-field", | ||
"author": "Philipe Augusto <[email protected]>", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters