-
Notifications
You must be signed in to change notification settings - Fork 354
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
fix: header content lost when dragging from outline tree #1149
fix: header content lost when dragging from outline tree #1149
Conversation
WalkthroughThe change in this pull request modifies the logic for handling tree node children in the tree component. The code now uses a direct check with Changes
Sequence Diagram(s)sequenceDiagram
participant Main as Main.vue
participant Checker as Array Check
Main->>Checker: Evaluate child node type (Array.isArray(child))
alt Child is array
Checker->>Main: Returns true
Main->>Main: Call translateChild(item.children)
else Child is not array
Checker->>Main: Returns false
Main->>Main: No processing done
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
问题:拖拽Header组件会导致内容消失
定位:大纲树转换schema数据时,如果某个节点children属性不是数组,会删除children字段。Header组件的children是显示内容
解决方案:如果某个节点children属性不是数组,则不做其他处理
What is the current behavior?
拖拽Header组件会导致内容消失
Issue Number: #1137
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit