Basic4.tsx 872 Bytes
Newer Older
李纪文's avatar
李纪文 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
// @ts-ignore
import React, { useEffect, useState } from 'react';
import { SelectCustom, TreeSelectCustom, Option, OptGroup, SHOW_PARENT } from '../index';
import { HomeOutlined } from '@ant-design/icons';
import './index.less';

const Demo4 = (props) => {
  const handleChange = (value) => {
    console.log(`selected ${value}`);
  };
  return (
    <SelectCustom
      defaultValue="加压泵站"
      style={{
        width: 200,
      }}
      onChange={handleChange}
    >
      <OptGroup label="崇左水厂">
        <Option value="原水泵站">原水泵站</Option>
        <Option value="加压泵站">加压泵站</Option>
      </OptGroup>
      <OptGroup label="丽江水厂">
        <Option value="沉淀池">沉淀池</Option>
        <Option value="清水泵房">清水泵房</Option>
      </OptGroup>
    </SelectCustom>
  );
};

export default Demo4;