From af1ef3ab8ecf596acd252fd727c08f38f4ef6055 Mon Sep 17 00:00:00 2001 From: H1d3rOne Date: Sat, 7 Mar 2026 21:06:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89tabBar=E7=BB=84=E4=BB=B6=EF=BC=8Cemoji=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建custom-tabbar组件 - 使用emoji图标:首页🏠、记录📋、工具🔧、我的👤 - 在各tabBar页面添加自定义tabBar组件 - pages.json启用custom: true --- .../custom-tabbar/custom-tabbar.vue | 120 ++++++++++++++++++ xuan-deduct-uniapp/src/pages.json | 23 ++-- xuan-deduct-uniapp/src/pages/index/index.vue | 2 + xuan-deduct-uniapp/src/pages/mine/mine.vue | 2 + .../src/pages/records/records.vue | 2 + xuan-deduct-uniapp/src/pages/tools/tools.vue | 2 + 6 files changed, 139 insertions(+), 12 deletions(-) create mode 100644 xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue diff --git a/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue b/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue new file mode 100644 index 0000000..963b040 --- /dev/null +++ b/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/xuan-deduct-uniapp/src/pages.json b/xuan-deduct-uniapp/src/pages.json index e811ff9..760935c 100644 --- a/xuan-deduct-uniapp/src/pages.json +++ b/xuan-deduct-uniapp/src/pages.json @@ -168,6 +168,7 @@ "navigationBarTitleText": "玄机排盘" }, "tabBar": { + "custom": true, "color": "#999999", "selectedColor": "#DB2777", "backgroundColor": "#ffffff", @@ -175,28 +176,26 @@ "list": [ { "pagePath": "pages/index/index", - "text": "首页", - "iconPath": "static/tabbar/home.png", - "selectedIconPath": "static/tabbar/home-active.png" + "text": "首页" }, { "pagePath": "pages/records/records", - "text": "记录", - "iconPath": "static/tabbar/record.png", - "selectedIconPath": "static/tabbar/record-active.png" + "text": "记录" }, { "pagePath": "pages/tools/tools", - "text": "工具", - "iconPath": "static/tabbar/tool.png", - "selectedIconPath": "static/tabbar/tool-active.png" + "text": "工具" }, { "pagePath": "pages/mine/mine", - "text": "我的", - "iconPath": "static/tabbar/mine.png", - "selectedIconPath": "static/tabbar/mine-active.png" + "text": "我的" } ] + }, + "easycom": { + "autoscan": true, + "custom": { + "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" + } } } diff --git a/xuan-deduct-uniapp/src/pages/index/index.vue b/xuan-deduct-uniapp/src/pages/index/index.vue index 708e28c..53bb0c7 100644 --- a/xuan-deduct-uniapp/src/pages/index/index.vue +++ b/xuan-deduct-uniapp/src/pages/index/index.vue @@ -153,6 +153,8 @@ + + diff --git a/xuan-deduct-uniapp/src/pages/mine/mine.vue b/xuan-deduct-uniapp/src/pages/mine/mine.vue index 77de396..7a18aa6 100644 --- a/xuan-deduct-uniapp/src/pages/mine/mine.vue +++ b/xuan-deduct-uniapp/src/pages/mine/mine.vue @@ -23,6 +23,8 @@ 版本 1.0.0 + + diff --git a/xuan-deduct-uniapp/src/pages/records/records.vue b/xuan-deduct-uniapp/src/pages/records/records.vue index fbfea2a..087dc49 100644 --- a/xuan-deduct-uniapp/src/pages/records/records.vue +++ b/xuan-deduct-uniapp/src/pages/records/records.vue @@ -28,6 +28,8 @@ + + diff --git a/xuan-deduct-uniapp/src/pages/tools/tools.vue b/xuan-deduct-uniapp/src/pages/tools/tools.vue index b8a2e50..b3c9393 100644 --- a/xuan-deduct-uniapp/src/pages/tools/tools.vue +++ b/xuan-deduct-uniapp/src/pages/tools/tools.vue @@ -22,6 +22,8 @@ + +