-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: vue3支持使用useTeleport #2078
Conversation
💖 Thanks for opening this pull request! 💖 Please follow the contributing guidelines. And we use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Pull Request Test Coverage Report for Build 2274797810
💛 - Coveralls |
Breaking change
讨论
伪代码
|
Congrats on merging your first pull request! 🎉🎉🎉 |
# @antv/x6-sites [1.5.0](https://github.com/antvis/x6/compare/@antv/[email protected]...@antv/[email protected]) (2022-05-09) ### Bug Fixes * 🐛 add updateCellId api ([#1739](#1739)) ([78cdb3b](78cdb3b)) * 🐛 not create label when text is empty ([#1783](#1783)) ([ed1fcd1](ed1fcd1)) * 🐛 release x6 v1.28.2 ([#1654](#1654)) ([745b90a](745b90a)) ### Features * ✨ add insertPort api ([#1763](#1763)) ([6809dba](6809dba)) * vue3支持使用useTeleport ([#2078](#2078)) ([b8c2175](b8c2175)) ### Dependencies * **@antv/x6:** upgraded to 1.31.5
# @antv/x6-vue-shape [1.4.0](https://github.com/antvis/x6/compare/@antv/[email protected]...@antv/[email protected]) (2022-05-09) ### Features * vue3支持使用useTeleport ([#2078](#2078)) ([b8c2175](b8c2175)) ### Dependencies * **@antv/x6:** upgraded to 1.31.5
# @antv/x6-sites [1.5.0](https://github.com/antvis/x6/compare/@antv/[email protected]...@antv/[email protected]) (2022-05-16) ### Bug Fixes * 🐛 add updateCellId api ([#1739](#1739)) ([78cdb3b](78cdb3b)) * 🐛 not create label when text is empty ([#1783](#1783)) ([ed1fcd1](ed1fcd1)) * 🐛 release x6 v1.28.2 ([#1654](#1654)) ([745b90a](745b90a)) ### Features * ✨ add insertPort api ([#1763](#1763)) ([6809dba](6809dba)) * vue3支持使用useTeleport ([#2078](#2078)) ([b8c2175](b8c2175)) ### Dependencies * **@antv/x6:** upgraded to 1.32.1
# @antv/x6-sites [1.5.0](https://github.com/antvis/x6/compare/@antv/[email protected]...@antv/[email protected]) (2022-05-17) ### Bug Fixes * 🐛 add updateCellId api ([#1739](#1739)) ([78cdb3b](78cdb3b)) * 🐛 not create label when text is empty ([#1783](#1783)) ([ed1fcd1](ed1fcd1)) * 🐛 release x6 v1.28.2 ([#1654](#1654)) ([745b90a](745b90a)) ### Features * ✨ add insertPort api ([#1763](#1763)) ([6809dba](6809dba)) * vue3支持使用useTeleport ([#2078](#2078)) ([b8c2175](b8c2175)) ### Dependencies * **@antv/x6:** upgraded to 1.32.2
# @antv/x6-sites [1.5.0](https://github.com/antvis/x6/compare/@antv/[email protected]...@antv/[email protected]) (2022-05-31) ### Bug Fixes * 🐛 add updateCellId api ([#1739](#1739)) ([78cdb3b](78cdb3b)) * 🐛 not create label when text is empty ([#1783](#1783)) ([ed1fcd1](ed1fcd1)) * 🐛 release x6 v1.28.2 ([#1654](#1654)) ([745b90a](745b90a)) ### Features * ✨ add insertPort api ([#1763](#1763)) ([6809dba](6809dba)) * vue3支持使用useTeleport ([#2078](#2078)) ([b8c2175](b8c2175)) ### Dependencies * **@antv/x6:** upgraded to 1.32.3
# @antv/x6-sites [1.5.0](https://github.com/antvis/x6/compare/@antv/[email protected]...@antv/[email protected]) (2022-06-05) ### Bug Fixes * 🐛 add updateCellId api ([#1739](#1739)) ([78cdb3b](78cdb3b)) * 🐛 not create label when text is empty ([#1783](#1783)) ([ed1fcd1](ed1fcd1)) * 🐛 release x6 v1.28.2 ([#1654](#1654)) ([745b90a](745b90a)) ### Features * ✨ add insertPort api ([#1763](#1763)) ([6809dba](6809dba)) * vue3支持使用useTeleport ([#2078](#2078)) ([b8c2175](b8c2175))
🎉 This PR is included in the following release 🎉 Thanks for being a part of the AntV community! 💪💯 |
# @antv/x6-sites [1.5.0](https://github.com/antvis/x6/compare/@antv/[email protected]...@antv/[email protected]) (2022-06-06) ### Bug Fixes * 🐛 add updateCellId api ([#1739](#1739)) ([78cdb3b](78cdb3b)) * 🐛 not create label when text is empty ([#1783](#1783)) ([ed1fcd1](ed1fcd1)) * 🐛 release x6 v1.28.2 ([#1654](#1654)) ([745b90a](745b90a)) ### Features * ✨ add insertPort api ([#1763](#1763)) ([6809dba](6809dba)) * vue3支持使用useTeleport ([#2078](#2078)) ([b8c2175](b8c2175))
# @antv/x6-sites [1.5.0](https://github.com/antvis/x6/compare/@antv/[email protected]...@antv/[email protected]) (2022-06-07) ### Bug Fixes * 🐛 add updateCellId api ([#1739](#1739)) ([78cdb3b](78cdb3b)) * 🐛 not create label when text is empty ([#1783](#1783)) ([ed1fcd1](ed1fcd1)) * 🐛 release x6 v1.28.2 ([#1654](#1654)) ([745b90a](745b90a)) ### Features * ✨ add insertPort api ([#1763](#1763)) ([6809dba](6809dba)) * vue3支持使用useTeleport ([#2078](#2078)) ([b8c2175](b8c2175))
Description
通过使用
Teleport
避免生成多个Vue App,提升渲染性能。x6-react-shape
提供的usePortal
方法。viewId
注册一个VuePortalShapeView
。VuePortalShapeView
会将使用当前view
的VueShape
的Component
挂载到一个动态的TeleportContainer
上返回出去。TeleportContainer
挂载到自己的页面上。Motivation and Context
现在的
VueShapeView
针对每一个VueShape
生成一个独立的App,mount到对应节点的foreignObject内部。当要挂载的 Vue 组件节点数量非常多时,挂载时长会比较长。
这里使用vue3内置的Teleport组件,封装一个
useTeleport
来提升节点挂载性能。#2075Types of changes
Self Check before Merge