vue-number-format
vue-number-format copied to clipboard
Install Support
Hi, I'm new in Vue and I need a support about your component..
I have downloaded your project and looking "dist" folder I wrote this code to implement your component in my project:
<html>
<head>
...
<script src="/plugins/vue-number-format/VueNumberFormat.umd.js"></script>
...
</head>
<body >
<div id="app">
<VueNumberFormat
v-model="value"
:options="{ precision: 3, prefix: '', suffix: ' kg', decimal: '', thousand: '', acceptNegative: false, isInteger: false }"
></VueNumberFormat>
<template>
<goofy
v-model="value"
:options="{ precision: 3, prefix: '', suffix: ' kg', decimal: '', thousand: '', acceptNegative: false, isInteger: false }"
></goofy>
</template>
<donald
v-model="value"
:options="{ precision: 3, prefix: '', suffix: ' kg', decimal: '', thousand: '', acceptNegative: false, isInteger: false }"
></donald>
</div>
</body >
<script>
console.log(VueNumberFormat);
Vue.use(VueNumberFormat, {prefix: 'R$ ', decimal: ',', thounsand: '.'})
Vue.component('donald',VueNumberFormat);
var app = new Vue({
el: '#app',
data: {
value: 0
},
components:{
'goofy':VueNumberFormat
},
});
</script>
</html>
Trying all combination I have these errors:
[Vue warn]: Unknown custom element:
[Vue warn]: Failed to mount component: template or render function not defined....found in---> Goofy [Vue warn]: Failed to mount component: template or render function not defined....found in---> Donald
Where is the problem? Can you help me?