vue-brazil-money
v1.0.0
Published
If you just want a Vue 3 library to format brazillian money and don't want to configure anything, this library is perfect to you. https://www.npmjs.com/package/vue-brazil-money
Downloads
25
Maintainers
Readme
vue-brazil-money
If you just want a Vue 3 library to format brazillian money and don't want to configure anything, this library is perfect to you. https://www.npmjs.com/package/vue-brazil-money
npm install vue-brazil-money
How to use
<template>
<money v-model="test" />
</template>
<script>
import money from "vue-brazil-money";
export default {
name: "App",
data() {
return {
test: "",
};
},
components: {
money,
},
};
</script>
Attrs
You can pass attributes to input, like disabled, class etc
<template>
<div>
<p>Returned value {{ test }}</p>
Formatted value:
<money v-model="test" id="money-input" class="text-red" />
</div>
</template>
<script>
import money from "vue-brazil-money";
export default {
name: "App",
data() {
return {
test: "",
};
},
components: {
money,
},
};
</script>
<style>
.text-red {
color: red;
}
</style>
Props
You can inform the decimal places. The default value is 2
<money v-model="test" :decimalPlaces="5" />
Example
Authors
- Victorio Capucco
- Wellington Rosendo
References
"Como criar e publicar uma biblioteca (em Vue) no npm?" -> https://medium.com/tableless/como-criar-e-publicar-uma-biblioteca-em-vue-no-npm-2dff8271ca7d