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
32
33
34
35
36
37
38
39
40
41
42
// @ts-ignore
import React, { useEffect, useState } from 'react';
import { SelectCustom, TreeSelectCustom, Option, OptGroup, SHOW_PARENT } from '../index';
import './index.less';
const Demo1 = (props) => {
const handleChange = (value) => {
console.log(`selected ${value}`);
};
return (
<SelectCustom
mode="multiple"
allowClear
defaultValue={['浊度', 'COD']}
style={{
width: 300,
}}
onChange={handleChange}
showSearch={true}
options={[
{
value: '浊度',
label: '浊度',
},
{
value: 'pH',
label: 'pH',
},
{
value: '水温',
label: '水温',
},
{
value: 'COD',
label: 'COD',
},
]}
/>
);
};
export default Demo1;