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
43eebb7b
Commit
43eebb7b
authored
Apr 21, 2022
by
前端-李俊鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 选择地址组件调整
parent
5fffd3d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
14 deletions
+28
-14
AddressDrawer.less
src/components/AddressDrawer/AddressDrawer.less
+5
-0
AddressDrawer.tsx
src/components/AddressDrawer/AddressDrawer.tsx
+23
-14
No files found.
src/components/AddressDrawer/AddressDrawer.less
View file @
43eebb7b
...
...
@@ -2,3 +2,8 @@
display: flex !important;
align-items: center !important;
}
.renderText {
color: #00A98F;
cursor: pointer;
}
src/components/AddressDrawer/AddressDrawer.tsx
View file @
43eebb7b
...
...
@@ -6,6 +6,7 @@ import { FormatValue } from '.';
import
AddressForm
from
'./AddressForm'
;
import
AddressRaio
,
{
AddressRaioContext
,
AddressRaioContextProvider
}
from
'./AddressRaio'
;
import
AreaSet
from
'./AreaSet'
;
import
styles
from
'./AddressDrawer.less'
interface
SumbitRequest
{
add
:
(
values
?:
any
)
=>
Promise
<
any
>
...
...
@@ -41,6 +42,7 @@ interface AddressDrawerProps {
label
:
string
},
className
?:
string
renderText
?:
React
.
ReactNode
}
function
AddressDrawer
(
props
:
AddressDrawerProps
)
{
...
...
@@ -52,7 +54,8 @@ function AddressDrawer(props: AddressDrawerProps) {
return
FormatValue
(
addr
)
},
title
,
className
className
,
renderText
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
...
...
@@ -165,19 +168,25 @@ function AddressDrawer(props: AddressDrawerProps) {
return
(
<
AddressRaioContextProvider
value=
{
addrList
}
>
<
Row
className=
{
className
}
gutter=
{
10
}
>
<
Col
span=
{
20
}
>
<
Input
.
TextArea
rows=
{
rows
}
disabled=
{
disabled
}
value=
{
value
}
onChange=
{
handleInputChange
}
/>
</
Col
>
<
Col
span=
{
4
}
>
<
Button
disabled=
{
disabled
}
className=
'w-full'
onClick=
{
()
=>
setVisible
(
true
)
}
>
管理
</
Button
>
</
Col
>
</
Row
>
{
renderText
?
<
div
className=
{
styles
.
renderText
}
onClick=
{
()
=>
setVisible
(
true
)
}
>
{
renderText
}
</
div
>
:
(
<
Row
className=
{
className
}
gutter=
{
10
}
>
<
Col
span=
{
20
}
>
<
Input
.
TextArea
rows=
{
rows
}
disabled=
{
disabled
}
value=
{
value
}
onChange=
{
handleInputChange
}
/>
</
Col
>
<
Col
span=
{
4
}
>
<
Button
disabled=
{
disabled
}
className=
'w-full'
onClick=
{
()
=>
setVisible
(
true
)
}
>
管理
</
Button
>
</
Col
>
</
Row
>
)
}
<
Drawer
width=
{
600
}
visible=
{
visible
}
...
...
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