quasar
Version:
Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
32 lines (28 loc) • 754 B
JavaScript
export const routerLinkProps = {
to: [String, Object],
exact: Boolean,
append: Boolean,
replace: Boolean,
activeClass: String,
exactActiveClass: String,
disable: Boolean
}
export const RouterLinkMixin = {
props: routerLinkProps,
computed: {
hasRouterLink () {
return this.disable !== true && this.to !== void 0 && this.to !== null && this.to !== ''
},
routerLinkProps () {
return {
to: this.to,
exact: this.exact,
append: this.append,
replace: this.replace,
activeClass: this.activeClass || 'q-router-link--active',
exactActiveClass: this.exactActiveClass || 'q-router-link--exact-active',
event: this.disable === true ? [] : void 0
}
}
}
}