| | |
| | | <template> |
| | | <div class="layout-navbars-breadcrumb-user pr15" :style="{ flex: layoutUserFlexNum }"> |
| | | <div class="logo"> |
| | | <img src="../../../assets/menu/companyLogo.png" /> |
| | | <span style="font-size: 32px; color: #409eff; font-weight: bolder; border-left: 2px solid #409eff; padding-left: 10px">{{ systemName }}</span> |
| | | <img @click="toHome" src="../../../assets/menu/companyLogo.png" /> |
| | | <span>{{ systemName }}</span> |
| | | </div> |
| | | <div style="display: flex; align-items: center; padding-right: 5px"> |
| | | <div @click="backToMenu()" class="backBtn">返回首页</div> |
| | |
| | | </div> |
| | | <el-dropdown :show-timeout="70" :hide-timeout="50" @command="onHandleCommandClick"> |
| | | <span class="layout-navbars-breadcrumb-user-link"> |
| | | <img :src="userInfos.photo" class="layout-navbars-breadcrumb-user-link-photo mr5" /> |
| | | <img src="../../../assets/avator.png" class="layout-navbars-breadcrumb-user-link-photo mr5" style="width: 24px;height: 24px"/> |
| | | {{ userInfos.userName }} |
| | | <el-icon class="el-icon--right"> |
| | | <ele-ArrowDown /> |
| | |
| | | import { useRequestOldRoutes } from '/@/stores/requestOldRoutes'; |
| | | import { dynamicRoutes } from '/@/router/route'; |
| | | import Cookies from 'js-cookie'; |
| | | import {useRoutesList} from "/@/stores/routesList"; |
| | | |
| | | export default defineComponent({ |
| | | name: 'layoutBreadcrumbUser', |
| | |
| | | const { proxy } = <any>getCurrentInstance(); |
| | | const router = useRouter(); |
| | | const stores = useUserInfo(); |
| | | const routeList = storeToRefs(useRoutesList()) |
| | | const storesThemeConfig = useThemeConfig(); |
| | | const { userInfos } = storeToRefs(stores); |
| | | const { themeConfig } = storeToRefs(storesThemeConfig); |
| | |
| | | } |
| | | }; |
| | | const backToMenu = () => { |
| | | router.push({ path: 'newMenu' }).then(()=>{ |
| | | routeList.routesList.value = [] |
| | | console.log(routeList); |
| | | }); |
| | | }; |
| | | const toHome = () => { |
| | | router.push({ path: 'newMenu' }); |
| | | }; |
| | | // 页面加载时 |
| | |
| | | return { |
| | | userInfos, |
| | | backToMenu, |
| | | toHome, |
| | | onLayoutSetingClick, |
| | | onHandleCommandClick, |
| | | onScreenfullClick, |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .layout-navbars-breadcrumb-user { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | @media screen and (min-width: 1400px) { |
| | | .logo{ |
| | | img { |
| | | height: 100%; |
| | | cursor: pointer; |
| | | } |
| | | span{ |
| | | font-size: 32px; |
| | | color: #409eff; |
| | | font-weight: bolder; |
| | | border-left: 2px solid #409eff; |
| | | padding-left: 10px |
| | | } |
| | | } |
| | | .backBtn { |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | margin-right: 20px; |
| | | |
| | | .logo { |
| | | height: 75%; |
| | | padding: 5px 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | overflow: hidden; |
| | | box-sizing: border-box; |
| | | img { |
| | | height: 100%; |
| | | } |
| | | } |
| | | &-link { |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | white-space: nowrap; |
| | | &-photo { |
| | | width: 25px; |
| | | height: 25px; |
| | | border-radius: 100%; |
| | | } |
| | | } |
| | | &-icon { |
| | | padding: 0 10px; |
| | | cursor: pointer; |
| | | color: var(--next-bg-topBarColor); |
| | | height: 80px; |
| | | line-height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | &:hover { |
| | | background: var(--next-color-user-hover); |
| | | i { |
| | | display: inline-block; |
| | | animation: logoAnimation 0.3s ease-in-out; |
| | | &:hover { |
| | | color: #409eff; |
| | | font-weight: bolder; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep(.el-dropdown) { |
| | | color: var(--next-bg-topBarColor); |
| | | } |
| | | ::v-deep(.el-badge) { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | ::v-deep(.el-badge__content.is-fixed) { |
| | | top: 12px; |
| | | } |
| | | .backBtn { |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | margin-right: 20px; |
| | | @media screen and (min-width: 1200px) and (max-width: 1400px) { |
| | | .logo{ |
| | | img { |
| | | height: 90%; |
| | | cursor: pointer; |
| | | } |
| | | span{ |
| | | font-size: 28px; |
| | | color: #409eff; |
| | | font-weight: bolder; |
| | | border-left: 2px solid #409eff; |
| | | padding-left: 10px |
| | | } |
| | | } |
| | | .backBtn { |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | margin-right: 20px; |
| | | |
| | | &:hover { |
| | | color: #409eff; |
| | | font-weight: bolder; |
| | | &:hover { |
| | | color: #409eff; |
| | | font-weight: bolder; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | @media screen and (max-width: 1024px) { |
| | | .logo{ |
| | | img { |
| | | width: 60%; |
| | | height: auto; |
| | | cursor: pointer; |
| | | } |
| | | span{ |
| | | font-size: 22px; |
| | | color: #409eff; |
| | | font-weight: bolder; |
| | | border-left: 2px solid #409eff; |
| | | padding-left: 10px |
| | | } |
| | | } |
| | | .backBtn { |
| | | font-size: 12px; |
| | | cursor: pointer; |
| | | margin-right: 20px; |
| | | |
| | | &:hover { |
| | | color: #409eff; |
| | | font-weight: bolder; |
| | | } |
| | | } |
| | | } |
| | | .layout-navbars-breadcrumb-user { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | .logo { |
| | | height: 75%; |
| | | padding: 5px 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | overflow: hidden; |
| | | box-sizing: border-box; |
| | | } |
| | | &-link { |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | white-space: nowrap; |
| | | &-photo { |
| | | width: 25px; |
| | | height: 25px; |
| | | border-radius: 100%; |
| | | } |
| | | } |
| | | &-icon { |
| | | padding: 0 10px; |
| | | cursor: pointer; |
| | | color: var(--next-bg-topBarColor); |
| | | height: 80px; |
| | | line-height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | &:hover { |
| | | background: var(--next-color-user-hover); |
| | | i { |
| | | display: inline-block; |
| | | animation: logoAnimation 0.3s ease-in-out; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep(.el-dropdown) { |
| | | color: var(--next-bg-topBarColor); |
| | | } |
| | | ::v-deep(.el-badge) { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | ::v-deep(.el-badge__content.is-fixed) { |
| | | top: 12px; |
| | | } |
| | | } |
| | | </style> |