Browse Source

调整年龄的结构,从数字修改为包含数字与单位

dengdx 2 months ago
parent
commit
d24099f963
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/pages/patient/components/register.form.tsx

+ 9 - 1
src/pages/patient/components/register.form.tsx

@@ -7,6 +7,7 @@ import {
   Select,
   Radio,
   FormInstance,
+  Space,
 } from 'antd';
 import { useIntl, FormattedMessage } from 'react-intl';
 
@@ -216,7 +217,14 @@ const BasicInfoForm: React.FC<BasicInfoFormProps> = ({ style, form }) => {
         }
         name="patient_age"
       >
-        <InputNumber min={0} style={{ width: '100%' }} />
+        <Space.Compact>
+          <InputNumber min={0} style={{ width: '70%' }} />
+          <Select style={{ width: '30%' }}>
+            <Select.Option value="D">天</Select.Option>
+            <Select.Option value="M">月</Select.Option>
+            <Select.Option value="Y">年</Select.Option>
+          </Select>
+        </Space.Compact>
       </Form.Item>
       <Form.Item
         label={