mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-17 16:06:38 +08:00
perf: prompt when the name of the custom model input already exists
This commit is contained in:
parent
d160736a49
commit
92c1ed7f1d
@ -241,7 +241,7 @@ const EditChannel = (props) => {
|
||||
|
||||
const addCustomModel = () => {
|
||||
if (customModel.trim() === '') return;
|
||||
if (inputs.models.includes(customModel)) return;
|
||||
if (inputs.models.includes(customModel)) return showError("该模型已存在!");
|
||||
let localModels = [...inputs.models];
|
||||
localModels.push(customModel);
|
||||
let localModelOptions = [];
|
||||
|
Loading…
Reference in New Issue
Block a user