林凡 5 년 전
부모
커밋
8150b2e6e2
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2
    2
      src/components/SelectButton/CitySelect2.jsx
  2. 1
    1
      src/pages/carouselFigure/editCarousel.jsx

+ 2
- 2
src/components/SelectButton/CitySelect2.jsx 파일 보기

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

+ 1
- 1
src/pages/carouselFigure/editCarousel.jsx 파일 보기

@@ -75,7 +75,7 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
75 75
 
76 76
 
77 77
   const handleFormValueChange = (props, changedValues, allValues) => {
78
-      setExtraData(allValues)
78
+      // setExtraData(allValues)
79 79
   }
80 80
 
81 81
   const XForm = createForm({ onValuesChange: handleFormValueChange })