|
|
|
@ -9,15 +9,17 @@ const emit = defineEmits(['update:value'])
|
|
|
|
|
|
|
|
|
|
const precisionFormats = [1, 2, 3, 4, 5, 6, 7, 8] |
|
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
|
|
const precisionFormatsDisplay = { |
|
|
|
|
1: '1.0', |
|
|
|
|
2: '1.00', |
|
|
|
|
3: '1.000', |
|
|
|
|
4: '1.0000', |
|
|
|
|
5: '1.00000', |
|
|
|
|
6: '1.000000', |
|
|
|
|
7: '1.0000000', |
|
|
|
|
8: '1.00000000', |
|
|
|
|
1: t('placeholder.decimal1'), |
|
|
|
|
2: t('placeholder.decimal2'), |
|
|
|
|
3: t('placeholder.decimal3'), |
|
|
|
|
4: t('placeholder.decimal4'), |
|
|
|
|
5: t('placeholder.decimal5'), |
|
|
|
|
6: t('placeholder.decimal6'), |
|
|
|
|
7: t('placeholder.decimal7'), |
|
|
|
|
8: t('placeholder.decimal8'), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const vModel = useVModel(props, 'value', emit) |
|
|
|
@ -31,7 +33,7 @@ onMounted(() => {
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<a-form-item label="Precision"> |
|
|
|
|
<a-form-item :label="$t('placeholder.precision')"> |
|
|
|
|
<a-select v-model:value="vModel.meta.precision" dropdown-class-name="nc-dropdown-decimal-format"> |
|
|
|
|
<a-select-option v-for="(format, i) of precisionFormats" :key="i" :value="format"> |
|
|
|
|
<div class="flex flex-row items-center"> |
|
|
|
|