@bagelink/vue 1.15.232 → 1.15.238
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/RouterWrapper.vue.d.ts.map +1 -1
- package/dist/components/dataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/layout/SidebarNavItem.vue.d.ts +1 -0
- package/dist/components/layout/SidebarNavItem.vue.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +8 -7
- package/dist/style.css +1 -1
- package/dist/types/NavLink.d.ts +1 -0
- package/dist/types/NavLink.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/RouterWrapper.vue +2 -0
- package/src/components/dataTable/DataTable.vue +3 -0
- package/src/components/layout/SidebarNavItem.vue +2 -0
- package/src/types/NavLink.ts +1 -0
package/dist/types/NavLink.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavLink.d.ts","sourceRoot":"","sources":["../../src/types/NavLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,MAAM,WAAW,OAAO;IACvB,KAAK,EAAE,kBAAkB,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd"}
|
|
1
|
+
{"version":3,"file":"NavLink.d.ts","sourceRoot":"","sources":["../../src/types/NavLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,MAAM,WAAW,OAAO;IACvB,KAAK,EAAE,kBAAkB,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd"}
|
package/package.json
CHANGED
|
@@ -33,6 +33,8 @@ const route = useRoute()
|
|
|
33
33
|
watch(
|
|
34
34
|
() => route.fullPath,
|
|
35
35
|
async () => {
|
|
36
|
+
// Hash-only / hash navigations scroll to the target — don't yank back to top.
|
|
37
|
+
if (route.hash) return
|
|
36
38
|
await nextTick()
|
|
37
39
|
const container = anchor.value?.closest('.pageContent') as HTMLElement | null
|
|
38
40
|
if (container) container.scrollTop = 0
|
|
@@ -8,6 +8,7 @@ import { resolveI18n } from '../../i18n'
|
|
|
8
8
|
interface LinkWithAction extends NavLink {
|
|
9
9
|
activeRoutes?: string[]
|
|
10
10
|
children?: LinkWithAction[]
|
|
11
|
+
exact?: boolean
|
|
11
12
|
action?: () => void
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -34,6 +35,7 @@ function linkActive(link: LinkWithAction): boolean {
|
|
|
34
35
|
p === '/' ? route.path === p : route.path === p || route.path.startsWith(`${p}/`))
|
|
35
36
|
}
|
|
36
37
|
if (!linkPath) return false
|
|
38
|
+
if (link.exact) return route.path === linkPath
|
|
37
39
|
if (linkPath === '/') return route.path === linkPath
|
|
38
40
|
return route.path === linkPath || route.path.startsWith(`${linkPath}/`)
|
|
39
41
|
}
|