diff --git a/components/tree/demo/dynamic.md b/components/tree/demo/dynamic.md index af81a162b2..ef15dcaf7c 100644 --- a/components/tree/demo/dynamic.md +++ b/components/tree/demo/dynamic.md @@ -24,7 +24,7 @@ interface DataNode { children?: DataNode[]; } -const initTreeDate: DataNode[] = [ +const initTreeData: DataNode[] = [ { title: 'Expand to load', key: '0' }, { title: 'Expand to load', key: '1' }, { title: 'Tree Node', key: '2', isLeaf: true }, @@ -50,7 +50,7 @@ function updateTreeData(list: DataNode[], key: React.Key, children: DataNode[]): } const Demo: React.FC<{}> = () => { - const [treeData, setTreeData] = useState(initTreeDate); + const [treeData, setTreeData] = useState(initTreeData); function onLoadData({ key, children }: any) { return new Promise(resolve => {