mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-23 10:26:38 +08:00
Merge pull request #91 from QuentinHsu/fix-model-name-not-trimmed
fix: model name not trimmed
This commit is contained in:
commit
d5c5c30312
@ -241,7 +241,7 @@ const EditChannel = (props) => {
|
|||||||
|
|
||||||
const addCustomModel = () => {
|
const addCustomModel = () => {
|
||||||
if (customModel.trim() === '') return;
|
if (customModel.trim() === '') return;
|
||||||
if (inputs.models.includes(customModel)) return;
|
if (inputs.models.includes(customModel)) return showError("该模型已存在!");
|
||||||
let localModels = [...inputs.models];
|
let localModels = [...inputs.models];
|
||||||
localModels.push(customModel);
|
localModels.push(customModel);
|
||||||
let localModelOptions = [];
|
let localModelOptions = [];
|
||||||
@ -454,7 +454,7 @@ const EditChannel = (props) => {
|
|||||||
placeholder='输入自定义模型名称'
|
placeholder='输入自定义模型名称'
|
||||||
value={customModel}
|
value={customModel}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
setCustomModel(value);
|
setCustomModel(value.trim());
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user