Commit 43eebb7b authored by 前端-李俊鑫's avatar 前端-李俊鑫

fix: 选择地址组件调整

parent 5fffd3d7
......@@ -2,3 +2,8 @@
display: flex !important;
align-items: center !important;
}
.renderText {
color: #00A98F;
cursor: pointer;
}
......@@ -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}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment