From 95bbc19fb20c2c3268f220e26d7d979d29c2ba6e Mon Sep 17 00:00:00 2001 From: Shigma Date: Wed, 17 Apr 2024 16:14:14 +0800 Subject: [PATCH] fix(components): fix input paste element encoding, fix #324 --- packages/components/client/chat/input.vue | 2 +- plugins/console/src/node/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/client/chat/input.vue b/packages/components/client/chat/input.vue index b443ac8a..50cb6384 100644 --- a/packages/components/client/chat/input.vue +++ b/packages/components/client/chat/input.vue @@ -57,7 +57,7 @@ function handleDataTransfer(event: Event, transfer: DataTransfer) { const reader = new FileReader() reader.addEventListener('load', function () { - emit('send', segment(type, { url: reader.result }).toString()) + emit('send', segment(type, { src: reader.result }).toString()) }, false) reader.readAsDataURL(file) } diff --git a/plugins/console/src/node/index.ts b/plugins/console/src/node/index.ts index 9dee21b9..bce29ca2 100644 --- a/plugins/console/src/node/index.ts +++ b/plugins/console/src/node/index.ts @@ -17,7 +17,7 @@ declare module 'koishi' { export * from '@koishijs/console' -interface ClientConfig { +export interface ClientConfig { devMode: boolean uiPath: string endpoint: string