import React, { useState } from 'react'; import { CarryOutOutlined } from '@ant-design/icons'; import { Space, Switch, TreeSelect } from 'antd'; const treeData = [ { value: 'parent 1', title: 'parent 1', icon: , children: [ { value: 'parent 1-0', title: 'parent 1-0', icon: , children: [ { value: 'leaf1', title: 'leaf1', icon: , }, { value: 'leaf2', title: 'leaf2', icon: , }, ], }, { value: 'parent 1-1', title: 'parent 1-1', icon: , children: [ { value: 'sss', title: 'sss', icon: , }, ], }, ], }, ]; const App: React.FC = () => { const [treeLine, setTreeLine] = useState(true); const [showLeafIcon, setShowLeafIcon] = useState(false); const [showIcon, setShowIcon] = useState(false); return ( setShowIcon(!showIcon)} /> setTreeLine(!treeLine)} /> setShowLeafIcon(!showLeafIcon)} /> ); }; export default App;