mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
fixed bug for mobile chat page change chat model not work
This commit is contained in:
parent
9273df4af2
commit
6c300bb018
@ -2,6 +2,7 @@
|
|||||||
## v4.0.8
|
## v4.0.8
|
||||||
* 功能优化:当数据库更新失败的时候记录错误日志
|
* 功能优化:当数据库更新失败的时候记录错误日志
|
||||||
* 功能优化:聊天输入框会随着输入内容的增多自动调整高度
|
* 功能优化:聊天输入框会随着输入内容的增多自动调整高度
|
||||||
|
* Bug修复:修复移动端聊天页面模型切换不生效的Bug
|
||||||
|
|
||||||
## v4.0.7
|
## v4.0.7
|
||||||
|
|
||||||
|
@ -13,8 +13,9 @@
|
|||||||
.item {
|
.item {
|
||||||
display flex
|
display flex
|
||||||
flex-flow row
|
flex-flow row
|
||||||
border 1px solid #3c3c3c
|
border 1px solid rgb(80,80,80)
|
||||||
padding 10px
|
padding 10px
|
||||||
|
background rgba(60,60,60 0.5)
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
width 80px
|
width 80px
|
||||||
|
@ -182,7 +182,7 @@ httpGet('/api/model/list').then(res => {
|
|||||||
models.value[i].mValue = models.value[i].value
|
models.value[i].mValue = models.value[i].value
|
||||||
models.value[i].value = models.value[i].id
|
models.value[i].value = models.value[i].id
|
||||||
}
|
}
|
||||||
modelValue.value = getModelValue(modelId.value)
|
modelValue.value = getModelName(modelId.value)
|
||||||
// 加载角色列表
|
// 加载角色列表
|
||||||
httpGet(`/api/role/list`).then((res) => {
|
httpGet(`/api/role/list`).then((res) => {
|
||||||
roles.value = res.data;
|
roles.value = res.data;
|
||||||
@ -236,6 +236,7 @@ const newChat = (item) => {
|
|||||||
const options = item.selectedOptions
|
const options = item.selectedOptions
|
||||||
roleId.value = options[0].value
|
roleId.value = options[0].value
|
||||||
modelId.value = options[1].value
|
modelId.value = options[1].value
|
||||||
|
modelValue.value = getModelName(modelId.value)
|
||||||
chatId.value = ""
|
chatId.value = ""
|
||||||
chatData.value = []
|
chatData.value = []
|
||||||
role.value = getRoleById(roleId.value)
|
role.value = getRoleById(roleId.value)
|
||||||
@ -553,10 +554,10 @@ const getRoleById = function (rid) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const getModelValue = (model_id) => {
|
const getModelName = (model_id) => {
|
||||||
for (let i = 0; i < models.value.length; i++) {
|
for (let i = 0; i < models.value.length; i++) {
|
||||||
if (models.value[i].id === model_id) {
|
if (models.value[i].id === model_id) {
|
||||||
return models.value[i].mValue
|
return models.value[i].text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
|
Loading…
Reference in New Issue
Block a user