Yansen 2 år sedan
förälder
incheckning
e98815cb33
2 ändrade filer med 3 tillägg och 2 borttagningar
  1. 2
    1
      src/pages/check/edit/components/LocForm.jsx
  2. 1
    1
      src/pages/check/edit/index.jsx

+ 2
- 1
src/pages/check/edit/components/LocForm.jsx Visa fil

@@ -68,6 +68,7 @@ export default (props) => {
68 68
             <Cell title="性别">
69 69
               <View style={{textAlign: 'right'}}>
70 70
                 <RadioGroup
71
+                  disabled={readonly}
71 72
                   direction="horizontal"
72 73
                   value={answer?.sex}
73 74
                   style={{display: 'inline-flex'}}
@@ -82,7 +83,7 @@ export default (props) => {
82 83
               title="年龄"
83 84
               isLink
84 85
               value={answer?.age}
85
-              onClick={() => setShowAgePicker(true)}
86
+              onClick={() => !readonly && setShowAgePicker(true)}
86 87
             />
87 88
             <AgePicker
88 89
               show={showAgePicker}

+ 1
- 1
src/pages/check/edit/index.jsx Visa fil

@@ -18,7 +18,7 @@ import LocForm from './components/LocForm';
18 18
 import Question from './components/Question';
19 19
 import Footer from './components/Footer/index';
20 20
 
21
-const isNotEmpty = str => str !== undefined && str !== null && str.replace(/\s/g, '') !== '';
21
+const isNotEmpty = str => str !== undefined && str !== null && `${str}`.replace(/\s/g, '') !== '';
22 22
 
23 23
 export default (props) => {
24 24