1.1.4 • Published 6 years ago
vue-percent-input v1.1.4
VuePercentInput
Lightweight Percent Input for Vue. Use it as a normal input, add your classes and attributes

(based on v-money)
Usage
Globally
import Vue from 'vue'
import PercentInput from 'vue-percent-input'
// register component <percent-input>
Vue.use(PercentInput)Or as component:
<template>
<div>
<percent-input v-model="percent"></percent-input>
{{percent}}
</div>
</template>
<script>
import { PercentInput } from 'percent-input'
export default {
components: { PercentInput },
data () {
return {
percent: 99.99,
}
}
}
</script>Props
| property | Required | Type | Default | Description |
|---|---|---|---|---|
| integer-places | false | Number | 3 | How many integer places |
| decimal-places | false | Number | 2 | How many decimal places |
| suffix | false | Boolean | false | Percentage suffix: " %" |
Suports all VMoney props