diff --git a/CHANGELOG.md b/CHANGELOG.md index 69813b2..3fae673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## v4.0.8 * 功能优化:当数据库更新失败的时候记录错误日志 * 功能优化:聊天输入框会随着输入内容的增多自动调整高度 +* Bug修复:修复移动端聊天页面模型切换不生效的Bug ## v4.0.7 diff --git a/web/src/assets/css/chat-app.styl b/web/src/assets/css/chat-app.styl index 55deed1..c7692bd 100644 --- a/web/src/assets/css/chat-app.styl +++ b/web/src/assets/css/chat-app.styl @@ -13,8 +13,9 @@ .item { display flex flex-flow row - border 1px solid #3c3c3c + border 1px solid rgb(80,80,80) padding 10px + background rgba(60,60,60 0.5) .image { width 80px diff --git a/web/src/views/mobile/ChatSession.vue b/web/src/views/mobile/ChatSession.vue index ca6c836..a8c0fde 100644 --- a/web/src/views/mobile/ChatSession.vue +++ b/web/src/views/mobile/ChatSession.vue @@ -182,7 +182,7 @@ httpGet('/api/model/list').then(res => { models.value[i].mValue = models.value[i].value models.value[i].value = models.value[i].id } - modelValue.value = getModelValue(modelId.value) + modelValue.value = getModelName(modelId.value) // 加载角色列表 httpGet(`/api/role/list`).then((res) => { roles.value = res.data; @@ -236,6 +236,7 @@ const newChat = (item) => { const options = item.selectedOptions roleId.value = options[0].value modelId.value = options[1].value + modelValue.value = getModelName(modelId.value) chatId.value = "" chatData.value = [] role.value = getRoleById(roleId.value) @@ -553,10 +554,10 @@ const getRoleById = function (rid) { return null; } -const getModelValue = (model_id) => { +const getModelName = (model_id) => { for (let i = 0; i < models.value.length; i++) { if (models.value[i].id === model_id) { - return models.value[i].mValue + return models.value[i].text } } return ""