Skip to content
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

删除节点 #5

Closed
MinDaren opened this issue Jun 29, 2021 · 4 comments
Closed

删除节点 #5

MinDaren opened this issue Jun 29, 2021 · 4 comments

Comments

@MinDaren
Copy link

请问怎么删除父节点下的所有子节点,同时不要删除父节点?现在项目里的代码是删除一个父节点后把子节点和当前节点都删了,所有我通过遍历每个子节点进行删除,但是在不使用删除节点动画时可以通过便利删除每个节点(虽然可以实现删除功能但是删除后视图会抖动偏移),而当设置删除动画为true时节点会出现删不掉的bu g

@MinDaren
Copy link
Author

MinDaren commented Jun 29, 2021

好像是因为没有处理viewholder缓存的bug

@guaishouN
Copy link
Owner

我看看先,根据你需求尽快我再改改

@guaishouN
Copy link
Owner

请问怎么删除父节点下的所有子节点,同时不要删除父节点?现在项目里的代码是删除一个父节点后把子节点和当前节点都删了,所有我通过遍历每个子节点进行删除,但是在不使用删除节点动画时可以通过便利删除每个节点(虽然可以实现删除功能但是删除后视图会抖动偏移),而当设置删除动画为true时节点会出现删不掉的bu g

问题已经修改好了, 使用'editor.removeNodeChildren(parentToRemoveChildren)'来通过父节点来删除子节点并保留父节点,开启删除动画吧,否则始终会有跳动的感觉

@MinDaren
Copy link
Author

MinDaren commented Jun 30, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants