| | |
| | | </el-button> |
| | | </div> |
| | | <div class="set-input"> |
| | | <el-input |
| | | v-elInputFocus |
| | | @keydown="enterInput" |
| | | v-model="inputValue" |
| | | placeholder="在这里输入您的问题开始和AI对话" |
| | | class="set-inputAnswer" |
| | | /> |
| | | <el-input v-elInputFocus @keydown.enter="isTalking || emits('sendClick')" v-model="inputValue" placeholder="在这里输入您的问题开始和AI对话" class="set-inputAnswer" /> |
| | | </div> |
| | | <div class="h100 flex items-center"> |
| | | <div class="upload_img space-y"> |
| | |
| | | |
| | | const emits = defineEmits(['sendClick']); |
| | | |
| | | const props = defineProps(['isTalking']); |
| | | defineProps(['isTalking']) |
| | | |
| | | const inputValue = defineModel({ |
| | | type: String, |
| | | }); |
| | | |
| | | const enterInput = (e) => { |
| | | if (props.isTalking) return; |
| | | if (!e.shiftKey && e.keyCode == 13) { |
| | | e.cancelBubble = true; //ie阻止冒泡行为 |
| | | e.stopPropagation(); //Firefox阻止冒泡行为 |
| | | e.preventDefault(); //取消事件的默认动作*换行 |
| | | //以下处理发送消息代码 |
| | | emits('sendClick'); |
| | | } |
| | | }; |
| | | type:String |
| | | }) |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .set-waterTitle { |