Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
陈智峰
jinfa-platform
Commits
0989bbc6
Commit
0989bbc6
authored
Aug 05, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充自定义组件在不可编辑状态下
parent
22afb944
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
CardCheckBox.tsx
src/components/NiceForm/components/CardCheckBox.tsx
+4
-0
CustomSlider.tsx
src/components/NiceForm/components/CustomSlider.tsx
+1
-0
No files found.
src/components/NiceForm/components/CardCheckBox.tsx
View file @
0989bbc6
...
...
@@ -61,6 +61,10 @@ const CardCheckBox = (props) => {
const
value
:
number
[]
=
props
.
value
||
[]
const
handleChange
=
(
id
)
=>
{
// 如果处于不可编辑状态, 则无法选择
if
(
!
props
.
editable
)
{
return
false
}
if
(
value
.
includes
(
id
))
{
const
newValue
=
findItemAndDelete
(
value
,
id
)
props
.
mutators
.
change
(
newValue
)
...
...
src/components/NiceForm/components/CustomSlider.tsx
View file @
0989bbc6
...
...
@@ -7,6 +7,7 @@ const CustomSlider = (props) => {
return
(
<
div
style=
{
{
width
:
'100%'
}
}
>
<
Slider
disabled=
{
!
props
.
editable
}
value=
{
value
}
onChange=
{
e
=>
props
.
mutators
.
change
(
e
)
}
{
...
props
.
props
['
x
-
component
-
props
']}
></
Slider
>
...
...
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