wenbobowen hace 4 años
padre
commit
75ba56c861
Se han modificado 3 ficheros con 6 adiciones y 6 borrados
  1. 0 0
      dist/bundle.js
  2. 1 1
      package.json
  3. 5 5
      src/components/pageHeader/components/searchHeader/index.js

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/bundle.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@didi/platformui",
-  "version": "0.1.71",
+  "version": "0.1.72",
   "description": "A platformui",
   "main": "dist/bundle.js",
   "author": "wenbobowen",

+ 5 - 5
src/components/pageHeader/components/searchHeader/index.js

@@ -6,12 +6,12 @@ import styles from './style.module.less'
 export default function SearchHeader(props) {
   const { searchList, valueData, onChange, onSearch, onReset, handle, btnWidth = '88px' } = props
   const [ showMore, setShowMore ] = useState(false)
-  function drawLine(list) {
+  function drawLine(list, type) {
     if(Object.prototype.toString.call(list[0]) === "[object Object]") {
       return <FromChooseItem
         renderFormList={list}
         valueData={valueData}
-        onChange={(key, e) => onChange(key, e, true)}
+        onChange={(key, e) => onChange(key, e, type === 'default')}
       />
     } else {
       return list.map((t, idx) => <FromChooseItem
@@ -19,7 +19,7 @@ export default function SearchHeader(props) {
           renderFormList={t}
           vsToFormLineTop={idx}
           valueData={valueData}
-          onChange={(key, e) => onChange(key, e, true)}
+          onChange={(key, e) => onChange(key, e, type === 'default')}
         />
       )
     }
@@ -29,7 +29,7 @@ export default function SearchHeader(props) {
       <div className={clsx(styles.defaultBox, styles.spaceBetween)}>
         <div className={styles.content}>
           {/*  */}
-          {drawLine(searchList.default)}
+          {drawLine(searchList.default, 'default')}
         </div>
         <div className={styles.btn} style={{ width: btnWidth }}>
           {searchList.adv &&
@@ -49,7 +49,7 @@ export default function SearchHeader(props) {
                 valueData={valueData}
                 onChange={(key, e) => onChange(key, e)}
               /> */}
-              {drawLine(searchList.adv)}
+              {drawLine(searchList.adv, 'adv')}
             </div>
             <div className={styles.btnList}>
               <Button type="primary" onClick={() => onSearch()}>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio