wujingjing
2024-09-12 495d1510f9a9ebf1f488569f6ca24a6be56bc9f3
src/components/chat/components/playBar/PlayBar.vue
@@ -6,13 +6,7 @@
         </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">
@@ -40,22 +34,11 @@
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 {