-
Notifications
You must be signed in to change notification settings - Fork 921
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(client): add VPLink and RouterLink #1353
Conversation
e597410
to
f7245d7
Compare
So the new Is it possible to get rid of both new and old My concern is to reduce user's confusion about the three different link components. |
I think we can stop providing the official router-link and use ours instead. But that could be a breaking change. The router link component should be kept as we do care about active state and the exact href location sometimes. With this, users should import the real routerlink and overide ours if they do want the official one |
@vuepress/client
useResolvedRoute
composables (with redirects support)two replacement for
<RouterLink>
invue-router
:<VPLink>
component, do not resolve any route during initialization.<RouterLink>
component, handling redirects and reducerouter.resolve
cost comparing with official<RouterLink>
and active state withvp-active
@vuepress/markdown
<VPLink>
by default for links plugin@vuepress/shared
inferRoutePath
function to avoid possible redirect matching that needs to callrouter.resolve
againDocumentation
All related api docs update
Performance
( under 6x slowdown mocking withofficial docs)
Original:
Before:
After:
Adding 1000 pages on official docs:
Before:
After: