Open Soviut opened 4 years ago
I'm using vue-currency-filter in Nuxt and wanted to have two configurations; The default to show dollars and cents, and another to show just dollars.
However, using the configuration example in the README for multiple configs did not seem to register the filters correctly.
A simplified version of my nuxt.config.js
export default { modules: [ ['vue-currency-filter/nuxt', [ { // default name 'currency' symbol: '$', thousandsSeparator: ',', fractionCount: 2, fractionSeparator: '.', symbolPosition: 'front', symbolSpacing: false, }, { name: 'dollars', symbol: '$', thousandsSeparator: ',', fractionCount: 0, fractionSeparator: '.', symbolPosition: 'front', symbolSpacing: false, }, ], ], }
{{ 1000 | currency }}
Yielded a value of 1.000, meaning it was using the default config.
1.000
{{ 1000 | dollars }}
Threw an error
[Vue warn]: Failed to resolve filter: dollars
cc: @SysaIvan
Kindly help to check @Soviut , already fix by @SysaIvan
I'm using vue-currency-filter in Nuxt and wanted to have two configurations; The default to show dollars and cents, and another to show just dollars.
However, using the configuration example in the README for multiple configs did not seem to register the filters correctly.
A simplified version of my nuxt.config.js
Yielded a value of
1.000
, meaning it was using the default config.Threw an error