| | |
| | | :autosize="{ minRows: 1, maxRows: 3 }" |
| | | v-elInputFocus |
| | | show-word-limit |
| | | @input="inputting" |
| | | v-model="inputText" |
| | | placeholder="请输入问题" |
| | | placeholder="请输入操作" |
| | | clearable |
| | | @keydown.enter="handleEnterPress" |
| | | @keydown="keydownInput" |
| | | > |
| | | </el-input> |
| | | <InputTip ref="inputTipRef" :inputValue="inputText" @updateInputValue="updateInputValue" :isHome="false" /> |
| | | </div> |
| | | <div class="h100 flex items-end"> |
| | | <div class="upload_img space-y"> |
| | |
| | | v-if="inputText" |
| | | > |
| | | </el-button> |
| | | <el-tooltip placement="top" content="停止生成" v-if="isTalking"> |
| | | <el-tooltip placement="top" content="停止操作" v-if="isTalking"> |
| | | <div class="cursor-pointer !ml-0 size-[38px] bg-[#1d86ff] relative !z-10 rounded-full flex-center" link> |
| | | <div |
| | | class="size-[38px] bg-black text-white stop-breathe box-content rounded-full flex-center" |
| | |
| | | |
| | | <script setup lang="ts" name="ChatInput"> |
| | | import { Clock } from '@element-plus/icons-vue'; |
| | | |
| | | import type { InputInstance } from 'element-plus'; |
| | | import { useInputEvent } from './useInputEvent'; |
| | | import InputTip from './inputTip/index.vue'; |
| | | import { ref } from 'vue'; |
| | | const inputText = defineModel('modelValue', { |
| | | type: String, |
| | | default: '', |
| | |
| | | const toggleHistory = () => { |
| | | emits('toggleHistory'); |
| | | }; |
| | | |
| | | const updateInputValue = (val) => { |
| | | inputText.value = val; |
| | | }; |
| | | |
| | | const inputRef = ref<InputInstance>(null); |
| | | |
| | | const { keydownInput, inputText:inputting, inputTipRef } = useInputEvent({ |
| | | props: props, |
| | | emit: emits, |
| | | inputValue: inputText, |
| | | inputRef: inputRef, |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |