From 64b432916af9c9218ab3f3eca614e26c542142ae Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 07 十一月 2023 15:47:13 +0800
Subject: [PATCH] bug
---
minipro_standard/components/myTabber.vue | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 104 insertions(+), 0 deletions(-)
diff --git a/minipro_standard/components/myTabber.vue b/minipro_standard/components/myTabber.vue
new file mode 100644
index 0000000..b8b5250
--- /dev/null
+++ b/minipro_standard/components/myTabber.vue
@@ -0,0 +1,104 @@
+<template>
+ <view>
+ <u-tabbar
+ :value="index"
+ @change="change"
+ fixed
+ activeColor="#222"
+ inactiveColor="#666"
+ :safeAreaInsetBottom="true">
+ <u-tabbar-item text="寰呭姙">
+ <view class="" slot="active-icon">
+ <image src="@/static/nav_daiban_sel@2x.png" class="icon-style" mode=""></image>
+ </view>
+ <view class="" slot="inactive-icon">
+ <image src="@/static/nav_daiban@2x.png" class="icon-style" mode=""></image>
+ </view>
+ </u-tabbar-item>
+ <u-tabbar-item text="宸ヤ綔鍙�">
+ <view class="" slot="active-icon">
+ <image src="@/static/nav_gongzuotai_sel@2x.png" class="icon-style" mode=""></image>
+ </view>
+ <view class="" slot="inactive-icon">
+ <image src="@/static/nav_gongzuotai@2x.png" class="icon-style" mode=""></image>
+ </view>
+ </u-tabbar-item>
+ <u-tabbar-item text="鎴戠殑">
+ <view class="" slot="active-icon">
+ <image src="@/static/nav_wode_sel@2x.png" class="icon-style" mode=""></image>
+ </view>
+ <view class="" slot="inactive-icon">
+ <image src="@/static/nav_wode@2x.png" class="icon-style" mode=""></image>
+ </view>
+ </u-tabbar-item>
+ </u-tabbar>
+ </view>
+</template>
+
+<script>
+ export default {
+ name:"myTabbar",
+ props: {
+ index: 0
+ },
+ data() {
+ return {
+ value: 0
+ };
+ },
+ methods: {
+ click(index) {
+ // console.log('click', index);
+ // this.$nextTick(() => {
+ // this.value = index
+ // if (index==0) {
+ // uni.switchTab({
+ // url: '/pages/index/index'
+ // });
+ // } else if (index== 1) {
+ // uni.switchTab({
+ // url: '/pages/service/service'
+ // });
+ // }else {
+ // uni.switchTab({
+ // url: '/pages/mine/mine'
+ // });
+ // }
+ // })
+ },
+ change(index) {
+ this.$nextTick(() => {
+ this.value = index
+ })
+
+ console.log(index);
+ if (index==0) {
+ // console.log('index');
+ uni.switchTab({
+ url: '/pages/index/index'
+ });
+ } else if (index== 1) {
+ // console.log('workbench');
+ uni.switchTab({
+ url: '/pages/workbench/workbench'
+ });
+ }else {
+ // console.log('mine');
+ uni.switchTab({
+ url: '/pages/mine/mine'
+ });
+ }
+ }
+ },
+ }
+ /**
+ *
+ * */
+</script>
+
+<style lang="scss" scope>
+.icon-style {
+ width: 44rpx;
+ height: 44rpx;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.3