方法this
get tProps() { let arr = []; const {findDoclist} = this.props.emr; findDoclist.map((item, key) => { arr.push({title: item.name,key:key,value:key,id:item.id,}) }) console.log(arr, '=====',findDoclist) return { treeData: arr, // treeData:this.state.findDoclist, value: this.state.value, onChange: this.onChange.bind(this, this.state.value), treeCheckable: true, showCheckedStrategy: SHOW_PARENT, searchPlaceholder: 'Please select', } }
結構