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
f0d9f677
Commit
f0d9f677
authored
Aug 10, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 隔绝样式影响、补充属性
parent
ecbf0961
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
12 deletions
+22
-12
index.tsx
...sSelect/components/AddressRadioGroupFormilyItem/index.tsx
+2
-2
index.less
src/components/AddressSelect/index.less
+1
-0
index.tsx
src/components/AddressSelect/index.tsx
+13
-8
schema.ts
src/components/AddressSelect/schema.ts
+0
-0
CustomAddressSelect.tsx
src/components/NiceForm/components/CustomAddressSelect.tsx
+6
-2
No files found.
src/components/AddressSelect/components/AddressRadioGroupFormilyItem/index.tsx
View file @
f0d9f677
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-05 14:54:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
07 16:36:14
* @LastEditTime: 2021-08-
10 16:42:18
* @Description:
*/
import
React
from
'react'
;
...
...
@@ -20,7 +20,7 @@ const AddressRadioGroupFormilyItem = connect()((props) => {
...
rest
}
=
props
;
return
(
<
div
style=
{
{
flex
:
1
}
}
>
<
div
style=
{
{
flex
:
1
,
overflow
:
'hidden'
}
}
>
<
AddressRadioGroup
addressType=
{
addressType
}
isDefault=
{
isDefault
}
...
...
src/components/AddressSelect/index.less
View file @
f0d9f677
...
...
@@ -6,6 +6,7 @@
&-input {
flex: 1;
overflow: hidden;
}
&-action {
...
...
src/components/AddressSelect/index.tsx
View file @
f0d9f677
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-05 10:28:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-10 1
0:20:55
* @LastEditTime: 2021-08-10 1
6:55:26
* @Description: 地址选择 FormItem
*/
import
React
,
{
useState
,
useEffect
,
useMemo
,
useRef
}
from
'react'
;
...
...
@@ -148,7 +148,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
triggerChange
(
undefined
);
}
if
(
isDefaultAddress
&&
defaultItem
)
{
if
(
isDefaultAddress
&&
defaultItem
&&
!
disabled
)
{
const
{
shipperName
,
receiverName
,
...
rest
}
=
defaultItem
;
const
next
=
{
name
:
shipperName
||
receiverName
,
...
...
@@ -427,12 +427,17 @@ const AddressSelect: React.FC<IProps> = (props) => {
}
}
>
<
div
className=
{
styles
[
'address-select'
]
}
>
<
Select
options=
{
options
}
value=
{
value
?.
id
}
onChange=
{
handleSelectChange
}
disabled=
{
disabled
}
/>
<
div
className=
{
styles
[
'address-select-input'
]
}
>
<
Select
options=
{
options
}
value=
{
value
?.
id
}
onChange=
{
handleSelectChange
}
disabled=
{
disabled
}
style=
{
{
width
:
'100%'
,
}
}
/>
</
div
>
<
Button
onClick=
{
()
=>
handleVisibleDrawer
(
true
)
}
className=
{
styles
[
'address-select-action'
]
}
...
...
src/components/AddressSelect/schema.ts
View file @
f0d9f677
This diff is collapsed.
Click to expand it.
src/components/NiceForm/components/CustomAddressSelect.tsx
View file @
f0d9f677
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-05 11:26:43
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
05 11:30:21
* @LastEditTime: 2021-08-
10 16:49:14
* @Description:
*/
import
React
from
'react'
;
...
...
@@ -15,12 +15,16 @@ const CustomAddressSelect = connect()((props) => {
value
,
onChange
,
addressType
,
isDefault
,
disabled
,
...
rest
}
=
props
;
return
(
<
div
style=
{
{
flex
:
1
}
}
>
<
div
style=
{
{
flex
:
1
,
overflow
:
'hidden'
}
}
>
<
AddressSelect
addressType=
{
addressType
}
isDefault=
{
isDefault
}
disabled=
{
disabled
}
value=
{
value
}
onChange=
{
onChange
}
{
...
rest
}
...
...
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