|
@@ -420,14 +420,15 @@
|
|
|
dropType = 'none';
|
|
|
}
|
|
|
|
|
|
+ const iconPosition = dropNode.$el.querySelector('.el-tree-node__expand-icon').getBoundingClientRect();
|
|
|
const dropIndicator = this.$refs.dropIndicator;
|
|
|
if (dropType === 'before') {
|
|
|
- indicatorTop = targetPosition.top - treePosition.top;
|
|
|
+ indicatorTop = iconPosition.top - treePosition.top;
|
|
|
} else if (dropType === 'after') {
|
|
|
- indicatorTop = targetPosition.bottom - treePosition.top;
|
|
|
+ indicatorTop = iconPosition.bottom - treePosition.top;
|
|
|
}
|
|
|
dropIndicator.style.top = indicatorTop + 'px';
|
|
|
- dropIndicator.style.left = (targetPosition.right - treePosition.left) + 'px';
|
|
|
+ dropIndicator.style.left = (iconPosition.right - treePosition.left) + 'px';
|
|
|
|
|
|
if (dropType === 'inner') {
|
|
|
addClass(dropNode.$el, 'is-drop-inner');
|