fix: image edit dialog apply button (#527)
parent
0d4df4b269
commit
4b70c6b3e7
|
@ -10,13 +10,17 @@ const props = withDefaults(defineProps<{
|
|||
removable: true,
|
||||
})
|
||||
|
||||
defineEmits<{
|
||||
const emit = defineEmits<{
|
||||
(evt: 'remove'): void
|
||||
(evt: 'setDescription', description: string): void
|
||||
}>()
|
||||
|
||||
const isEditDialogOpen = ref(false)
|
||||
const description = ref(props.attachment.description ?? '')
|
||||
const toggleApply = () => {
|
||||
isEditDialogOpen.value = false
|
||||
emit('setDescription', unref(description))
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -52,7 +56,7 @@ const description = ref(props.attachment.description ?? '')
|
|||
</h1>
|
||||
<div flex flex-col gap-2>
|
||||
<textarea v-model="description" p-3 h-50 bg-base rounded-2 border-strong border-1 md:w-100 />
|
||||
<button btn-outline @click="$emit('setDescription', description)">
|
||||
<button btn-outline @click="toggleApply">
|
||||
{{ $t('action.apply') }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue