We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
背景:
具体修改如下(修改处的起始行数以修改后的文件为准):
// 目录 ./src/lib/dragTreeTable.vue // 第一处 133 const row = rows[i]; 134 + let dragElementLevel = dragParentNode.firstElementChild.dataset.level; 135 + let targetElementLevel = row.dataset.level; 136 const rx = func.getElementLeft(row); // 第二处 140 if (x > rx && x < (rx + rw) && y > ry && y < (ry + rh)) { 141 + // 是否仅允许同级目录之间拖拽 142 + if (this.onlyAllowSiblingDrag ? dragElementLevel !== targetElementLevel : false) return; 143 const diffY = y - ry // 第三处 155 } else if (diffY/rowHeight > 1/4) { 156 + // 是否允许被目标元素包含 157 + if (!this.allowedIncluded) return; 158 if (hoverBlock.children[1].style.opacity !== '0.5') {
修改之后,调用如下(根据自己的需求修改 onlyAllowSiblingDrag 和 allowedIncluded 的值):
<dragTreeTable :data="treeData" :onDrag="onTreeDataChange" :isdraggable="true" :fixed="false" :height="400" :onlyAllowSiblingDrag="true" :allowedIncluded="false"></dragTreeTable>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
背景:
具体修改如下(修改处的起始行数以修改后的文件为准):
修改之后,调用如下(根据自己的需求修改 onlyAllowSiblingDrag 和 allowedIncluded 的值):
望其他大佬不吝斧正。
The text was updated successfully, but these errors were encountered: