魏熙美 5 anos atrás
pai
commit
8d9be086eb

+ 1
- 1
src/components/SelectButton/BuildSelect.jsx Ver arquivo

@@ -23,7 +23,7 @@ const BuildingSelect = (props) => {
23 23
   const [ data, setData ] = useState([])
24 24
   const [ value, setValue ] = useState('')
25 25
   const preProps = usePrevious(props)
26
-  
26
+
27 27
   if ((!preProps || !preProps.value) && props.value && !value) {
28 28
     setValue(props.value)
29 29
   }

+ 10
- 1
src/components/SelectButton/CitySelect.jsx Ver arquivo

@@ -30,7 +30,16 @@ const CitySelect = (props) => {
30 30
   }
31 31
 
32 32
   return (
33
-      <Select showSearch value={props.value} style={{ width: '180px' }} placeholder="请选择城市" onChange={props.onChange}>
33
+      <Select 
34
+      showSearch 
35
+      value={props.value} 
36
+      style={{ width: '180px' }} 
37
+      placeholder="请选择城市" 
38
+      onChange={props.onChange} 
39
+      filterOption={(input, option) =>
40
+        option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
41
+      }
42
+      >
34 43
           {data.map(city => (
35 44
             <Option key={city.id} value={city.id}>{city.name}</Option>
36 45
           ))}

+ 1
- 1
src/pages/customer/customerlist/index.jsx Ver arquivo

@@ -188,7 +188,7 @@ function body(props) {
188 188
       dataIndex: 'reportRecommendStatus',
189 189
       key: 'reportRecommendStatus',
190 190
       // eslint-disable-next-line no-nested-ternary
191
-      render: (_, record) => <><span>{record.reportRecommendStatus === 0 ? '报备' : record.reportRecommendStatus === 1 ? '报备' : record.reportRecommendStatus === 2 ? '推荐' : ''}</span></>,
191
+      render: (_, record) => <><span>{record.reportRecommendStatus === 0 ? '报备' : record.reportRecommendStatus === 1 ? '报备' : record.reportRecommendStatus === 2 ? '推荐' : ''}</span></>,
192 192
     },
193 193
     {
194 194
       title: '操作',