mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-18 05:58:07 +01:00
Compare commits
1 Commits
patch-1
...
fix/inerti
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d8adf782d |
@@ -110,14 +110,14 @@ const linkClass = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const page = usePage()
|
const page = usePage()
|
||||||
const url = computed(() => props.to ?? props.href ?? '#')
|
const url = computed(() => props.to ?? props.href ?? '')
|
||||||
|
|
||||||
const isActive = computed(() => props.active || (props.exact ? url.value === props.href : page?.url.startsWith(url.value)))
|
const isActive = computed(() => props.active || (!!url.value && (props.exact ? url.value === props.href : page?.url.startsWith(url.value))))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<template v-if="!isExternal">
|
<template v-if="!isExternal && !!url">
|
||||||
<InertiaLink v-bind="routerLinkProps" :href="url" custom>
|
<InertiaLink v-bind="routerLinkProps" :href="url">
|
||||||
<template v-if="custom">
|
<template v-if="custom">
|
||||||
<slot
|
<slot
|
||||||
v-bind="{
|
v-bind="{
|
||||||
|
|||||||
Reference in New Issue
Block a user