diff --git a/packages/nc-gui-v2/components/cell/Float.vue b/packages/nc-gui-v2/components/cell/Float.vue index 56e12d0657..34fbfa2a45 100644 --- a/packages/nc-gui-v2/components/cell/Float.vue +++ b/packages/nc-gui-v2/components/cell/Float.vue @@ -5,18 +5,19 @@ interface Props { modelValue: number } -const { modelValue: value } = defineProps() +interface Emits { + (event: 'update:modelValue', model: number): void +} + +const props = defineProps() -const emit = defineEmits(['update:modelValue']) +const emits = defineEmits() const editEnabled = inject('editEnabled') const root = ref() -const localState = computed({ - get: () => value, - set: (val) => emit('update:modelValue', val), -}) +const vModel = useVModel(props, 'modelValue', emits) onMounted(() => { root.value?.focus() @@ -24,15 +25,12 @@ onMounted(() => {