Skip to content

mehrdadphp/VueNumberFormating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

VueNumberFormating

vue convert number to decimal formating

install

> npm install --save vue-number-formating
> yarn add vue-number-formating

config

1 ) create file plugin/VueNumberFormating.js

 import Vue from 'vue'
 import VueNumberFormating from 'vue-number-formating'

 Vue.use(VueNumberFormating);
 

2 ) import To main.js

    import Vue from 'vue'
    import App from './App.vue'
    import './plugin/VueNumberFormating'
        
    new Vue({
      el: '#app',
      render: h => h(App),
    }); 

use

    <template>
        <p>{{ $nF.numberToFormat(1500000) }}</p>
        <span> Convert In 1,500,000 </span>
    </template>
    
    // OR
    
    <script>
        export default {
            mounted() {
                this.$nF.numberToFormat(1500000); // conevrt to 1,500,000
            }
        }
    </script>
    

remove comma :

this.$nF.removeCommasAmount('1,500,000'); // conevrt to 1500000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published