Explorar o código

单选默认选中在组合项中不做效果

zhouna %!s(int64=6) %!d(string=hai) anos
pai
achega
89338ddbdc
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/components/RadioDrop/index.jsx

+ 2 - 2
src/components/RadioDrop/index.jsx

@@ -99,11 +99,11 @@ class RadioDrop extends Component{
     },$("#addScrollEvent")[0])
   }
   componentDidMount(){    //默认值选中
-    const {data,ikey,handleSelect} = this.props;
+    const {data,ikey,handleSelect,hideTag} = this.props;
     const selected = data.find((it)=>{
       return it.selected === undefined&&+it.defaultSelect===1;
     });
-    if(selected){
+    if(!hideTag&&selected){
       // const text = selected.labelPrefix+selected.name+selected.labelSuffix;
       const text = selected.name;
       handleSelect&&handleSelect({ikey,id:selected.id,text});