mirror of
https://gitee.com/blackfox/geekai.git
synced 2024-11-29 18:57:34 +08:00
fixed bug for mobile chat page change chat model not work
This commit is contained in:
parent
7f1ec90748
commit
5742b40aee
@ -2,6 +2,7 @@
|
||||
## v4.0.8
|
||||
* 功能优化:当数据库更新失败的时候记录错误日志
|
||||
* 功能优化:聊天输入框会随着输入内容的增多自动调整高度
|
||||
* Bug修复:修复移动端聊天页面模型切换不生效的Bug
|
||||
|
||||
## v4.0.7
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 ""
|
||||
|
Loading…
Reference in New Issue
Block a user