Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
2d3bdcab
Commit
2d3bdcab
authored
Mar 04, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '产品配置'
parent
c432831d
Pipeline
#45154
passed with stages
in 7 minutes 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
29 deletions
+41
-29
editForm.jsx
...pages/productCenter/productConfig/components/editForm.jsx
+41
-29
No files found.
src/pages/productCenter/productConfig/components/editForm.jsx
View file @
2d3bdcab
...
...
@@ -28,12 +28,17 @@ const EditForm = props => {
},
];
useEffect
(()
=>
{
console
.
log
(
productObj
.
ProductName
);
console
.
log
(
productObj
.
IsUsed
,
'productObj.IsUsed'
);
form
.
setFieldsValue
({
...
productObj
});
let
aa
=
userProductsList
.
find
(
i
=>
i
.
ProductName
==
productObj
.
ProductName
);
console
.
log
(
aa
);
if
(
!
productObj
.
IsUsed
)
{
setBut
(
true
);
form
.
setFieldsValue
({
...
productObj
});
}
else
{
setBut
(
false
);
form
.
setFieldsValue
({
...
aa
});
}
},
[
productObj
]);
// 提交选择
...
...
@@ -109,35 +114,42 @@ const EditForm = props => {
))
}
</
Select
>
</
Item
>
<
Item
label=
"访问路由"
name=
"RouteUrl"
rules=
{
[
{
required
:
true
,
message
:
'请输入访问路由,ip加端口号,示例//localhost:3001'
,
},
]
}
>
{
/* <Input addonBefore="//" placeholder="请输入访问路由" allowClear /> */
}
<
Input
placeholder=
"请输入访问路由,ip加端口号,示例//localhost:3001"
allowClear
/>
</
Item
>
{
but
?
(
<></>
)
:
(
<>
<
Item
label=
"访问路由"
name=
"RouteUrl"
rules=
{
[
{
required
:
true
,
message
:
'请输入访问路由,ip加端口号,示例//localhost:3001'
,
},
]
}
>
{
/* <Input addonBefore="//" placeholder="请输入访问路由" allowClear /> */
}
<
Input
placeholder=
"请输入访问路由,ip加端口号,示例//localhost:3001"
allowClear
/>
</
Item
>
<
Item
label=
"默认配置"
name=
"DefaultSetting"
rules=
{
[
{
required
:
false
,
message
:
'请输入默认配置'
,
},
]
}
>
<
TextArea
placeholder=
'请输入json对象,示例
{
"name"
:
"张三"
,
"age"
:
"18"
}
'
autoSize=
{
{
minRows
:
3
,
maxRows
:
5
}
}
/>
</
Item
>
</>
)
}
<
Item
label=
"默认配置"
name=
"DefaultSetting"
rules=
{
[
{
required
:
false
,
message
:
'请输入默认配置'
,
},
]
}
>
<
TextArea
placeholder=
'请输入json对象,示例{"name":"张三","age":"18"}'
autoSize=
{
{
minRows
:
3
,
maxRows
:
5
}
}
/>
</
Item
>
<
div
style=
{
{
display
:
'flex'
,
marginLeft
:
'35%'
}
}
>
<
Item
wrapperCol=
{
{
span
:
8
,
offset
:
8
}
}
style=
{
{
marginRight
:
'30px'
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
disabled=
{
but
}
>
...
...
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