diff --git a/components/tree/demo/basic.md b/components/tree/demo/basic.md index 5b6b8956c8..c28b1b67f8 100644 --- a/components/tree/demo/basic.md +++ b/components/tree/demo/basic.md @@ -7,8 +7,8 @@ --- ````jsx -var Tree = antd.Tree; -var TreeNode = Tree.TreeNode; +import { Tree } from 'antd'; +const TreeNode = Tree.TreeNode; ReactDOM.render( diff --git a/components/tree/demo/checkbox.md b/components/tree/demo/checkbox.md index 2c000534a6..76c82e9438 100644 --- a/components/tree/demo/checkbox.md +++ b/components/tree/demo/checkbox.md @@ -7,8 +7,8 @@ --- ````jsx -var Tree = antd.Tree; -var TreeNode = Tree.TreeNode; +import { Tree } from 'antd'; +const TreeNode = Tree.TreeNode; function handleCheck(info) { console.log('check: ', info); diff --git a/components/tree/demo/dynamic.md b/components/tree/demo/dynamic.md index bda6b46357..eb080a96ce 100644 --- a/components/tree/demo/dynamic.md +++ b/components/tree/demo/dynamic.md @@ -7,8 +7,8 @@ --- ````jsx -var Tree = antd.Tree; -var TreeNode = Tree.TreeNode; +import { Tree } from 'antd'; +const TreeNode = Tree.TreeNode; const asyncTree = [ {name: "pNode 01", key: "0-0"}, diff --git a/components/tree/demo/special.md b/components/tree/demo/special.md index 9262ee17f3..cd9e2d606e 100644 --- a/components/tree/demo/special.md +++ b/components/tree/demo/special.md @@ -7,9 +7,8 @@ --- ````jsx -var Tree = antd.Tree; -var TreeNode = Tree.TreeNode; -var Button = antd.Button; +import { Tree, Button } from 'antd'; +const TreeNode = Tree.TreeNode; class TreeDemo extends React.Component { constructor(props) {