添加页面
This commit is contained in:
60
src/bundle/parten/components/Tabbar.vue
Normal file
60
src/bundle/parten/components/Tabbar.vue
Normal file
@ -0,0 +1,60 @@
|
||||
|
||||
<template>
|
||||
<view>
|
||||
currentTab--{{ currentTab }}
|
||||
<wd-tabbar v-model="tabbar" active-color="#4C9F44" fixed safeAreaInsetBottom @change="Tabbar.handleChange">
|
||||
<wd-tabbar-item title="收益明细" icon="home">
|
||||
<template #icon>
|
||||
<wd-img height="40rpx" width="40rpx" :src="currentTab === 0 ? `${OSS}images/parten/parten_bill_s.png` : `${OSS}images/parten/parten_bill.png`"></wd-img>
|
||||
</template>
|
||||
</wd-tabbar-item>
|
||||
<wd-tabbar-item title="下级用户" icon="cart">
|
||||
<template #icon>
|
||||
<wd-img height="40rpx" width="40rpx" :src="currentTab === 1 ? `${OSS}images/parten/parten_sub_s.png` : `${OSS}images/parten/parten_sub.png`"></wd-img>
|
||||
</template>
|
||||
</wd-tabbar-item>
|
||||
<wd-tabbar-item title="我的" icon="user">
|
||||
<template #icon>
|
||||
<wd-img height="40rpx" width="40rpx" :src="currentTab === 2 ? `${OSS}images/parten/parten_my_s.png` : `${OSS}images/parten/parten_my.png`"></wd-img>
|
||||
</template>
|
||||
</wd-tabbar-item>
|
||||
</wd-tabbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="Tabbar">
|
||||
const tabbar = ref(0)
|
||||
const currentTab = ref<number>(0)
|
||||
const OSS = inject('OSS')
|
||||
|
||||
const Tabbar = {
|
||||
handleChange: ({ value }: { value: string }) => {
|
||||
const index = Number(value)
|
||||
currentTab.value = index
|
||||
|
||||
if (index === 0) {
|
||||
uni.redirectTo({
|
||||
url: '/bundle/parten/pages/bill/bill'
|
||||
})
|
||||
} else if (index === 1) {
|
||||
uni.redirectTo({
|
||||
url: '/bundle/parten/pages/sub/sub'
|
||||
})
|
||||
} else if (index === 2) {
|
||||
uni.redirectTo({
|
||||
url: '/bundle/parten/pages/my/my'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 切换tabbar
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default {}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
Reference in New Issue
Block a user