5
0

2 Commitit fc10a021d6 ... e6379c1135

Tekijä SHA1 Viesti Päivämäärä
  PIWALIN e6379c1135 冲突 1 viikko sitten
  PIWALIN 07e53b5955 feat:底部导航栏 1 viikko sitten

+ 11 - 3
src/components/shop-tabbar/shop-tabbar.vue

@@ -1,5 +1,3 @@
-<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
-
 <template>
   <view class="tab-bar">
     <view
@@ -28,8 +26,18 @@
 
   function selectTabBar(index: number, url: string) {
     currentTab.value = index
+    console.log(tabBar.list, '11111')
     tabbarStore.setCurIdx(index)
-    uni.switchTab({ url })
+    uni.switchTab({
+      url: `/${url}`,
+    })
+    // 使用 setTimeout 保证先更新视图再执行页面跳转
+    // setTimeout(() => {
+    //   tabbarStore.setCurIdx(id)
+    //   uni.switchTab({
+    //     url: `/${url}`,
+    //   })
+    // }, 100)
   }
 
   onLoad(() => {

+ 14 - 0
src/pages/category/category.vue

@@ -0,0 +1,14 @@
+<route lang="json5">
+{
+  layout: 'tabbar',
+  style: {
+    navigationBarTitleText: '%tabbar.category%',
+  },
+}
+</route>
+<template>
+  <view>听歌页面</view>
+</template>
+
+<script lang="ts" setup></script>
+<style lang="scss" scoped></style>

+ 11 - 0
src/pages/community/community.vue

@@ -0,0 +1,11 @@
+<route lang="json5">
+{
+  layout: 'tabbar',
+  style: {
+    navigationBarTitleText: '%tabbar.community%',
+  },
+}
+</route>
+<template>
+  <view>我的页面啊啦啦啦</view>
+</template>