diff --git a/resources/js/chat-room/slash-commands.js b/resources/js/chat-room/slash-commands.js index 28485d1..8f66f8e 100644 --- a/resources/js/chat-room/slash-commands.js +++ b/resources/js/chat-room/slash-commands.js @@ -163,6 +163,10 @@ function selectCommand(index) { window.persistChatDraft?.(cmd.name); } + // 统一清除输入框中的 / + input.value = ""; + window.persistChatDraft?.(""); + hideMenu(); input.focus(); }