File tree 1 file changed +23
-10
lines changed
1 file changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -104,16 +104,29 @@ export default {
104
104
break
105
105
}
106
106
}
107
- if (! flag && val .name === ' detail-id' ) {
108
- this .tabbar .push ({
109
- name: ' detail-id' ,
110
- icon: ' label-o' ,
111
- selectedIcon: ' label' ,
112
- to: val .path ,
113
- label: ' 详情'
114
- })
115
- } else if (flag && val .name !== ' detail-id' ) {
116
- this .tabbar .splice (4 , 1 )
107
+ if (val .name !== ' detail-id' ) {
108
+ if (flag) {
109
+ this .tabbar .splice (4 , 1 )
110
+ }
111
+ } else {
112
+ // eslint-disable-next-line no-lonely-if
113
+ if (flag) {
114
+ this .tabbar .splice (4 , 1 , {
115
+ name: ' detail-id' ,
116
+ icon: ' label-o' ,
117
+ selectedIcon: ' label' ,
118
+ to: val .path ,
119
+ label: ' 详情'
120
+ })
121
+ } else {
122
+ this .tabbar .push ({
123
+ name: ' detail-id' ,
124
+ icon: ' label-o' ,
125
+ selectedIcon: ' label' ,
126
+ to: val .path ,
127
+ label: ' 详情'
128
+ })
129
+ }
117
130
}
118
131
},
119
132
deep: true ,
You can’t perform that action at this time.
0 commit comments