This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
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.