核工业西南物理研究院知识库AI客户端
xiangpei
2025-03-26 b854a2ca787a4a78b87c7a31ec4d6908e7f92275
src/components/AiChat.vue
@@ -1,5 +1,5 @@
<template>
  <div class="ai-chat-dialog">
  <div style="position: relative;height: 800px;width: 100%;display: flex;justify-content: center">
    <!-- 聊天消息列表 -->
    <div class="chat-messages">
      <div
@@ -20,9 +20,8 @@
    <!-- 输入框 -->
    <div class="chat-input">
        <el-input
            style="width: 50%"
            v-model="inputMessage"
            placeholder="请输入消息"
            placeholder="请输入消息,按下回车发送"
            @keyup.native.enter="sendMessage"
        >
          <div slot="append">
@@ -140,9 +139,11 @@
}
.chat-messages {
  flex: 1;
  padding: 16px;
  margin-top: 14px;
  overflow-y: auto;
  width: 800px;
  height: 680px;
}
.message {
@@ -191,13 +192,14 @@
.chat-input {
  padding: 16px;
  background-color: #fff;
  border-top: 1px solid #ddd;
  width: 800px;
  display: flex;
  width: 100%;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 70px;
  left: 50%; /* 将 div 的左边移动到父容器的 50% 位置 */
  transform: translateX(-50%); /* 将 div 向左移动自身宽度的 50% */
}
</style>