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
shenshaokai
jinfa-platform
Commits
514e19b3
Commit
514e19b3
authored
Jun 18, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 修改正则
parent
6eee6ecc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
effects.ts
...ages/member/components/QualitiesUploadFormItem/effects.ts
+4
-4
No files found.
src/pages/member/components/QualitiesUploadFormItem/effects.ts
View file @
514e19b3
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-15 13:38:56
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-1
5 14:10:11
* @LastEditTime: 2021-06-1
8 16:52:22
* @Description: 联动逻辑
*/
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
...
...
@@ -21,7 +21,7 @@ export const useBusinessEffects = (context, actions, fieldName: string) => {
const
{
name
,
value
}
=
fieldState
;
if
(
value
&&
value
.
length
)
{
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
FormPath
.
transform
(
name
,
/
^
\d
$
/
,
$1
=>
{
return
`
${
fieldName
}
.
${
$1
}
.expireDay`
}),
state
=>
{
...
...
@@ -34,9 +34,9 @@ export const useBusinessEffects = (context, actions, fieldName: string) => {
// 如果选择了到期日,则清空 有效期
onFieldInputChange$
(
`
${
fieldName
}
.*.expireDay`
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
if
(
value
&&
value
.
length
)
{
if
(
value
)
{
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
FormPath
.
transform
(
name
,
/
^
\d
$
/
,
$1
=>
{
return
`
${
fieldName
}
.
${
$1
}
.permanent`
}),
state
=>
{
...
...
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