feat(editor): Make the editor automatically focus after selecting a prompt.

This commit is contained in:
Rafi
2023-04-18 10:37:16 +08:00
parent 69dacca6c5
commit e023a13bbc

View File

@@ -48,8 +48,11 @@ const send = () => {
message.value = ""
}
const textArea = ref()
const usePrompt = (prompt) => {
message.value = prompt
textArea.value.focus()
}
const clickSendBtn = () => {
@@ -73,6 +76,7 @@ defineExpose({
class="flex-grow-1 d-flex align-center justify-space-between"
>
<v-textarea
ref="textArea"
v-model="message"
:label="$t('writeAMessage')"
:placeholder="hint"