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
03c38052
Commit
03c38052
authored
Jun 03, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 新增解析内部外部状态
parent
02f48d68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
index.tsx
src/components/DatePicker/index.tsx
+6
-2
useBusinessEffects.ts
src/pages/transaction/common/useBusinessEffects.ts
+19
-0
No files found.
src/components/DatePicker/index.tsx
View file @
03c38052
...
@@ -4,9 +4,9 @@ import moment from 'moment';
...
@@ -4,9 +4,9 @@ import moment from 'moment';
interface
DatePickerSelectPropsType
{
interface
DatePickerSelectPropsType
{
/** 开始时间name */
/** 开始时间name */
startTimeName
:
string
,
startTimeName
?
:
string
,
/** 结束时间name */
/** 结束时间name */
endTimeName
:
string
,
endTimeName
?
:
string
,
}
}
const
DatePickerSelect
:
React
.
FC
<
DatePickerSelectPropsType
>
=
(
props
)
=>
{
const
DatePickerSelect
:
React
.
FC
<
DatePickerSelectPropsType
>
=
(
props
)
=>
{
...
@@ -83,4 +83,8 @@ const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
...
@@ -83,4 +83,8 @@ const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
)
)
}
}
DatePickerSelect
.
displayName
=
'DatePicker'
;
DatePickerSelect
.
displayName
=
'DatePicker'
;
DatePickerSelect
.
defaultProps
=
{
startTimeName
:
'开始时间'
,
endTimeName
:
'结束时间'
,
}
export
default
DatePickerSelect
export
default
DatePickerSelect
src/pages/transaction/common/useBusinessEffects.ts
0 → 100644
View file @
03c38052
import
{
FormEffectHooks
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
const
{
onFormMount$
}
=
FormEffectHooks
export
const
useBusinessEffects
=
(
externalStatusFetch
,
interiorStatusFetch
)
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
externalStatusFetch
&&
externalStatusFetch
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
||
item
.
message
,
value
:
item
.
satatus
||
item
.
code
}})
linkage
.
enum
(
'externalState'
,
_enum
)
linkage
.
enum
(
'externalStatusList'
,
_enum
)
})
interiorStatusFetch
&&
interiorStatusFetch
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
||
item
.
message
,
value
:
item
.
satatus
||
item
.
code
}})
linkage
.
enum
(
'interiorState'
,
_enum
)
linkage
.
enum
(
'innerStatusList'
,
_enum
)
})
})
}
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