|
|
@@ -5,17 +5,26 @@ export interface TabbarItem {
|
|
|
title: string
|
|
|
icon2: string
|
|
|
icon1: string
|
|
|
+ isShow: boolean
|
|
|
}
|
|
|
|
|
|
const tabbarItems = ref<TabbarItem[]>([
|
|
|
- { name: 'smqjh-home', value: null, active: true, title: '首页', icon1: '', icon2: '' },
|
|
|
- { name: 'smqjh-classfiy', value: null, active: false, title: '分类', icon1: '', icon2: '' },
|
|
|
- { name: 'smqjh-cart', value: null, active: false, title: '购物车', icon1: '', icon2: '' },
|
|
|
- { name: 'smqjh-my', value: null, active: false, title: '我的', icon1: '', icon2: '' },
|
|
|
+ { name: 'smqjh-home', value: null, active: true, title: '首页', icon1: '', icon2: '', isShow: true },
|
|
|
+ { name: 'smqjh-classfiy', value: null, active: false, title: '分类', icon1: '', icon2: '', isShow: true },
|
|
|
+ { name: 'smqjh-cart', value: null, active: false, title: '购物车', icon1: '', icon2: '', isShow: true },
|
|
|
+ { name: 'smqjh-my', value: null, active: false, title: '我的', icon1: '', icon2: '', isShow: true },
|
|
|
])
|
|
|
|
|
|
export function useTabbar() {
|
|
|
- const tabbarList = computed(() => tabbarItems.value)
|
|
|
+ const { isOnlineAudit } = storeToRefs(useSysStore())
|
|
|
+ const tabbarList = computed(() => {
|
|
|
+ if (isOnlineAudit.value) {
|
|
|
+ return tabbarItems.value.filter(item => item.name !== 'smqjh-classfiy')
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return tabbarItems.value
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
const activeTabbar = computed(() => {
|
|
|
const item = tabbarItems.value.find(item => item.active)
|