|
|
|
@ -19,6 +19,12 @@ const focus: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<input v-if="editEnabled" :ref="focus" v-model="vModel" class="h-full w-full outline-none" @blur="editEnabled = false" /> |
|
|
|
|
<input |
|
|
|
|
v-if="editEnabled" |
|
|
|
|
:ref="focus" |
|
|
|
|
v-model="vModel" |
|
|
|
|
class="h-full w-full outline-none bg-transparent" |
|
|
|
|
@blur="editEnabled = false" |
|
|
|
|
/> |
|
|
|
|
<span v-else>{{ vModel }}</span> |
|
|
|
|
</template> |
|
|
|
|