|
|
@ -21,7 +21,7 @@ const { modelValue } = defineProps<Props>() |
|
|
|
// ------------ |
|
|
|
// ------------ |
|
|
|
// emit |
|
|
|
// emit |
|
|
|
// ------------ |
|
|
|
// ------------ |
|
|
|
const emit = defineEmits(['update:input']) |
|
|
|
const emit = defineEmits(['update:modelValue']) |
|
|
|
|
|
|
|
|
|
|
|
// ------------ |
|
|
|
// ------------ |
|
|
|
// data |
|
|
|
// data |
|
|
@ -67,9 +67,9 @@ const checkDurationFormat = (evt: any) => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onBlur = () => { |
|
|
|
const submitDuration = () => { |
|
|
|
if (isEdited.value) { |
|
|
|
if (isEdited.value) { |
|
|
|
emit('update:input', durationInMS.value) |
|
|
|
emit('update:modelValue', durationInMS.value) |
|
|
|
} |
|
|
|
} |
|
|
|
isEdited.value = false |
|
|
|
isEdited.value = false |
|
|
|
} |
|
|
|
} |
|
|
@ -81,9 +81,9 @@ const onBlur = () => { |
|
|
|
ref="durationInput" |
|
|
|
ref="durationInput" |
|
|
|
v-model="localState" |
|
|
|
v-model="localState" |
|
|
|
:placeholder="durationPlaceholder" |
|
|
|
:placeholder="durationPlaceholder" |
|
|
|
@blur="onBlur" |
|
|
|
@blur="submitDuration" |
|
|
|
@keypress="checkDurationFormat($event)" |
|
|
|
@keypress="checkDurationFormat($event)" |
|
|
|
@keydown.enter="isEdited && emit('update:input', durationInMS.value)" |
|
|
|
@keydown.enter="submitDuration" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<div v-if="showWarningMessage == true" class="duration-warning"> |
|
|
|
<div v-if="showWarningMessage == true" class="duration-warning"> |
|
|
|
<!-- TODO: i18n --> |
|
|
|
<!-- TODO: i18n --> |
|
|
|