1.0.0 • Published 1 year ago

vue-brazil-money v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

npm npm npm

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

Screenshot from 2022-12-21 21-46-58

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

1.0.0

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago