Browse Source

docs: example of synchronous rc-tree (#28648)

pull/28749/head
qqabcv520 4 years ago
committed by GitHub
parent
commit
3fbe13ae86
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      components/tree/demo/drag-debug.md
  2. 6
      components/tree/demo/draggable.md

6
components/tree/demo/drag-debug.md

@ -57,9 +57,9 @@ class Demo extends React.Component {
onDrop = info => { onDrop = info => {
console.log(info); console.log(info);
const dropKey = info.node.props.eventKey; const dropKey = info.node.key;
const dragKey = info.dragNode.props.eventKey; const dragKey = info.dragNode.key;
const dropPos = info.node.props.pos.split('-'); const dropPos = info.node.pos.split('-');
const dropPosition = info.dropPosition - Number(dropPos[dropPos.length - 1]); const dropPosition = info.dropPosition - Number(dropPos[dropPos.length - 1]);
const loop = (data, key, callback) => { const loop = (data, key, callback) => {

6
components/tree/demo/draggable.md

@ -60,9 +60,9 @@ class Demo extends React.Component {
onDrop = info => { onDrop = info => {
console.log(info); console.log(info);
const dropKey = info.node.props.eventKey; const dropKey = info.node.key;
const dragKey = info.dragNode.props.eventKey; const dragKey = info.dragNode.key;
const dropPos = info.node.props.pos.split('-'); const dropPos = info.node.pos.split('-');
const dropPosition = info.dropPosition - Number(dropPos[dropPos.length - 1]); const dropPosition = info.dropPosition - Number(dropPos[dropPos.length - 1]);
const loop = (data, key, callback) => { const loop = (data, key, callback) => {

Loading…
Cancel
Save