I'm attempting to utilize the Vue Currency Input plugin, specifically with two different configurations simultaneously:
import Vue from 'vue'
import VueCurrencyInput from 'vue-currency-input'
const options = {
globalOptions: {
currency: 'BRL',
locale: 'pt-BR',
precision: 2,
allowNegative: false,
autoDecimalMode: true,
distractionFree: { hideNegligibleDecimalDigits: false, hideCurrencySymbol: false, hideGroupingSymbol: false }
}
}
const optionsDecimal = {
globalOptions: {
currency: false,
locale: 'de-DE',
precision: 4,
allowNegative: false,
autoDecimalMode: true,
distractionFree: { hideNegligibleDecimalDigits: false, hideCurrencySymbol: true, hideGroupingSymbol: true }
},
directiveName: 'decimal',
componentName: 'DecimalInput'
}
Vue.use(VueCurrencyInput, options)
Vue.use(VueCurrencyInput, optionsDecimal)
However, it seems that only the first configuration is being registered and applied.
My objective is to have one formatting money format (options) and another for decimal format (optionsDecimal). I've even modified the component and directive names in the second configuration but without success.
Is there a way to achieve this dual functionality somehow?