Currency input

This commit is contained in:
AnandaTon 2023-08-18 15:12:14 +07:00
parent cf75412206
commit ea4d4a1632
2 changed files with 25 additions and 5 deletions

View file

@ -1,13 +1,29 @@
<template>
<input ref="inputRef" type="text" />
<input
:class="
edit == true
? 'full-width inputgreen cursor-pointer'
: 'full-width cursor-pointer'
"
:outlined="edit"
dense
ref="inputRef"
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="salary"
:label="`${'เงินเดือน'}`"
hide-bottom-space
type="text"
/>
</template>
<script>
import { useCurrencyInput } from "vue-currency-input";
export default {
name: "CurrencyInput",
props: {
edit: Boolean,
modelValue: Number,
options: Object,
},
@ -17,4 +33,4 @@ export default {
return { inputRef };
},
};
</script>
</script>

View file

@ -263,7 +263,7 @@
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
<!-- <q-input
:class="getClass(edit)"
:outlined="edit"
dense
@ -276,8 +276,12 @@
hide-bottom-space
:label="`${'เงินเดือน'}`"
type="number"
/> -->
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{ currency: 'THB' }"
/>
<CurrencyInput v-model="salary" :options="{ currency: 'EUR' }" />
</div>
</div>
<div class="col-12"><q-separator /></div>