wujingjing
2024-07-22 bc4ab46fb5c4cb4435efabfe4b316be4ace5b026
src/views/project/ch/home/component/waterRight/top.vue
@@ -17,7 +17,7 @@
         </div>
      </div> -->
   </div>
   <PlayBar v-model="inputValue" @send-click="sendClick" />
   <PlayBar v-model="inputValue" @send-click="sendClick" :is-home="true"/>
</template>
<script setup lang="ts">
@@ -28,13 +28,17 @@
import router from '/@/router';
import { activeChatRoom, activeLLMId, activeSectionAId } from '/@/stores/chatRoom';
import emitter from '/@/utils/mitt';
import { handleNormalAuth } from '/@/utils/request';
const emits = defineEmits(['sendClick']);
const inputValue = ref('你是谁?');
const sendClick = async () => {
const sendClick = async (cb) => {
   if (!inputValue.value) return;
   if (!activeSectionAId.value) {
      ElMessage.warning('请选择应用场景');
      return;
   }
   if (!handleNormalAuth()) {
      return;
   }
@@ -90,12 +94,16 @@
   setLLm(item.logicId);
};
onMounted(() => {
   // getLLMList();
   emitter.on('updateChatInput', (value) => {
      inputValue.value = value;
   });
});
const updateChatInput = (val)=>{
   inputValue.value = val;
}
defineExpose({
   updateChatInput
})
</script>
<style scoped lang="scss">
.set-waterTitle {