-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[link] Allow both router links and regular links to co-exist in same document #365
Conversation
lib/components/link.vue
Outdated
@@ -1,6 +1,6 @@ | |||
<template> | |||
<!-- When VueRouter is available --> | |||
<a v-if="routerAvailable" | |||
<a v-if="routerAvailable && to" |
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.
Can't we refactor && to
into computed property?
lib/components/link.vue
Outdated
@@ -52,16 +52,12 @@ | |||
}, | |||
_to() { | |||
if (!this.routerAvailable || this.disabled) { |
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.
Then this condition won't happen as routerAvailable
is false when no to
prop exists :))
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.
.
@pi0, check the new changes and see what you think? |
LGTM :) |
Hopefully this doesn't break something else :P |
Something is breaking Nav links. (Documentation website is broken) |
Is documentation site using latest release or master? |
Testing locally on master. I think condition should be |
Agh, lol.. an easy fix (I hope) |
Yep, i'll publish fix soon |
Shouldn't in the case neither |
* upstream/master: (220 commits) [button-toolbar] docs (bootstrap-vue#368) ESLint New component b-button-toolbar (bootstrap-vue#367) [link] fix click event [docs] navbar styling Refactor link mixin [button-group] fix toolbar keynav (bootstrap-vue#366) [Docs] ScrollSpy directive JSFiddle [Link] Small fixes [link] Allow both router links and regular links to co-exist in same document (bootstrap-vue#365) [pagination] ARIA attributes + Keyboard navigation (bootstrap-vue#364) [dropdown-item] explicit component reference (bootstrap-vue#361) Additional ARIA on navs and dropdown (bootstrap-vue#358) ESLint [docs] ScrollSpy [scrollspy] SSR fix v0.15.6 [modal] focusFirst timing tweak (bootstrap-vue#357) [scrollspy] documentation update [scrollspy] Documentation (bootstrap-vue#356) ...
BS V4.alpha.6 Maybe the dropdown-item component should create a |
In some cases one would like to have both regular links (i.e. links to an in-page ID) and router links (routed by vue-router).
If
to
is not specified, then assume a regular local link (not handled by router).Addresses #362 and #363 (I think... discussion is welcome)