Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into me

This commit is contained in:
Thanit Konmek 2023-08-21 12:22:30 +07:00
commit ac74a83dad

View file

@ -11,11 +11,13 @@
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="salary"
v-model="test"
:label="`${'เงินเดือน'}`"
hide-bottom-space
type="text"
@update:modelValue="updateCoords(test)"
/>
{{ salary }}
</template>
<script>
import { useCurrencyInput } from "vue-currency-input";
@ -23,14 +25,23 @@ import { useCurrencyInput } from "vue-currency-input";
export default {
name: "CurrencyInput",
props: {
salary: String,
edit: Boolean,
modelValue: Number,
options: Object,
},
emits: ["update:salary"],
setup(props) {
const { inputRef } = useCurrencyInput(props.options);
const test = "";
return { inputRef };
},
methods: {
updateCoords(title) {
console.log("asd");
this.$emit("update:salary", title); // previously was `this.$emit('input', title)`
},
},
// watch(){}
};
</script>