-
Notifications
You must be signed in to change notification settings - Fork 1.3k
修复extension包引入vue包问题 #2302
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
base: master
Are you sure you want to change the base?
修复extension包引入vue包问题 #2302
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements automatic lifecycle management for Vue app instances in MiniMap scenarios by tracking node lifecycles and cleaning up resources when all nodes are destroyed. The key changes include downgrading TailwindCSS from v4 to v3.4.7 and refactoring MiniMap teleport container management.
- Downgraded TailwindCSS from version 4.1.11 to 3.4.7
- Implemented automatic Vue app instance cleanup based on node lifecycle tracking
- Moved MiniMap teleport container creation/destruction logic from extension to vue-node-registry
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updated TailwindCSS version and added libc specifications for platform-specific packages |
| packages/vue-node-registry/src/view.ts | Added flowId parameter to disconnect call for proper cleanup tracking |
| packages/vue-node-registry/src/teleport.ts | Added node tracking map and automatic cleanup logic for Vue app instances |
| packages/extension/src/components/mini-map/index.ts | Removed manual teleport container management and added isMiniMap flag |
| packages/core/src/model/GraphModel.ts | Added isMiniMap property to GraphModel |
| examples/vue3-app/src/views/LFChartView.vue | Added UI controls and test data for MiniMap functionality |
| examples/vue3-app/src/components/chart/linkChart.ts | Commented out automatic MiniMap display |
| examples/vue3-app/package.json | Updated TailwindCSS version specification |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| let active = false | ||
| const appInstances = new Map<string, InstanceType<any>>() | ||
| const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例 |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing punctuation and spacing in Chinese comment. Should be "用于储存当前流程图节点id,当节点都销毁时同时卸载vueApp实例" (add comma after 'id').
| const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例 | |
| const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id,当节点都销毁时同时卸载vueApp实例 |
|
|
||
| let active = false | ||
| const appInstances = new Map<string, InstanceType<any>>() | ||
| const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例 |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Map is typed as Map<string, any> but based on usage it should be Map<string, string[]> since it stores arrays of node IDs. This makes the code more maintainable and provides better type safety.
| const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例 | |
| const appNodesMap = new Map<string, string[]>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例 |
| this.animation = setupAnimation(animation) | ||
| this.overlapMode = options.overlapMode || OverlapMode.DEFAULT | ||
|
|
||
| this.isMiniMap = options.isMiniMap || false |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isMiniMap property is not declared in the class definition before being used in the constructor. It should be declared as a class property with appropriate documentation explaining its purpose (e.g., "Indicates whether this graph instance is used in a MiniMap component").

修复extension包引入vue包问题