vuejs-tips / v-money

Tiny (<2k gzipped) input/directive mask for currency
https://vuejs-tips.github.io/v-money/
775 stars 255 forks source link

suffix messing result #69

Open juanbrujo opened 6 years ago

juanbrujo commented 6 years ago

I'm trying this configuration:

      money: {
        decimal: '.',
        thousands: ',',
        prefix: '$',
        suffix: '.0', // the problem is the point following any number
        precision: 0,
        masked: false
      },

And it's crashing the browser, somehow it's computing next to the given value. I've seen the source and no idea why or how. See gif:

sep-21-2018 11-38-56

joserick commented 4 years ago

This is a bug, you cannot put numbers in the prefix or in the suffix because it considers them part of the price as an integer, but if you want to use decimals, I made a component for it based on this and fix this bug v-money-spenner I hope it helps you.

jonathanpmartins commented 3 years ago

Is this type of behavior solved with v-money3 ?