...
|
...
|
@@ -21,6 +21,7 @@ const actions = [ |
|
|
homeActions,
|
|
|
];
|
|
|
|
|
|
import Immutable, {Record, List} from 'immutable';
|
|
|
|
|
|
function mapStateToProps(state) {
|
|
|
return {
|
...
|
...
|
@@ -52,6 +53,7 @@ class DrawerContainer extends Component { |
|
|
|
|
|
_onPressItem(index) {
|
|
|
//选择店铺
|
|
|
this.drawer.close();
|
|
|
console.log(index);
|
|
|
// let item = this.props.user.shops.get(index);
|
|
|
// this.props.actions.switchShop(item.id);
|
...
|
...
|
@@ -98,12 +100,17 @@ class DrawerContainer extends Component { |
|
|
},
|
|
|
];
|
|
|
|
|
|
let i = List(items);
|
|
|
console.log(i);
|
|
|
console.log(i.get(0).name);
|
|
|
console.log(Immutable.fromJS(items).get(0));
|
|
|
|
|
|
const children = this.props.navigationState.children;
|
|
|
let disabled = children[0].index === 0 ? false : true; //只在第一个tab页启用抽屉菜单
|
|
|
|
|
|
return (
|
|
|
<Drawer
|
|
|
ref="navigation"
|
|
|
ref={(ref) => this.drawer = ref}
|
|
|
type="displace"
|
|
|
content={<SideMenu items={items} onPressItem={this._onPressItem}/>}
|
|
|
tapToClose={true}
|
...
|
...
|
|