Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
083bfecf
authored
Jul 04, 2023
by
JustSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update channel add & edit page
parent
6a34813b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
web/src/pages/Channel/EditChannel.js
+8
-2
No files found.
web/src/pages/Channel/EditChannel.js
View file @
083bfecf
...
@@ -145,6 +145,7 @@ const EditChannel = () => {
...
@@ -145,6 +145,7 @@ const EditChannel = () => {
<
Form
.
Select
<
Form
.
Select
label
=
'类型'
label
=
'类型'
name
=
'type'
name
=
'type'
required
options
=
{
CHANNEL_OPTIONS
}
options
=
{
CHANNEL_OPTIONS
}
value
=
{
inputs
.
type
}
value
=
{
inputs
.
type
}
onChange
=
{
handleInputChange
}
onChange
=
{
handleInputChange
}
...
@@ -201,7 +202,7 @@ const EditChannel = () => {
...
@@ -201,7 +202,7 @@ const EditChannel = () => {
<
Form
.
Input
<
Form
.
Input
label
=
'镜像'
label
=
'镜像'
name
=
'base_url'
name
=
'base_url'
placeholder
=
{
'
请输入镜像站地址,格式为:https://domain.com,可不填,不填则使用渠道默认值
'
}
placeholder
=
{
'
此项可选,输入镜像站地址,格式为:https://domain.com
'
}
onChange
=
{
handleInputChange
}
onChange
=
{
handleInputChange
}
value
=
{
inputs
.
base_url
}
value
=
{
inputs
.
base_url
}
autoComplete
=
'new-password'
autoComplete
=
'new-password'
...
@@ -212,6 +213,7 @@ const EditChannel = () => {
...
@@ -212,6 +213,7 @@ const EditChannel = () => {
<
Form
.
Field
>
<
Form
.
Field
>
<
Form
.
Input
<
Form
.
Input
label
=
'名称'
label
=
'名称'
required
name
=
'name'
name
=
'name'
placeholder
=
{
'请输入名称'
}
placeholder
=
{
'请输入名称'
}
onChange
=
{
handleInputChange
}
onChange
=
{
handleInputChange
}
...
@@ -224,6 +226,7 @@ const EditChannel = () => {
...
@@ -224,6 +226,7 @@ const EditChannel = () => {
label
=
'分组'
label
=
'分组'
placeholder
=
{
'请选择分组'
}
placeholder
=
{
'请选择分组'
}
name
=
'groups'
name
=
'groups'
required
fluid
fluid
multiple
multiple
selection
selection
...
@@ -240,6 +243,7 @@ const EditChannel = () => {
...
@@ -240,6 +243,7 @@ const EditChannel = () => {
label
=
'模型'
label
=
'模型'
placeholder
=
{
'请选择该通道所支持的模型'
}
placeholder
=
{
'请选择该通道所支持的模型'
}
name
=
'models'
name
=
'models'
required
fluid
fluid
multiple
multiple
selection
selection
...
@@ -263,7 +267,7 @@ const EditChannel = () => {
...
@@ -263,7 +267,7 @@ const EditChannel = () => {
<
Form
.
Field
>
<
Form
.
Field
>
<
Form
.
TextArea
<
Form
.
TextArea
label
=
'模型映射'
label
=
'模型映射'
placeholder
=
{
`为一个 JSON 文本,键为用户请求的模型名称,值为要替换的模型名称,例如:\n
${
JSON
.
stringify
(
MODEL_MAPPING_EXAMPLE
,
null
,
2
)}
`
}
placeholder
=
{
`
此项可选,
为一个 JSON 文本,键为用户请求的模型名称,值为要替换的模型名称,例如:\n
${
JSON
.
stringify
(
MODEL_MAPPING_EXAMPLE
,
null
,
2
)}
`
}
name
=
'model_mapping'
name
=
'model_mapping'
onChange
=
{
handleInputChange
}
onChange
=
{
handleInputChange
}
value
=
{
inputs
.
model_mapping
}
value
=
{
inputs
.
model_mapping
}
...
@@ -276,6 +280,7 @@ const EditChannel = () => {
...
@@ -276,6 +280,7 @@ const EditChannel = () => {
<
Form
.
TextArea
<
Form
.
TextArea
label
=
'密钥'
label
=
'密钥'
name
=
'key'
name
=
'key'
required
placeholder
=
{
'请输入密钥,一行一个'
}
placeholder
=
{
'请输入密钥,一行一个'
}
onChange
=
{
handleInputChange
}
onChange
=
{
handleInputChange
}
value
=
{
inputs
.
key
}
value
=
{
inputs
.
key
}
...
@@ -286,6 +291,7 @@ const EditChannel = () => {
...
@@ -286,6 +291,7 @@ const EditChannel = () => {
<
Form
.
Input
<
Form
.
Input
label
=
'密钥'
label
=
'密钥'
name
=
'key'
name
=
'key'
required
placeholder
=
{
'请输入密钥'
}
placeholder
=
{
'请输入密钥'
}
onChange
=
{
handleInputChange
}
onChange
=
{
handleInputChange
}
value
=
{
inputs
.
key
}
value
=
{
inputs
.
key
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment