mirror of
https://github.com/frappe/books.git
synced 2024-11-14 01:14:03 +00:00
31 lines
634 B
Vue
31 lines
634 B
Vue
|
<script>
|
||
|
import Base from './Base';
|
||
|
|
||
|
export default {
|
||
|
extends: Base,
|
||
|
computed: {
|
||
|
inputClass() {
|
||
|
return ['text-right']
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
getInputListeners() {
|
||
|
return {
|
||
|
change: e => {
|
||
|
this.handleChange(e.target.value);
|
||
|
},
|
||
|
focus: e => {
|
||
|
setTimeout(() => this.$refs.input.select(), 100);
|
||
|
}
|
||
|
};
|
||
|
},
|
||
|
validate(value) {
|
||
|
return !isNaN(value);
|
||
|
},
|
||
|
parse(value) {
|
||
|
return Number(value);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|