123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template >
- <view >
- <u-tabbar
-
- v-model="myCurrent" :list="tabbarList"
- :inactiveColor="inColor" :bgColor="bgColor"
- :before-switch="beforeSwitch" :activeColor="acColor" :height="elderStatus ? '110rpx' : '100rpx'" :icon-size="elderStatus ? '56rpx' : '40rpx'"></u-tabbar>
-
- </view>
- </template>
- <script>
- var img1=require('@/assets/img/riLine-vip-crown-2-line.svg')
- var img2=require('@/assets/img/riFill-vip-crown-2-fill.svg')
-
- var img3=require('@/assets/img/buy/riFill-gift-fill.svg')
- var img4=require('@/assets/img/buy/riLine-gift-line.svg')
-
-
- export default {
- name:"tabbarJob",
- props:{
- current: 0,
- elderStatus: false,
- bgColor: {
- type: String,
- default: '#ffffff'
- },
- inColor: {
- type: String,
- default: '#A8B0AD'
- },
- acColor: {
- type: String,
- default: '#009143'
- },
- },
- data() {
- return {
- activeColor:"#5098FF",
- oldindex:this.current,
- myCurrent:this.current,
- tabbarList: [{
- iconPath: "home-3-line",
- selectedIconPath: "home-3-fill",
- text: '主页 ',
-
- count: 0,
- isDot: true,
- customIcon: true,
- pagePath2:"/pages/index/index",
- },
- {
- // iconPath: img4,
- // selectedIconPath: img3,
- iconPath: "gift",
- selectedIconPath: "gift-fill",
-
- text: '活动',
- midButton: true,
- //customIcon: true,
- pagePath2:"/pages/index/activity",
- },
- {
- iconPath: "road-map-line",
- selectedIconPath: "road-map-fill",
- text: '找桩',
- midButton: true,
- customIcon: true,
- pagePath2:"/pages/searchPile/searchPile",
- },
- {
- iconPath: "user-5-line",
- selectedIconPath: "user-5-fill",
- text: '我的',
- count: 0,
- isDot: false,
- customIcon: true,
- pagePath2:"/pages/user/index",
- }
- ],
- };
-
- },methods:{
- setcount(c){
- this.myCurrent=c
- },
- beforeSwitch(index){
-
-
- if(index==this.current){
- return false
- }
- var url =this.tabbarList[index].pagePath2;
-
- uni.navigateTo({
- url: url
- })
- if(index==1){
- this.myCurrent=this.oldindex;
- return false;
- }else{
- return true;
- }
-
- },
-
- },mounted(){
-
- },destroyed(){
-
- }
-
-
- }
- </script>
- <style>
-
- </style>
|