Skip to content

enter键发送消息 #34

@wjh980515

Description

@wjh980515

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch lemon-imui@1.7.6 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/lemon-imui/packages/components/editor.vue b/node_modules/lemon-imui/packages/components/editor.vue
index 9c1b6fe..22ad72b 100644
--- a/node_modules/lemon-imui/packages/components/editor.vue
+++ b/node_modules/lemon-imui/packages/components/editor.vue
@@ -36,7 +36,8 @@ export default {
     sendKey: {
       type: Function,
       default(e) {
-        return e.keyCode == 13 && e.ctrlKey === true;
+        //enter键发送消息
+        return e.keyCode == 13;
       },
     },
   },
@@ -138,7 +139,7 @@ export default {
           <div class="lemon-editor__tip">
             {useScopedSlot(
               this.IMUI.$scopedSlots["editor-footer"],
-              "使用 ctrl + enter 快捷发送消息",
+              "使用 enter 快捷发送消息",
             )}
           </div>
           <div class="lemon-editor__submit">

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions