Skip to content

v2.3.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 27 Sep 08:39
· 327 commits to master since this release
97e6fd9

2.3.0 (2021-09-27)

Features

  • filter: make filter work with RegExps, functions and respect custom replacers similarly to directive (286deda), closes #499

One of the common use cases for that is number as formatting currencies:

<template>
  <span>{{ '1000' | VMask(currencyMask) }</span>
  <!-- prints `$1,000` -->
</template>
<script>
  import createNumberMask from 'text-mask-addons/dist/createNumberMask';
  const currencyMask = createNumberMask({
    prefix: '$',
    allowDecimal: true,
    includeThousandsSeparator: true,
    allowNegative: false,
  });
  export default {
    data: () => ({
      currencyMask,
      myInputModel: ''
    })
  }
</script>

Thanks to @CristianUser for the idea.