Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

BUG: Nuxt config not allowing multiple configurations #201

Open
Soviut opened this issue Aug 2, 2020 · 2 comments
Open

BUG: Nuxt config not allowing multiple configurations #201

Soviut opened this issue Aug 2, 2020 · 2 comments

Comments

@Soviut
Copy link

Soviut commented Aug 2, 2020

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.

{{ 1000 | dollars }}

Threw an error

[Vue warn]: Failed to resolve filter: dollars

@Soviut Soviut changed the title Nuxt implementation not allowing multiple configurations BUG: Nuxt implementation not allowing multiple configurations Aug 2, 2020
@Soviut Soviut changed the title BUG: Nuxt implementation not allowing multiple configurations BUG: Nuxt config not allowing multiple configurations Aug 2, 2020
@mazipan
Copy link
Owner

mazipan commented Aug 2, 2020

cc: @SysaIvan

SysaIvan pushed a commit to SysaIvan/vue-currency-filter that referenced this issue Aug 4, 2020
…CurrencyFilterMethodInstance] + change README.md
mazipan pushed a commit that referenced this issue Aug 4, 2020
…yFilterMethodInstance] + change README.md (#203)

Co-authored-by: sysaib <sysa.i@wezom.com.ua>
@mazipan
Copy link
Owner

mazipan commented Aug 4, 2020

Kindly help to check @Soviut , already fix by @SysaIvan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants