// @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;