miaofuhao 3 tygodni temu
rodzic
commit
28e5d7ccd7
2 zmienionych plików z 5 dodań i 6 usunięć
  1. 5 4
      src/pages/index/index.vue
  2. 0 2
      src/utils/i18n.ts

+ 5 - 4
src/pages/index/index.vue

@@ -60,7 +60,7 @@ async function fetchMenuData() {
60 60
       method: 'GET',
61 61
       data: {
62 62
         source: 1,
63
-      }
63
+      },
64 64
     })
65 65
     menuData.value = response.data
66 66
     // console.log('菜单数据:', response)
@@ -87,11 +87,12 @@ function handleMenuItemClick(menu: MenuItem) {
87 87
   }
88 88
   // 根据菜单ID执行相应操作
89 89
   if (menu.component) {
90
-    console.log('component:', menu.component) 
90
+    console.log('component:', menu.component)
91 91
     uni.navigateTo({
92
-      url:menu.component,
92
+      url: menu.component,
93 93
     })
94
-  } else {
94
+  }
95
+  else {
95 96
     uni.showToast({
96 97
       title: `点击了${menu.meta?.title || menu.name}`,
97 98
       icon: 'none',

+ 0 - 2
src/utils/i18n.ts

@@ -1,5 +1,3 @@
1
-import { t } from '@/locale/index'
2
-
3 1
 /** 非vue 文件使用 i18n */
4 2
 export function testI18n() {
5 3
   // 下面同样生效