Skip to content

Commit

Permalink
fix: image input type
Browse files Browse the repository at this point in the history
  • Loading branch information
initialencounter committed Feb 17, 2025
1 parent 06e02cb commit 88fb6de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vue/src/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ function handleDataTransfer(event: Event, transfer: DataTransfer | null) {
const reader = new FileReader()
reader.addEventListener('load', function () {
emit('send', segment(type, { src: reader.result }).toString())
const type1 = type === 'image' ? 'img' : type
emit('send', segment(type1, { src: reader.result }).toString())
}, false)
reader.readAsDataURL(file)
}
Expand Down

0 comments on commit 88fb6de

Please sign in to comment.