title: Formatting currency value in vue
body: <p>I am trying to format currency entered value in input field using numeraljs and plain javascript but it keeps deleting the decimal. Can not figure out how to fix this. My code below</p>
  <pre><code>&lt;input v-model=&quot;amountValue&quot;&gt;&lt;/input&gt;`
  </code></pre>
  <pre><code>&lt;script&gt;
  import import numeral from 'numeral';
   data: function() {
      return {
        formData:{
          amount: &quot;&quot;,
        },
        
      };
    },
  
   computed:{
      amountValue: {
        get(){
         return this.formData.amount
        },
        set(value){
          this.formData.amount = numeral(value).format('0,0[.]00')
          console.log(this.formData.amount)
        }
       
  
      }
    },
  
  // I have also tried without numeraljs
  
   computed:{
      amountValue: {
        get(){
         return this.formData.amount
        },
        set(value){
          this.formData.amount = parseInt(value).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&amp;,');
          console.log(this.formData.amount)
        }
       
  
      }
    },
  </code></pre>
  <p>It works with the thousand separator but the decimal wont stay.</p>
  <p>When I start typing, it formats the input value(with thousand separator) but when I type in a decimal, it deletes it.</p>