| | |
| | | }, |
| | | SoftWareInfo: { |
| | | // 网站主标题(菜单导航、浏览器当前网页标题) |
| | | globalTitle: 'chat', |
| | | globalTitle: 'WI水务', |
| | | // 网站副标题(登录页顶部文字) |
| | | globalViceTitle: 'chat', |
| | | globalViceTitle: 'WI水务', |
| | | // 网站副标题(登录页顶部文字) |
| | | globalViceTitleMsg: '义维科技有限公司', |
| | | // tab 页 icon |
| | |
| | | window.route = [ |
| | | |
| | | { |
| | | name: 'Home', |
| | | isKeepAlive: false, |
| | |
| | | path: '/home', |
| | | component: '/project/ch/home/Home.vue', |
| | | redirect: null, |
| | | showTitle: false, |
| | | }, |
| | | { |
| | | name: 'Scenario', |
| | |
| | | path: '/Scenario', |
| | | component: '/project/ch/home/Scenario.vue', |
| | | redirect: null, |
| | | showTitle: true, |
| | | }, |
| | | { |
| | | name: 'AboutUs', |
| | |
| | | path: '/AboutUs', |
| | | component: '/project/ch/home/AboutUs.vue', |
| | | redirect: null, |
| | | showTitle: true, |
| | | } |
| | | |
| | | ]; |
| | |
| | | |
| | | resultAny.meta.isAffix = pathRoute.isAffix; |
| | | resultAny.meta.isKeepAlive = pathRoute.isKeepAlive; |
| | | |
| | | resultAny.meta.showTitle = pathRoute.showTitle; |
| | | // 将 pathMap 的 value 置为当前 result |
| | | pathMap.set(item.Path, result as any); |
| | | } |
| | |
| | | <template> |
| | | <div class="top_text"> |
| | | <div class="top_text flex justify-between px-6 items-center"> |
| | | <div v-if="routerMeta.showTitle" class="font-bold flex items-center cursor-pointer" @click="goBack"> |
| | | <span class="flex-center"> |
| | | <SvgIcon name="ele-ArrowLeft" /> |
| | | </span> |
| | | <span class="text-sm"> |
| | | {{ routerMeta.title }} |
| | | </span> |
| | | </div> |
| | | |
| | | <div class="notice"> |
| | | <el-badge :value="3"> |
| | | <el-button link size="small" icon="ele-Message" class="set-notice" @click="handleAnnouncementClick">系统公告</el-button> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { reactive } from 'vue'; |
| | | import { computed, reactive } from 'vue'; |
| | | import router from '/@/router'; |
| | | let state = reactive({ |
| | | isShowAnnouncement: false, |
| | | announcementList: [ |
| | |
| | | }, |
| | | ], |
| | | }); |
| | | |
| | | const routerMeta = computed(() => router.currentRoute.value.meta); |
| | | const handleAnnouncementClick = () => { |
| | | state.isShowAnnouncement = !state.isShowAnnouncement; |
| | | }; |
| | | |
| | | const goBack = () => { |
| | | router.back(); |
| | | }; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .top_text { |
| | |
| | | path: String; |
| | | component: String; |
| | | redirect?: String; |
| | | showTitle:boolean; |
| | | }; |
| | | |
| | | const pathArr = window.route; |
| | |
| | | isIframe?: boolean; |
| | | roles?: string[]; |
| | | icon?: string; |
| | | showTitle?:boolean; |
| | | } |
| | | } |
| | | |