UNPKG

@flatbiz/layout

Version:

WEB菜单布局

706 lines (688 loc) 18.4 kB
.loader { background-color: #ffffff; position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 100000; display: flex; justify-content: center; align-items: center; opacity: 1; text-align: center; } .loader.fullScreen { position: fixed; } .loader .loader-wrapper { width: 100px; height: 100px; display: inline-flex; flex-direction: column; justify-content: space-around; } .loader .loader-inner { width: 30px; height: 30px; margin: 0 auto; text-indent: -12345px; border-top: 2px solid rgba(0, 128, 227, 0.08); border-right: 2px solid rgba(0, 128, 227, 0.08); border-bottom: 2px solid rgba(0, 128, 227, 0.08); border-left: 2px solid rgba(0, 84, 153, 0.7); border-radius: 50%; z-index: 100001; animation: spinner 600ms infinite linear; } .loader .loader-text { width: 100px; height: 20px; text-align: center; font-size: 12px; letter-spacing: 4px; color: #0080e3; } .loader.hidden { display: none; } @keyframes spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } body, #app { background-color: #f2f4f8; height: 100%; } .page { position: relative; overflow-y: auto; overflow-x: hidden; flex: 1; } .page .back-top { right: 50px; } .page .back-top .ant-back-top-content { opacity: 0.3; transition: all 0.3s; box-shadow: 0 0 15px 1px rgba(69, 65, 78, 0.1); } .page .back-top .ant-back-top-content:hover { opacity: 1; } .page-flex { display: flex; flex-direction: column; } .page-full { flex: 1; overflow-y: auto; } .bread-wrapper { padding: 6px 15px 6px 8px; margin-bottom: 10px; background: #fff; display: flex; align-items: center; justify-content: space-between; } .bread-wrapper .bread { display: inline-block; } .bread-extend { flex: 1; } .layout-page-wrapper { position: relative; padding: 8px; flex: 1; overflow: hidden; height: 100%; } .layout-page { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; } .layout-page-noheader { padding: 0; } .layout-page-noheader .bread-wrapper { padding: 5px 15px 5px 8px; } .layout-page-noheader .page { padding: 0 8px 8px 8px; } .header-account { line-height: initial; margin-right: 20px; cursor: pointer; height: 100%; color: var(--header-color); } .header-account:hover { background: var(--header-active-bg-color); color: var(--header-active-color); } .header-account .header-account-wraper { padding: 0 15px; height: 100%; display: flex; align-items: center; } .account-dropdown-overlay { z-index: 900; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08); } .layout-brand { position: relative; height: 64px; line-height: 64px; overflow: hidden; transition: all 0.2s; color: var(--header-color); background: var(--header-bg-color); display: flex; align-items: center; justify-content: center; white-space: nowrap; } .brand-logo { background-size: 40px 100%; width: 40px; height: 100%; background-repeat: no-repeat; background-position: center center; } .brand-name { margin-left: 15px; font-size: 18px; white-space: nowrap; } .ant-layout-sider-collapsed .layout-brand { display: block; overflow: auto; } .ant-layout-sider-collapsed .brand-logo { width: 60px; } .layout-shrink { width: 100%; text-align: center; font-size: 18px; cursor: pointer; transition: all 0.3s ease-out; display: flex; align-items: center; justify-content: center; margin-right: 10px; padding: 10px 0; box-shadow: 0px 0px 17px rgba(0, 0, 0, 0.2); color: var(--sidebar-color); } .layout-shrink:hover { color: var(--sidebar-active-color); } .header-topbar-menus { width: 100%; } .header-topbar-menus.ant-menu-horizontal > .ant-menu-item a:before { bottom: 0; } .header-topbar-menus.ant-menu-horizontal { border-bottom: none; line-height: inherit; } .header-topbar-menus .ant-menu-item { display: flex; align-items: center; } .header-topbar-menus .ant-menu-item::after { bottom: 12px; border-bottom: 0; } .header-topbar-menus .ant-menu-item-selected:after { height: 3px; width: 30%; min-width: 22px; position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); border-radius: 3px; content: ' '; } .header-topbar-menus.ant-menu-light .ant-menu-item-active:not(.ant-menu-item-selected):hover:after { border-bottom: 0; } .header-topbar-menus.ant-menu-light .ant-menu-item-active:not(.ant-menu-item-selected):after { border-bottom: 0; } .header-topbar-menus .ant-menu-overflow-item-rest { display: flex; align-items: center; } .layout-header .layout-shrink { width: 50px; box-shadow: none; color: var(--header-color); height: 100%; } .layout-header .layout-shrink:hover { background: var(--header-active-bg-color); } .layout-header { padding: 0; display: flex; align-items: center; transition: width 0.2s; line-height: initial; height: 64px; background: var(--header-bg-color); } .layout-header .header-fill { flex: 1; overflow: hidden; display: flex; height: 64px; align-items: center; background: unset; } .layout-header .header-fill .ant-menu { height: 100%; background: unset; } .layout-header .header-fill .ant-menu .ant-menu-item::after { border: none; } .layout-header .header-fill .ant-menu .ant-menu-item.ant-menu-item-selected { background: var(--header-active-bg-color); } .layout-header .header-fill .ant-menu .ant-menu-item.ant-menu-item-selected::after { border: none; background: var(--header-active-color); } .layout-header .header-fill .ant-menu .ant-menu-item.ant-menu-item-selected span > a { color: var(--header-active-color); } .layout-header .header-fill .ant-menu .ant-menu-item:hover { background: var(--header-bg-color); } .layout-header .header-fill .ant-menu .ant-menu-item.ant-menu-item-active { background: var(--header-active-bg-color); } .layout-header .header-fill .ant-menu .ant-menu-item.ant-menu-item-active span > a { color: var(--header-active-color); } .layout-header .header-fill .ant-menu .ant-menu-item > span > a { color: var(--header-color); } .ant-menu-submenu-popup.ant-menu-dark .ant-menu-sub { background: var(--header-bg-color) !important; } .iframe-layout-container { height: 100vh; flex-direction: row; } .iframe-layout-content { flex: 1; display: flex; height: 100vh; flex-direction: row; overflow: hidden; } .iframe-layout-page-content { overflow: hidden; display: flex; flex-direction: column; } .iframe-tabs { background-color: #fff; } .iframe-tabs .ant-tabs-tab { margin: 0 !important; border: none !important; border-right: 1px solid #f2f4f8 !important; border-bottom: none !important; background-color: #fff !important; border-radius: 0 !important; height: 38px; padding: 0 16px !important; } .iframe-tabs .ant-tabs-tab.ant-tabs-tab-active { background-color: #f2f4f8 !important; border-bottom: none !important; } .iframe-tabs .ant-tabs-tab-btn { margin: 0 auto; } .iframe-tabs .ant-tabs-tab-remove { display: flex; margin-left: 0; padding-right: 0; } .iframe-tabs .tab-icon { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAV5JREFUWEftVTtSwzAQfZuchJqL2KGJDAMFyKkIDZ+GUJGZDNDwafg0QGUbCpjBdkPsg3AALoKXUUhsF8YfKNRYnaTdt2/falcEzYs0x0dLoFWgVaBSAeftfdLtdtaY6UQK47VO23pBvE7g868kcQarK5Myn0oCT2H0wYxlBdIB2ZvC8MoAvTC2wewoGwI+t4S59C8CKhuAXxYgzDy0rd5jEagXREMA99kdbVSpVqmAAnsOYpmA3RzwnhTGXZ6E60f7RLhOz4gGsm/kfIp1qEVAubr+dJuIHrIAPJL93pXae340AuEiF2JHCjOzLalBbQKzQEG8C/BtWg5gPK/1aVYiHNiWeVPnsc5965r+2Hnh9BBMl4VejCNpmcV3v4RppMACww2iYwLSrNU5A2NbmGfN0pl1SvOllYDWEmh9hFrbUOsg0j6KtX9G2r/j5lOimcefBlGzEOXWLYFWgVaBb9EEtCFLbAZ7AAAAAElFTkSuQmCC); background-size: 100% 100%; height: 16px; width: 16px; display: inline-block; border-radius: 100%; } .iframe-tabs .tab-icon:hover { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAASdJREFUWEftljtOBDEQRF8dhZjrIIhYIpaET8ISsRICEj4JCwkQARGchwNwk0KWvFJrNcN4dpCcjKORu11dXW13j6i8VDk+I4FRgVGBTgVsXwBbwKWkr5Jna3sbuAHeJKXzrauEwDewmREmkj7+ArQ9SYGzz4+kjaEEUjafAWQq6bUJ1PYUeA62nS7VOhVIYLZ3gfcAfCTpKZKwfQw8hL09SfFMoxBFBDKJfeAloMwk3WfbDLgNtgNJ0Xf9O7CS5SHwGPbm+fsq7J1IWpRc1uRTrMAS0PYpcNcS4ExSm21YCVaUOAdi1sk8l3RdmvnSr7cCueb1CFQtge16l9B2vWdYtRHlwVKvFduuPozqjuO+jaWv/1qNqG+QQf8D/xmsCWtUYFSgugK/gSWEIdTkUcAAAAAASUVORK5CYII='); background-size: 100% 100%; background-color: #f96868; } .iframe-tabs .ant-tabs-nav { margin: 0 !important; border-bottom: 1px solid #f2f4f8; } .iframe-tabs .ant-tabs-nav::before { border: none !important; } .iframe-tabs .ant-tabs-content { height: 100%; } .iframe-tabs .ant-tabs-extra-content { margin-right: 20px; } .iframe-tabs .menu-tabs-operate { width: 24px; text-align: center; } .menu-tabs-operate-dropdown .ant-dropdown-arrow { left: initial !important; transform: rotate(45deg) !important; right: 29px; } .ant-menu-inline-collapsed-tooltip a { color: rgba(0, 0, 0, 0.85); } .ant-menu-inline-collapsed-tooltip a:hover { color: #1890ff; } .iframe-menu-sidebar .menu-icon { width: 16px; } .iframe-menu-sidebar .menu-name { margin-left: 6px !important; } .iframe-menu-sidebar .menu-icon-img, .iframe-menu-sidebar .menu-icon-img-active { width: 16px; height: 16px; background-size: 100% 100%; vertical-align: -2px; background-repeat: no-repeat; background-position: left center; display: none; } .iframe-menu-sidebar .ant-menu-item .menu-icon-img-active, .iframe-menu-sidebar .ant-menu-submenu-title .menu-icon-img-active { display: none; } .iframe-menu-sidebar .ant-menu-item .menu-icon-img, .iframe-menu-sidebar .ant-menu-submenu-title .menu-icon-img { display: inline-block; } .iframe-menu-sidebar .ant-menu-item-selected .menu-icon-img, .iframe-menu-sidebar .ant-menu-item-active .menu-icon-img, .iframe-menu-sidebar .ant-menu-submenu-active > .ant-menu-submenu-title .menu-icon-img, .iframe-menu-sidebar .ant-menu-submenu-selected > .ant-menu-submenu-title .menu-icon-img { display: none; } .iframe-menu-sidebar .ant-menu-item-selected .menu-icon-img-active, .iframe-menu-sidebar .ant-menu-item-active .menu-icon-img-active, .iframe-menu-sidebar .ant-menu-submenu-active > .ant-menu-submenu-title .menu-icon-img-active, .iframe-menu-sidebar .ant-menu-submenu-selected > .ant-menu-submenu-title .menu-icon-img-active { display: inline-block; } .ant-layout-sider-collapsed .ant-menu-title-content .menu-icon-img-active + span { opacity: 0; } .ant-menu-inline-collapsed-tooltip .ant-tooltip-inner { background-color: #fff; } .ant-menu-inline-collapsed-tooltip .ant-tooltip-arrow-content { background-color: #fff; } .scrollbar .bscroll-vertical-scrollbar { right: 0 !important; width: 5px !important; } .scrollbar .bscroll-indicator { background: rgba(0, 0, 0, 0.15) !important; } .iframe-layout-sidebar { z-index: 10; display: flex; height: 100%; flex-direction: column; flex: 1; background: var(--sidebar-bg-color); } .iframe-layout-sidebar .ant-menu-inline { border-right: none; } .iframe-layout-sidebar .ant-layout-sider-children { display: flex; flex-direction: column; justify-content: space-between; } .iframe-layout-sidebar .ant-menu { background: unset; } .iframe-layout-sidebar .ant-menu-item:active, .iframe-layout-sidebar .ant-menu-submenu-title:active { background: var(--sidebar-menu-active-bg-color); } .iframe-layout-sidebar .ant-menu-submenu { color: var(--sidebar-color); } .iframe-layout-sidebar .ant-menu-submenu .ant-menu-submenu-arrow { color: unset; } .iframe-layout-sidebar .ant-menu-submenu:hover .ant-menu-submenu-arrow { color: unset; } .iframe-layout-sidebar .ant-menu-submenu.ant-menu-submenu-active .ant-menu-submenu-title:hover { color: var(--sidebar-active-color); } .iframe-layout-sidebar .ant-menu-submenu.ant-menu-submenu-active .ant-menu-submenu-title:hover .ant-menu-submenu-arrow { color: unset; } .iframe-layout-sidebar .ant-menu-submenu.ant-menu-submenu-selected { color: var(--sidebar-active-color); } .iframe-layout-sidebar .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-arrow { color: unset; } .iframe-layout-sidebar .ant-menu-item::after { top: 10px; bottom: 10px; width: 3px; border: none; border-radius: 10px; } .iframe-layout-sidebar .ant-menu-item a { color: var(--sidebar-color); } .iframe-layout-sidebar .ant-menu-item.ant-menu-item-selected { background: var(--sidebar-menu-selected-bg-color); } .iframe-layout-sidebar .ant-menu-item.ant-menu-item-selected a { color: var(--sidebar-active-color); } .iframe-layout-sidebar .ant-menu-item.ant-menu-item-selected::after { background: var(--sidebar-active-color); } .iframe-layout-sidebar .ant-menu-item.ant-menu-item-active a { color: var(--sidebar-active-color); } .iframe-layout-sidebar-content { overflow-x: hidden; flex: 1; } .iframe-layout-sidebar-content::-webkit-scrollbar-thumb { background-color: transparent; } .iframe-layout-sidebar-content:hover::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.2); } .iframe-layout-sidebar-content * { user-select: none; } .iframe-menu-sidebar-submenu-popup { background: var(--sidebar-bg-color); } .iframe-menu-sidebar-submenu-popup .ant-menu { background: unset; } .iframe-menu-sidebar-submenu-popup .ant-menu-item a { color: var(--sidebar-color); } .iframe-menu-sidebar-submenu-popup .ant-menu-item:active { background: var(--sidebar-menu-active-bg-color); } .iframe-menu-sidebar-submenu-popup .ant-menu-item.ant-menu-item-active a { color: var(--sidebar-active-color); } .iframe-menu-sidebar-submenu-popup .ant-menu-item.ant-menu-item-selected { background: var(--sidebar-menu-selected-bg-color); } .iframe-menu-sidebar-submenu-popup .ant-menu-item.ant-menu-item-selected a { color: var(--sidebar-active-color); } .menu-sidebar .menu-icon { width: 16px; } .menu-sidebar .menu-name { margin-left: 6px !important; } .menu-sidebar .menu-icon-img, .menu-sidebar .menu-icon-img-active { width: 16px; height: 16px; background-size: 100% 100%; vertical-align: -2px; background-repeat: no-repeat; background-position: left center; display: none; } .menu-sidebar .ant-menu-item .menu-icon-img-active, .menu-sidebar .ant-menu-submenu-title .menu-icon-img-active { display: none; } .menu-sidebar .ant-menu-item .menu-icon-img, .menu-sidebar .ant-menu-submenu-title .menu-icon-img { display: inline-block; } .menu-sidebar .ant-menu-item-selected .menu-icon-img, .menu-sidebar .ant-menu-item-active .menu-icon-img, .menu-sidebar .ant-menu-submenu-active > .ant-menu-submenu-title .menu-icon-img, .menu-sidebar .ant-menu-submenu-selected > .ant-menu-submenu-title .menu-icon-img { display: none; } .menu-sidebar .ant-menu-item-selected .menu-icon-img-active, .menu-sidebar .ant-menu-item-active .menu-icon-img-active, .menu-sidebar .ant-menu-submenu-active > .ant-menu-submenu-title .menu-icon-img-active, .menu-sidebar .ant-menu-submenu-selected > .ant-menu-submenu-title .menu-icon-img-active { display: inline-block; } .ant-layout-sider-collapsed .ant-menu-title-content .menu-icon-img-active + span { opacity: 0; } .scrollbar .bscroll-vertical-scrollbar { right: 0 !important; width: 5px !important; } .layout-sidebar { z-index: 10; display: flex; height: 100%; flex-direction: column; flex: 1; background: var(--sidebar-bg-color); } .layout-sidebar .ant-layout-sider-children { display: flex; flex-direction: column; justify-content: space-between; } .layout-sidebar .ant-menu { background: unset; } .layout-sidebar .ant-menu-item:active, .layout-sidebar .ant-menu-submenu-title:active { background: var(--sidebar-menu-active-bg-color); } .layout-sidebar .ant-menu-submenu { color: var(--sidebar-color); } .layout-sidebar .ant-menu-submenu .ant-menu-submenu-arrow { color: unset; } .layout-sidebar .ant-menu-submenu:hover .ant-menu-submenu-arrow { color: unset; } .layout-sidebar .ant-menu-submenu.ant-menu-submenu-active .ant-menu-submenu-title:hover { color: var(--sidebar-active-color); } .layout-sidebar .ant-menu-submenu.ant-menu-submenu-active .ant-menu-submenu-title:hover .ant-menu-submenu-arrow { color: unset; } .layout-sidebar .ant-menu-submenu.ant-menu-submenu-selected { color: var(--sidebar-active-color); } .layout-sidebar .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-arrow { color: unset; } .layout-sidebar .ant-menu-item a { color: var(--sidebar-color); } .layout-sidebar .ant-menu-item.ant-menu-item-selected { background: var(--sidebar-menu-active-bg-color); } .layout-sidebar .ant-menu-item.ant-menu-item-selected a { color: var(--sidebar-active-color); } .layout-sidebar .ant-menu-item.ant-menu-item-selected::after { top: 10px; left: 0; bottom: 10px; border-right: 2px solid var(--sidebar-active-color); } .layout-sidebar .ant-menu-item.ant-menu-item-active a { color: var(--sidebar-active-color); } .sidebar-menu-container { overflow-x: hidden; flex: 1; } .sidebar-menu-container::-webkit-scrollbar-thumb { background: transparent; } .sidebar-menu-container:hover::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); } .sidebar-menu-container * { user-select: none; } .layout-menu-sidebar-submenu-popup { background: var(--sidebar-bg-color); } .layout-menu-sidebar-submenu-popup .ant-menu { background: unset; } .layout-menu-sidebar-submenu-popup .ant-menu-item a { color: var(--sidebar-color); } .layout-menu-sidebar-submenu-popup .ant-menu-item:active { background: var(--sidebar-menu-active-bg-color); } .layout-menu-sidebar-submenu-popup .ant-menu-item.ant-menu-item-active a { color: var(--sidebar-active-color); } .layout-menu-sidebar-submenu-popup .ant-menu-item.ant-menu-item-selected { background: var(--sidebar-menu-active-bg-color); } .layout-menu-sidebar-submenu-popup .ant-menu-item.ant-menu-item-selected a { color: var(--sidebar-active-color); } .layout-container { height: 100vh; flex-direction: row; } .layout-content { flex: 1; display: flex; flex-direction: row; overflow: hidden; } .layout-page-content { overflow: hidden; display: flex; flex-direction: column; } .layout-container-noheader { padding: 0; } .layout-container-noheader .bread-wrapper { padding: 5px 15px 5px 8px; } .layout-container-noheader .page { padding: 0 8px 8px 8px; } ol { padding: 0; margin: 0; }