123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template >
- <view>
- <u-tabbar v-model="myCurrent" :list="tabbarList"
- :before-switch="beforeSwitch" active-color="#0DBAC7" ></u-tabbar>
-
- </view>
- </template>
- <script>
-
- export default {
- name:"tabbarJob",
- props:{
- current: 0,
- elderStatus: false
- },
- data() {
- return {
- activeColor:"#5098FF",
- oldindex:this.current,
- myCurrent:this.current,
- tabbarList: [
- {
-
- iconPath: "grid",
- selectedIconPath: "grid-fill",
- text: '服务 ',
- pagePath2:"/pages/teacher/homePage/homePage",
- },
- {
- iconPath: "account",
- selectedIconPath: "account-fill",
- text: '我的',
- pagePath2:"/pages/teacher/mine/mine",
- }
- ],
- };
-
- },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>
|