Skip to content

Commit

Permalink
fix(input): image element type
Browse files Browse the repository at this point in the history
输入的图片元素 type 应为 img
  • Loading branch information
initialencounter authored Aug 17, 2024
1 parent 06e02cb commit f679c01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue/src/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function handleDataTransfer(event: Event, transfer: DataTransfer | null) {
const reader = new FileReader()
reader.addEventListener('load', function () {
emit('send', segment(type, { src: reader.result }).toString())
emit('send', segment(type === 'image' ? 'img' : type, { src: reader.result }).toString())
}, false)
reader.readAsDataURL(file)
}
Expand Down

0 comments on commit f679c01

Please sign in to comment.