{
});
})
-const emits = defineEmits(['update:show']);
+const emits = defineEmits(['hide', 'update-user']);
const save = function () {
httpPost('/api/user/profile/update', form.value).then(() => {
ElMessage.success({
message: '更新成功',
appendTo: document.getElementById('user-info'),
- onClose: () => emits('update:show', false)
+ onClose: () => emits('hide', false)
})
// 更新用户数据
emits('update-user', {nickname:form.value['nickname'], avatar: form.value['avatar']});
@@ -113,7 +113,7 @@ const save = function () {
})
}
const close = function () {
- emits('update:show', false);
+ emits('hide', false);
}
diff --git a/web/src/components/FooterBar.vue b/web/src/components/FooterBar.vue
index a36576a8..a0b3ab71 100644
--- a/web/src/components/FooterBar.vue
+++ b/web/src/components/FooterBar.vue
@@ -1,13 +1,34 @@
-
+
+
+
\ No newline at end of file
diff --git a/web/src/views/ChatPlus.vue b/web/src/views/ChatPlus.vue
index e0ce75b9..d0a1941d 100644
--- a/web/src/views/ChatPlus.vue
+++ b/web/src/views/ChatPlus.vue
@@ -40,7 +40,6 @@
@@ -169,7 +179,7 @@
-
+
@@ -185,7 +195,7 @@ import {
Delete,
Edit,
Monitor,
- Plus,
+ Plus, Promotion,
RefreshRight,
Search,
Tools,
@@ -200,6 +210,7 @@ import {httpGet, httpPost} from "@/utils/http";
import {useRouter} from "vue-router";
import Clipboard from "clipboard";
import ConfigDialog from "@/components/ConfigDialog.vue";
+import FooterBar from "@/components/FooterBar.vue";
const title = ref('ChatGPT-智能助手');
const logo = 'images/logo.png';
@@ -543,17 +554,16 @@ const inputKeyDown = function (e) {
prompt.value += "\n";
return;
}
-
e.preventDefault();
- if (canSend.value === false) {
- ElMessage.warning("AI 正在作答中,请稍后...");
- } else {
- sendMessage();
- }
}
}
// 发送消息
const sendMessage = function () {
+ if (canSend.value === false) {
+ ElMessage.warning("AI 正在作答中,请稍后...");
+ return
+ }
+
if (prompt.value.trim().length === 0 || canSend.value === false) {
return false;
}
@@ -954,38 +964,43 @@ const updateUser = function (data) {
}
.input-box {
- background-color: #232425
+ background-color: #ffffff
display: flex;
- justify-content: flex-start;
+ justify-content: center;
align-items: center;
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
.input-container {
- width: 100%
+ max-width 600px;
+ width 100%
margin: 0;
border: none;
- //background-color: #232425
- background-color: #ffffff
padding: 10px 0;
display flex
justify-content center
+ position relative
.el-textarea {
- max-width 768px;
-
- //.el-textarea__inner {
- // box-shadow: none
- // padding: 5px 0
- // background-color: #232425
- // color: #B5B7B8
- //}
-
+ max-width 600px;
.el-textarea__inner::-webkit-scrollbar {
width: 0;
height: 0;
}
}
+ .send-btn {
+ position absolute;
+ right 12px;
+ top 20px;
+
+ .el-button {
+ padding 8px 5px;
+ border-radius 6px;
+ background:rgb(25,195,125)
+ color #ffffff;
+ font-size 20px;
+ }
+ }
}
}
diff --git a/web/src/views/Login.vue b/web/src/views/Login.vue
index a421d9fa..4e02cd4d 100644
--- a/web/src/views/Login.vue
+++ b/web/src/views/Login.vue
@@ -35,6 +35,10 @@
+
+