|
|
@ -16,7 +16,18 @@ const emits = defineEmits<Emits>() |
|
|
|
|
|
|
|
|
|
|
|
const editEnabled = inject(EditModeInj) |
|
|
|
const editEnabled = inject(EditModeInj) |
|
|
|
|
|
|
|
|
|
|
|
const vModel = useVModel(props, 'modelValue', emits) |
|
|
|
const _vModel = useVModel(props, 'modelValue', emits) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const vModel = computed({ |
|
|
|
|
|
|
|
get: () => _vModel.value, |
|
|
|
|
|
|
|
set: (value: string) => { |
|
|
|
|
|
|
|
if (value === '') { |
|
|
|
|
|
|
|
_vModel.value = null |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
_vModel.value = value |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const focus: VNodeRef = (el) => (el as HTMLInputElement)?.focus() |
|
|
|
const focus: VNodeRef = (el) => (el as HTMLInputElement)?.focus() |
|
|
|
</script> |
|
|
|
</script> |
|
|
|