index.less 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. @import (reference) '../../design/index.less';
  2. .default-layout {
  3. .ant-menu-submenu .ant-menu-sub {
  4. transition: none !important;
  5. // transition: background 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s,
  6. // padding 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s !important;
  7. }
  8. &__content {
  9. position: relative;
  10. &.fixed {
  11. overflow: hidden;
  12. }
  13. }
  14. &__loading {
  15. position: absolute;
  16. z-index: @page-loading-z-index;
  17. }
  18. &__main {
  19. position: relative;
  20. height: 100%;
  21. // overflow: hidden;
  22. // overflow: auto;
  23. &.fixed {
  24. overflow: auto;
  25. }
  26. &.fixed.lock {
  27. overflow: hidden;
  28. }
  29. }
  30. .layout-content {
  31. position: relative;
  32. // height: 100%;
  33. &.fixed {
  34. width: 1200px;
  35. margin: 0 auto;
  36. }
  37. }
  38. .layout-menu {
  39. &__logo {
  40. height: @header-height;
  41. padding: 10px;
  42. img {
  43. width: @logo-width;
  44. height: @logo-width;
  45. }
  46. &.light {
  47. .logo-title {
  48. color: @text-color-base;
  49. }
  50. }
  51. &.dark {
  52. .logo-title {
  53. color: @white;
  54. }
  55. }
  56. }
  57. }
  58. .layout-sidebar {
  59. background-size: 100% 100%;
  60. .ant-layout-sider-zero-width-trigger {
  61. top: 40%;
  62. z-index: 10;
  63. }
  64. &__dargbar {
  65. position: absolute;
  66. top: 0;
  67. right: -2px;
  68. z-index: @sider-drag-z-index;
  69. width: 2px;
  70. height: 100%;
  71. cursor: col-resize;
  72. border-top: none;
  73. border-bottom: none;
  74. &.hide {
  75. display: none;
  76. }
  77. &:hover {
  78. background: @primary-color;
  79. box-shadow: 0 0 4px 0 rgba(28, 36, 56, 0.15);
  80. }
  81. }
  82. }
  83. .setting-button {
  84. top: 45%;
  85. right: 0;
  86. border-radius: 10px 0 0 10px;
  87. .svg {
  88. width: 2em;
  89. }
  90. }
  91. &__tabs {
  92. z-index: 10;
  93. height: @multiple-height;
  94. padding: 0;
  95. line-height: @multiple-height;
  96. background: @border-color-shallow-light;
  97. box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
  98. }
  99. }
  100. .setting-drawer {
  101. .ant-drawer-body {
  102. padding-top: 0;
  103. background: @white;
  104. }
  105. &__footer {
  106. display: flex;
  107. flex-direction: column;
  108. align-items: center;
  109. }
  110. &__cell-item {
  111. display: flex;
  112. justify-content: space-between;
  113. margin: 16px 0;
  114. }
  115. &__theme-item {
  116. display: flex;
  117. flex-wrap: wrap;
  118. margin: 16px 0;
  119. span {
  120. display: inline-block;
  121. width: 20px;
  122. height: 20px;
  123. margin-top: 10px;
  124. margin-right: 10px;
  125. cursor: pointer;
  126. border-radius: 4px;
  127. svg {
  128. display: none;
  129. }
  130. &.active {
  131. svg {
  132. display: inline-block;
  133. margin-left: 4px;
  134. font-size: 0.8em;
  135. fill: @white;
  136. }
  137. }
  138. }
  139. }
  140. &__siderbar {
  141. display: flex;
  142. > div {
  143. position: relative;
  144. .check-icon {
  145. position: absolute;
  146. top: 40%;
  147. left: 40%;
  148. display: none;
  149. color: @primary-color;
  150. &.active {
  151. display: inline-block;
  152. }
  153. }
  154. }
  155. img {
  156. margin-right: 10px;
  157. cursor: pointer;
  158. }
  159. }
  160. }
  161. .layout-header {
  162. display: flex;
  163. height: @header-height;
  164. padding: 0 20px 0 0;
  165. color: @white;
  166. background: @white;
  167. align-items: center;
  168. justify-content: space-between;
  169. &__content {
  170. flex-grow: 1;
  171. display: flex;
  172. justify-content: center;
  173. align-items: center;
  174. }
  175. &__header--light {
  176. background: @white;
  177. border-bottom: 1px solid @header-light-bottom-border-color;
  178. .layout-header__menu {
  179. height: calc(@header-height - 1px);
  180. .ant-menu-submenu {
  181. height: @header-height;
  182. line-height: @header-height;
  183. }
  184. }
  185. .layout-header__logo {
  186. height: @header-height;
  187. color: @text-color-base;
  188. img {
  189. width: @logo-width;
  190. height: @logo-width;
  191. margin-right: 6px;
  192. }
  193. &:hover {
  194. background: @header-light-bg-hover-color;
  195. }
  196. }
  197. .layout-header__action {
  198. &-item {
  199. &:hover {
  200. background: @header-light-bg-hover-color;
  201. }
  202. }
  203. &-icon {
  204. color: @text-color-base;
  205. }
  206. }
  207. .layout-header__user-dropdown {
  208. &:hover {
  209. background: @header-light-bg-hover-color;
  210. }
  211. }
  212. .user-dropdown {
  213. &__name {
  214. color: @text-color-base;
  215. }
  216. &__desc {
  217. color: @header-light-desc-color;
  218. }
  219. }
  220. }
  221. &__header--dark {
  222. background: @header-dark-bg-color;
  223. .layout-header__action {
  224. &-item {
  225. &:hover {
  226. background: @header-dark-bg-hover-color;
  227. }
  228. }
  229. }
  230. .layout-header__logo {
  231. height: @header-height;
  232. img {
  233. width: @logo-width;
  234. height: @logo-width;
  235. margin-right: 10px;
  236. }
  237. &:hover {
  238. background: @header-dark-bg-hover-color;
  239. }
  240. }
  241. .layout-header__user-dropdown {
  242. &:hover {
  243. background: @header-dark-bg-hover-color;
  244. }
  245. }
  246. .breadcrumb {
  247. &__item:last-child .breadcrumb__inner,
  248. &__item:last-child &__inner a,
  249. &__item:last-child &__inner a:hover,
  250. &__item:last-child &__inner:hover {
  251. font-weight: 400;
  252. color: rgba(255, 255, 255, 0.6);
  253. cursor: text;
  254. }
  255. &__inner,
  256. &__separator {
  257. color: @white;
  258. }
  259. }
  260. }
  261. &-lm {
  262. display: flex;
  263. }
  264. &__logo {
  265. padding: 0 10px;
  266. }
  267. &__bread {
  268. flex: 1;
  269. display: none;
  270. }
  271. &__action {
  272. display: flex;
  273. align-items: center;
  274. &-item {
  275. display: flex;
  276. align-items: center;
  277. height: @header-height;
  278. font-size: 1.3em;
  279. cursor: pointer;
  280. }
  281. &-icon {
  282. padding: 0 12px;
  283. }
  284. }
  285. &__menu {
  286. display: flex;
  287. margin-left: 20px;
  288. overflow: hidden;
  289. align-items: center;
  290. flex-grow: 1;
  291. }
  292. &__user-dropdown {
  293. height: 52px;
  294. padding: 0 0 0 10px;
  295. }
  296. }
  297. .user-dropdown {
  298. display: flex;
  299. height: 100%;
  300. cursor: pointer;
  301. align-items: center;
  302. img {
  303. width: 32px;
  304. height: 32px;
  305. margin-right: 24px;
  306. }
  307. &__header {
  308. border-radius: 50%;
  309. }
  310. &__divider {
  311. width: 1px;
  312. height: 30px;
  313. margin-right: 20px;
  314. background: #c6d9ee;
  315. }
  316. &__exit {
  317. margin-top: -40px;
  318. font-size: 12px;
  319. color: #c6d9ee;
  320. text-align: center;
  321. > section {
  322. height: 20px;
  323. }
  324. }
  325. &__info {
  326. display: flex;
  327. margin-right: 12px;
  328. flex-direction: column;
  329. > section {
  330. line-height: 1.8;
  331. }
  332. }
  333. &__name {
  334. font-size: 14px;
  335. }
  336. &__desc {
  337. font-size: 12px;
  338. .text-truncate();
  339. }
  340. }
  341. .layout-breadcrumb {
  342. padding: 0 16px;
  343. flex-grow: 1;
  344. }