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
c4da5f68
Commit
c4da5f68
authored
Jan 07, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 获取更多额外属性
parent
c5943094
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
SmilingFace.tsx
src/components/NiceForm/components/SmilingFace.tsx
+12
-9
No files found.
src/components/NiceForm/components/SmilingFace.tsx
View file @
c4da5f68
...
...
@@ -13,9 +13,10 @@ interface SmilingFaceProps {
value
:
number
;
};
const
SmilingFace
:
React
.
FC
<
SmilingFaceProps
>
=
({
value
,
})
=>
{
const
SmilingFace
=
(
props
)
=>
{
const
{
value
,
schema
}
=
props
const
componentProps
=
schema
?.
getExtendsComponentProps
()
||
{};
let
node
=
null
;
switch
(
value
)
{
...
...
@@ -23,20 +24,20 @@ const SmilingFace: React.FC<SmilingFaceProps> = ({
case
1
:
case
2
:
{
node
=
(
<>
<
div
{
...
componentProps
}
>
<
Mood
type=
"sad"
customStyle=
{
{
marginRight
:
8
}
}
/>
<
span
>
{
intl
.
formatMessage
({
id
:
'components.chaping'
})
}
</
span
>
</>
</
div
>
);
break
;
}
case
3
:
{
node
=
(
<>
<
div
{
...
componentProps
}
>
<
Mood
type=
"notBad"
customStyle=
{
{
marginRight
:
8
}
}
/>
<
span
>
{
intl
.
formatMessage
({
id
:
'components.zhongping'
})
}
</
span
>
</>
</
div
>
);
break
;
}
...
...
@@ -44,10 +45,10 @@ const SmilingFace: React.FC<SmilingFaceProps> = ({
case
4
:
case
5
:
{
node
=
(
<>
<
div
{
...
componentProps
}
>
<
Mood
type=
"smile"
customStyle=
{
{
marginRight
:
8
}
}
/>
<
span
>
{
intl
.
formatMessage
({
id
:
'components.haoping'
})
}
</
span
>
</>
</
div
>
);
break
;
}
...
...
@@ -58,4 +59,6 @@ const SmilingFace: React.FC<SmilingFaceProps> = ({
return
node
;
};
SmilingFace
.
isFieldComponent
=
true
;
export
default
SmilingFace
;
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