You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<u-tabbar
|
|
|
|
|
active-color="rgb(41, 121, 255)"
|
|
|
|
|
inactive-color="#999999"
|
|
|
|
|
:border-top="borderTop"
|
|
|
|
|
:list="list"
|
|
|
|
|
:height="124"
|
|
|
|
|
:mid-button-size="170"
|
|
|
|
|
:icon-size="50"
|
|
|
|
|
@change="tabbatChange"
|
|
|
|
|
v-model="current"
|
|
|
|
|
></u-tabbar>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import global from "@/utils/global.js";
|
|
|
|
|
import tabBar from "@/utils/tabbar.js"; // 引入刚刚创建的tabBar.js
|
|
|
|
|
export default {
|
|
|
|
|
name: "sp-tabbar",
|
|
|
|
|
props: [],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
taskSettingData: null,
|
|
|
|
|
list: [],
|
|
|
|
|
current: 0,
|
|
|
|
|
borderTop: true,
|
|
|
|
|
menuPermission: false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
wactch: {},
|
|
|
|
|
computed: {
|
|
|
|
|
// 是否显示任务大厅
|
|
|
|
|
},
|
|
|
|
|
onShow(){
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
// this.getPermission();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 判断权限
|
|
|
|
|
getPermission() {
|
|
|
|
|
const tabBarList = uni.getStorageSync("tabBarList");
|
|
|
|
|
this.current=global.tabBarCurrent
|
|
|
|
|
this.list = tabBarList.length<=0?tabBar.oathTab:tabBarList;
|
|
|
|
|
},
|
|
|
|
|
tabbatChange(index) {
|
|
|
|
|
global.tabBarCurrent = index
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: this.list[index].pagePath,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
/deep/.u-tabbar__contentblue{
|
|
|
|
|
height: 154rpx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|