-
Notifications
You must be signed in to change notification settings - Fork 4.8k
基于iview的tree组件拓展了树节点拖拽功能,默认使用了远程加载 #1192
New issue
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
Open
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
增加树节点拖拽组件源码至_c/tree-drag
增加相应demo和路由、i18n文字配置
组件目前开放了
1个参数
// 接收返回Promise的方法
getChild: {
type: Function,
default: null
}
2个事件
// 节点选择触发
// node 选择的树节点
on-select(node)
// 拖拽完成触发
// dragNode 拖拽的树节点
// dropNode 拖拽至目标的树节点
// position 拖拽到目标节点的位置('before' 'inner' 'after')
// event 拖拽结束事件本身
on-drag(dragNode, dropNode, position, event)
该组件个人维护地址: https://github.com/Flywor/iview-tree-drag
提供该功能加入参考
欢迎拍砖指导