mirror of
https://github.com/frappe/books.git
synced 2025-01-11 02:36:14 +00:00
Add Int control
This commit is contained in:
parent
8d8b75bce8
commit
a05858277d
@ -13,13 +13,15 @@ import Code from './Code';
|
|||||||
import Currency from './Currency';
|
import Currency from './Currency';
|
||||||
import Data from './Data';
|
import Data from './Data';
|
||||||
import Date from './Date';
|
import Date from './Date';
|
||||||
|
import DynamicLink from './DynamicLink';
|
||||||
import File from './File';
|
import File from './File';
|
||||||
import Float from './Float';
|
import Float from './Float';
|
||||||
|
import Int from './Int';
|
||||||
import Link from './Link';
|
import Link from './Link';
|
||||||
|
import Password from './Password';
|
||||||
import Select from './Select';
|
import Select from './Select';
|
||||||
import Table from './Table';
|
import Table from './Table';
|
||||||
import Text from './Text';
|
import Text from './Text';
|
||||||
import DynamicLink from './DynamicLink';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['docfield', 'value', 'onlyInput'],
|
props: ['docfield', 'value', 'onlyInput'],
|
||||||
@ -32,13 +34,15 @@ export default {
|
|||||||
Currency,
|
Currency,
|
||||||
Data,
|
Data,
|
||||||
Date,
|
Date,
|
||||||
|
DynamicLink,
|
||||||
File,
|
File,
|
||||||
Float,
|
Float,
|
||||||
|
Int,
|
||||||
Link,
|
Link,
|
||||||
|
Password,
|
||||||
Select,
|
Select,
|
||||||
Table,
|
Table,
|
||||||
Text,
|
Text,
|
||||||
DynamicLink,
|
|
||||||
}[this.docfield.fieldtype];
|
}[this.docfield.fieldtype];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
src/components/controls/Int.vue
Normal file
13
src/components/controls/Int.vue
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<script>
|
||||||
|
import Float from './Float';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
extends: Float,
|
||||||
|
methods: {
|
||||||
|
parse(value) {
|
||||||
|
const parsedValue = parseInt(value);
|
||||||
|
return isNaN(parsedValue) ? 0 : parsedValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user