content: import React, { Component } from 'react';
  import { SegmentedControl, Text } from 'react-desktop/macOs';
  
  import AllContactList from './AllContactList'
  import AddContact from './AddContact'
  import Intro from '../components/Intro'
  
  export default class extends Component {
    constructor() {
      super();
      this.state = { selected: 1 }
    }
  
    render() {
      return (
        <SegmentedControl box>
          {this.renderItems()}
        </SegmentedControl>
      );
    }
  
    renderItems() {
      return [
        this.renderItem(1, '使用说明', <Intro />),
        this.renderItem(2, '联系人列表', <AllContactList />),
        this.renderItem(3, '输入新联系人', <AddContact />),
      ];
    }
  
    renderItem(key, title, content) {
      return (
        <SegmentedControl.Item
          key={key}
          title={title}
          selected={this.state.selected === key}
          onSelect={() => this.setState({ selected: key })}
        >
          {content}
        </SegmentedControl.Item>
      );
    }
  }