Skip to content

send a real decimal number #79

@Lioxen

Description

@Lioxen

Hi there,

I have following code:

<template>
<Form
ref="formRef"
method="POST"
>
<div><vue-number
v-model="price"
decimal= ","
separator="."
prefix=""
:precision="2"
:masked="false"
name="price"
></vue-number> {{price}}</div>
<button>Send</button>
</Form>
</template>

<script setup lang="ts">
import { component as VueNumber } from '@coders-tm/vue-number-format'
import { Form } from '@inertiajs/vue3'
import { ref } from 'vue'

const formRef = ref(),
price = ref(123.45);

</script>

The problem is, if I send the form I will get 123,45, the number format I like to see, but I need to get the real decimal number 123.45. What is the best way to achieve this? (sorry, I had to mark every single row as code to have a readable result)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions