mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
25 lines
595 B
Vue
25 lines
595 B
Vue
<template functional>
|
|
<div v-if="props.value !== null" class="array-field__item">
|
|
<div class="array-field__ellipsis">
|
|
{{ $options.methods.format(props.field, props.value) }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import BigNumber from 'bignumber.js'
|
|
import { formatNumberValue } from '@baserow/modules/database/utils/number'
|
|
|
|
export default {
|
|
name: 'FunctionalFormulaArrayNumberItem',
|
|
methods: {
|
|
format(field, value) {
|
|
if (value == null || value === '') {
|
|
return ''
|
|
}
|
|
return formatNumberValue(field, new BigNumber(value))
|
|
},
|
|
},
|
|
}
|
|
</script>
|