Component({
  props: {
    onChange: () => null
  },
  data: {
    show: false,
    list: [{
      name: '本人',
      id: 1
    }, {
      name: '父母',
      id: 2
    }, {
      name: '子女',
      id: 3
    }, {
      name: '其他',
      id: 4
    }]
  },

  didMount() {},

  methods: {
    onClosePopup() {
      this.setData({
        show: false
      });
    },

    onTap(e) {
      const {
        item
      } = e.target.dataset;
      this.onClosePopup();
      this.props.onChange(item);
    },

    onOpenPopup() {
      this.setData({
        show: true
      });
    }

  }
});