--- order: 6 title: zh-CN: 线性样式 en-US: Show Tree Line --- ## zh-CN 通过 `treeLine` 配置线性样式。 ## en-US Use `treeLine` to show the line style. ```tsx import { Space, Switch, TreeSelect } from 'antd'; import React, { useState } from 'react'; const { TreeNode } = TreeSelect; const App: React.FC = () => { const [treeLine, setTreeLine] = useState(true); const [showLeafIcon, setShowLeafIcon] = useState(false); return ( setTreeLine(!treeLine)} /> setShowLeafIcon(!showLeafIcon)} /> ); }; export default App; ```