林凡 5 years ago
parent
commit
8150b2e6e2

+ 2
- 2
src/components/SelectButton/CitySelect2.jsx View File

26
         action: 'select',
26
         action: 'select',
27
     }).then((data) => {
27
     }).then((data) => {
28
         setData(data)
28
         setData(data)
29
-        getValue();
29
+        getValue(data);
30
         console.log('---123---')
30
         console.log('---123---')
31
     })
31
     })
32
   }
32
   }
34
   /**
34
   /**
35
    * 因为 有个需求是,如果这个城市被删除了,那么就直接展示为空,不能展示 cityId
35
    * 因为 有个需求是,如果这个城市被删除了,那么就直接展示为空,不能展示 cityId
36
    */
36
    */
37
-  const getValue = () => {
37
+  const getValue = (data) => {
38
     console.log(props.value)
38
     console.log(props.value)
39
     if (props.value) {
39
     if (props.value) {
40
       const tempData = data.filter(f => f.id == props.value)
40
       const tempData = data.filter(f => f.id == props.value)

+ 1
- 1
src/pages/carouselFigure/editCarousel.jsx View File

75
 
75
 
76
 
76
 
77
   const handleFormValueChange = (props, changedValues, allValues) => {
77
   const handleFormValueChange = (props, changedValues, allValues) => {
78
-      setExtraData(allValues)
78
+      // setExtraData(allValues)
79
   }
79
   }
80
 
80
 
81
   const XForm = createForm({ onValuesChange: handleFormValueChange })
81
   const XForm = createForm({ onValuesChange: handleFormValueChange })