限制绘画提示词长度,修复移动端角色和模型绑定失败问题

This commit is contained in:
RockYang
2025-02-23 06:56:38 +08:00
parent 63fd125439
commit a3f0576535
17 changed files with 91 additions and 17 deletions

View File

@@ -52,6 +52,7 @@
<van-picker
:columns="columns"
title="选择模型和角色"
@change="onChange"
@cancel="showPicker = false"
@confirm="newChat"
>
@@ -114,7 +115,8 @@ checkSession().then((user) => {
text: items[i].name,
value: items[i].id,
icon: items[i].icon,
helloMsg: items[i].hello_msg
helloMsg: items[i].hello_msg,
model_id: items[i].model_id
})
}
}
@@ -257,6 +259,19 @@ const removeChat = (item) => {
}
const onChange = (item) => {
const selectedValues = item.selectedOptions
if (selectedValues[0].model_id) {
for (let i = 0; i < columns.value[1].length; i++) {
columns.value[1][i].disabled = columns.value[1][i].value !== selectedValues[0].model_id;
}
} else {
for (let i = 0; i < columns.value[1].length; i++) {
columns.value[1][i].disabled = false;
}
}
}
</script>
<style lang="stylus" scoped>