Update file permissions for multiple files
This commit is contained in:
8
src/components/Form/InputWithSuffix.vue
Normal file → Executable file
8
src/components/Form/InputWithSuffix.vue
Normal file → Executable file
@@ -21,15 +21,10 @@ const props = defineProps({
|
||||
|
||||
})
|
||||
const emit = defineEmits(['update:menitValue'])
|
||||
const menitValue = ref<any>(props.defaultValue)
|
||||
const menitValue = ref(props.defaultValue)
|
||||
watch(menitValue, (newValue) => {
|
||||
console.log('newValue', newValue)
|
||||
emit('update:menitValue', newValue)
|
||||
})
|
||||
|
||||
watch(() => props.defaultValue, (newValue) => {
|
||||
menitValue.value = newValue
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -45,6 +40,7 @@ watch(() => props.defaultValue, (newValue) => {
|
||||
inputmode="numeric"
|
||||
pattern="[0-9.]*"
|
||||
:disabled="disabled"
|
||||
:defaultValue="props.defaultValue"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g, '')"
|
||||
onblur="this.value = this.value ? this.value + ' Menit' : ''"
|
||||
onfocus="this.value = this.value.replace(/[^0-9.]/g, '')"
|
||||
|
Reference in New Issue
Block a user