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
linweijiong
jinfa-platform
Commits
22f66055
Commit
22f66055
authored
Dec 02, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复 echo 属性存在时,还回填了默认地址的问题
parent
919dd2ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
index.tsx
src/components/AddressSelect/index.tsx
+4
-4
No files found.
src/components/AddressSelect/index.tsx
View file @
22f66055
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-05 10:28:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-12-02 1
5:35:0
7
* @LastEditTime: 2021-12-02 1
8:09:5
7
* @Description: 地址选择 FormItem
*/
import
React
,
{
useState
,
useEffect
,
useMemo
,
useRef
}
from
'react'
;
...
...
@@ -218,6 +218,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
&&
value
&&
value
.
id
&&
!
listArr
.
find
((
item
)
=>
item
.
id
===
value
.
id
)
&&
!
echo
)
{
if
(
!
(
'value'
in
props
))
{
setInternalValue
(
undefined
);
...
...
@@ -226,7 +227,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
triggerChange
(
undefined
);
}
if
(
isDefaultAddress
&&
defaultItem
&&
!
disabled
&&
editable
&&
!
actionFlagRef
.
current
)
{
if
(
isDefaultAddress
&&
defaultItem
&&
!
disabled
&&
editable
&&
!
actionFlagRef
.
current
&&
!
echo
)
{
const
{
shipperName
,
receiverName
,
...
rest
}
=
defaultItem
;
const
next
=
{
name
:
shipperName
||
receiverName
,
...
...
@@ -378,7 +379,6 @@ const AddressSelect: React.FC<IProps> = (props) => {
flag
:
true
,
};
});
handleVisibleDrawer
(
false
);
}
setSubmitLoading
(
false
);
}
catch
(
error
)
{
...
...
@@ -428,7 +428,6 @@ const AddressSelect: React.FC<IProps> = (props) => {
flag
:
true
,
};
});
handleVisibleDrawer
(
false
);
}
setSubmitLoading
(
false
);
}
catch
(
error
)
{
...
...
@@ -440,6 +439,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
setInternalValue
(
next
);
}
triggerChange
(
next
);
handleVisibleDrawer
(
false
);
};
const
useFields
=
():
any
=>
(
...
...
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