@xizs/nuxt-antui 0.0.36 → 0.0.38

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.
@@ -9,6 +9,7 @@ export const useRouteInfo = (menuItems: any[]) =>
9
9
  console.log(menuItems)
10
10
 
11
11
  const route = useRoute()
12
+ console.log(route)
12
13
 
13
14
  const findPath = (
14
15
  items: any[],
@@ -34,7 +35,11 @@ export const useRouteInfo = (menuItems: any[]) =>
34
35
  watch(
35
36
  () => route.fullPath,
36
37
  () => {
37
- const match = findPath(menuItems, route.path)
38
+ let path = route.path
39
+ if (path.endsWith('/')) {
40
+ path = path.slice(0, -1)
41
+ }
42
+ const match = findPath(menuItems, path)
38
43
  if (match) {
39
44
  info.value = {
40
45
  name: match.titles.at(-1) || '',
package/nuxt.config.ts CHANGED
@@ -2,7 +2,6 @@ import tailwindcss from '@tailwindcss/vite'
2
2
  import { fileURLToPath } from 'url'
3
3
  import { dirname, join } from 'path'
4
4
  const currentDir = dirname(fileURLToPath(import.meta.url))
5
- console.log(currentDir)
6
5
 
7
6
  // https://nuxt.com/docs/api/configuration/nuxt-config
8
7
  export default defineNuxtConfig({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xizs/nuxt-antui",
3
3
  "type": "module",
4
- "version": "0.0.36",
4
+ "version": "0.0.38",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",