diff --git a/lib/components/navbar-brand.vue b/lib/components/navbar-brand.vue index 97768e0669c..bf6390ca9c9 100644 --- a/lib/components/navbar-brand.vue +++ b/lib/components/navbar-brand.vue @@ -1,11 +1,8 @@ @@ -22,7 +19,7 @@ import { assign } from '../utils/object'; const linkProps = assign(omitLinkProps('href', 'to', 'tag'), { href: { type: originalLinkProps.href.type }, to: { type: originalLinkProps.to.type }, - tag: { type: String, default: 'div' } + tag: { type: String } }); export default { @@ -31,7 +28,13 @@ export default { computed: { linkProps: computed.linkProps, isLink() { - return this.to || this.href; + return this.to || this.href; + }, + componentTag(){ + return this.isLink ? `b-link` : (this.tag || 'div'); + }, + conditionalLinkProps() { + return this.isLink ? this.linkProps : {}; } } };