Basic.tsx 999 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 32 33 34 35 36 37 38 39 40 41 42 43
// @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 Demo = (props) => {
  const handleChange = (value) => {
    console.log(`selected ${value}`);
  };
  return (
    <SelectCustom
      defaultValue="信息化会议"
      style={{
        width: 150,
        marginBottom: '10px',
      }}
      onChange={handleChange}
      showSearch={true}
      dropdownStyle={{ width: '100px' }}
      options={[
        {
          value: '产品研发会议',
          label: '产品研发会议',
        },
        {
          value: '信息化会议',
          label: '信息化会议',
        },
        {
          value: '项目会议',
          label: '项目会议',
        },
        {
          value: '管理会议',
          label: '管理会议',
        },
      ]}
    />
  );
};

export default Demo;