diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 86795b4..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/reptileFront_nuxt.iml b/.idea/reptileFront_nuxt.iml deleted file mode 100644 index 0c8867d..0000000 --- a/.idea/reptileFront_nuxt.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml deleted file mode 100644 index f89da01..0000000 --- a/.idea/watcherTasks.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/assets/images/jilu.png b/assets/images/jilu.png new file mode 100644 index 0000000..59aa856 Binary files /dev/null and b/assets/images/jilu.png differ diff --git a/assets/images/zhuanhuan.png b/assets/images/zhuanhuan.png new file mode 100644 index 0000000..3edf08d Binary files /dev/null and b/assets/images/zhuanhuan.png differ diff --git a/components/Banner/Search.vue b/components/Banner/Search.vue index c712a76..d1ee896 100644 --- a/components/Banner/Search.vue +++ b/components/Banner/Search.vue @@ -40,8 +40,6 @@ - - + const props = defineProps(['title']); + const { prefixCls } = useDesign('banner'); + const bannerList = reactive([ + {id:1,img:'/_nuxt/assets/images/commonBanner.png'}, + {id:2,img:'/_nuxt/assets/images/commonBanner.png'}, + {id:3,img:'/_nuxt/assets/images/commonBanner.png'}, + {id:4,img:'/_nuxt/assets/images/commonBanner.png'}, + ]); + + + + diff --git a/components/Header/Index.vue b/components/Header/Index.vue index 8947323..b59abc0 100644 --- a/components/Header/Index.vue +++ b/components/Header/Index.vue @@ -9,7 +9,7 @@ :ellipsis="false" router > - {{ item.name }} @@ -44,6 +44,7 @@ const router = useRouter(); const routes = ref(router.getRoutes().filter(it => !it.meta.hidden)); //@ts-ignore routes.value.sort((a, b) => a.meta.order - b.meta.order); + const activeRoute = ref(route.path) const store = useAppStore() const {setLoginVisible, setInfo, setToken} = useUserInfo() @@ -86,8 +87,14 @@ function handleChange(val: any) { activeRoute.value = val.path; if (val.meta.hasOwnProperty('headerHost') && val.meta.headerHost) { store.setMenuTheme('dark') + store.setHomeBanner(false) } else { store.setMenuTheme('light') + if(val.meta.hasOwnProperty('homeBanner') && val.meta.homeBanner){ + store.setHomeBanner(true) + }else{ + store.setHomeBanner(false) + } } } @@ -95,8 +102,14 @@ watch(() => route, (val) => { activeRoute.value = val.path; if (val.meta.hasOwnProperty('headerHost') && val.meta.headerHost) { store.setMenuTheme('dark') + store.setHomeBanner(false) } else { store.setMenuTheme('light') + if(val.meta.hasOwnProperty('homeBanner') && val.meta.homeBanner){ + store.setHomeBanner(true) + }else{ + store.setHomeBanner(false) + } } }, {deep: true}) diff --git a/composables/useAppStore.ts b/composables/useAppStore.ts index 80fe1e5..ace1090 100644 --- a/composables/useAppStore.ts +++ b/composables/useAppStore.ts @@ -3,16 +3,19 @@ import {acceptHMRUpdate, createPinia, defineStore} from 'pinia'; type menu = 'light' | 'dark' export interface AppState { menuTheme: menu; + homeBanner: boolean; bannerTitle: string; } const useAppStore = defineStore('app', { state: (): AppState => ({ menuTheme: 'light', + homeBanner: true, bannerTitle: '' }), getters:{ getMenuTheme: (state)=> state.menuTheme, + getHomeBanner: (state)=> state.homeBanner, getBannerTitle: (state)=> state.bannerTitle, }, @@ -20,6 +23,9 @@ const useAppStore = defineStore('app', { setMenuTheme(type: menu = 'light'){ this.menuTheme = type; }, + setHomeBanner(type: boolean){ + this.homeBanner = type; + }, setBannerTitle(title: string): void{ this.bannerTitle = title; } diff --git a/layouts/tabLayout.vue b/layouts/tabLayout.vue index 07f297b..252ef47 100644 --- a/layouts/tabLayout.vue +++ b/layouts/tabLayout.vue @@ -1,7 +1,8 @@