@coders-tm/vue-number-format
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -12,3 +12,3 @@ /** | ||
var Options = { | ||
var options = { | ||
prefix: '', | ||
@@ -30,4 +30,4 @@ suffix: '', | ||
*/ | ||
function NumberFormat(config = Options) { | ||
this.options = Object.assign(Options, config); | ||
function NumberFormat(config = options) { | ||
this.options = Object.assign(options, config); | ||
this.input = ''; | ||
@@ -287,6 +287,6 @@ this.number = ''; | ||
var VNumber = { | ||
var vNumber = { | ||
beforeMount: (el, { value, modifiers }, vnode) => { | ||
el = getInputElement(el); | ||
const config = Object.assign({}, Options, value, modifiers); | ||
const config = Object.assign({}, options, value, modifiers); | ||
el[CONFIG_KEY] = { config }; | ||
@@ -351,3 +351,3 @@ // set initial value | ||
type: [Number, String], | ||
default: () => Options.nullValue | ||
default: () => options.nullValue | ||
}, | ||
@@ -360,27 +360,27 @@ masked: { | ||
type: Boolean, | ||
default: Options.reverseFill | ||
default: options.reverseFill | ||
}, | ||
precision: { | ||
type: Number, | ||
default: () => Options.precision | ||
default: () => options.precision | ||
}, | ||
decimal: { | ||
type: String, | ||
default: () => Options.decimal | ||
default: () => options.decimal | ||
}, | ||
separator: { | ||
type: String, | ||
default: () => Options.separator | ||
default: () => options.separator | ||
}, | ||
prefix: { | ||
type: String, | ||
default: () => Options.prefix | ||
default: () => options.prefix | ||
}, | ||
suffix: { | ||
type: String, | ||
default: () => Options.suffix | ||
default: () => options.suffix | ||
} | ||
}, | ||
directives: { | ||
number: VNumber | ||
number: vNumber | ||
}, | ||
@@ -437,5 +437,5 @@ emits: ['update:modelValue'], | ||
if (config) { | ||
Object.assign(Options, config); | ||
Object.assign(options, config); | ||
} | ||
app.directive('number', VNumber); | ||
app.directive('number', vNumber); | ||
app.component('number', script); | ||
@@ -445,6 +445,6 @@ } | ||
exports.Number = script; | ||
exports.NumberFormat = NumberFormat; | ||
exports.Options = Options; | ||
exports.VNumber = VNumber; | ||
exports['default'] = index; | ||
exports.number = script; | ||
exports.options = options; | ||
exports.vNumber = vNumber; |
@@ -8,3 +8,3 @@ /** | ||
var Options = { | ||
var options = { | ||
prefix: '', | ||
@@ -26,4 +26,4 @@ suffix: '', | ||
*/ | ||
function NumberFormat(config = Options) { | ||
this.options = Object.assign(Options, config); | ||
function NumberFormat(config = options) { | ||
this.options = Object.assign(options, config); | ||
this.input = ''; | ||
@@ -283,6 +283,6 @@ this.number = ''; | ||
var VNumber = { | ||
var vNumber = { | ||
beforeMount: (el, { value, modifiers }, vnode) => { | ||
el = getInputElement(el); | ||
const config = Object.assign({}, Options, value, modifiers); | ||
const config = Object.assign({}, options, value, modifiers); | ||
el[CONFIG_KEY] = { config }; | ||
@@ -347,3 +347,3 @@ // set initial value | ||
type: [Number, String], | ||
default: () => Options.nullValue | ||
default: () => options.nullValue | ||
}, | ||
@@ -356,27 +356,27 @@ masked: { | ||
type: Boolean, | ||
default: Options.reverseFill | ||
default: options.reverseFill | ||
}, | ||
precision: { | ||
type: Number, | ||
default: () => Options.precision | ||
default: () => options.precision | ||
}, | ||
decimal: { | ||
type: String, | ||
default: () => Options.decimal | ||
default: () => options.decimal | ||
}, | ||
separator: { | ||
type: String, | ||
default: () => Options.separator | ||
default: () => options.separator | ||
}, | ||
prefix: { | ||
type: String, | ||
default: () => Options.prefix | ||
default: () => options.prefix | ||
}, | ||
suffix: { | ||
type: String, | ||
default: () => Options.suffix | ||
default: () => options.suffix | ||
} | ||
}, | ||
directives: { | ||
number: VNumber | ||
number: vNumber | ||
}, | ||
@@ -433,5 +433,5 @@ emits: ['update:modelValue'], | ||
if (config) { | ||
Object.assign(Options, config); | ||
Object.assign(options, config); | ||
} | ||
app.directive('number', VNumber); | ||
app.directive('number', vNumber); | ||
app.component('number', script); | ||
@@ -441,2 +441,2 @@ } | ||
export { script as Number, NumberFormat, Options, VNumber, index as default }; | ||
export { NumberFormat, index as default, script as number, options, vNumber }; |
{ | ||
"name": "@coders-tm/vue-number-format", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Easy formatted numbers, currency and percentage with input/directive mask for Vue.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0