/**
 * @see https://gist.github.com/afc163/7582f35654fd03d5be7009444345ea17
 * 省市区选择组件
 */
import React, { Component } from "react";
import { Cascader } from 'antd';
import options from './cascader-address-options';
import { connect } from "dva";

@connect((state) => ({
  //地图数据
  mapStyle: state.command.mapStyle,
}))
export default class CityCascader extends Component {
  constructor(props) {
    super(props);
  }
  componentDidMount() {
  }
  onChange=(code, name)=>{
    this.props.onChange && this.props.onChange({code, name});
  }
  render() {
    return (
      <Cascader options={options} onChange={this.onChange} />
    );
  }
}
