UNPKG

ten-design-vue

Version:

ten-vue

345 lines (344 loc) 9.98 kB
/* dependencies icon */ /** * 文字部分 * size 大小,line 行高, color 颜色 */ /* button */ /* input */ /* transfer */ /* alert */ /* menu */ /* message */ /* modal */ /* badge */ /* tag */ /* progress */ /* popup */ /* tooltip */ /* loading */ /* tabs */ /* check */ /* mention */ /* popup */ /* steps */ /* tabs */ /* modal */ /* form */ /* table */ /* pagination */ /* upload */ /* collapse */ /* anchor */ /* list */ .ten-menu { position: relative; font-size: 14px; background-color: #fff; } .ten-menu-nav { zoom: 1; } .ten-menu-nav:before, .ten-menu-nav:after { content: " "; display: table; } .ten-menu-nav:after { clear: both; visibility: hidden; font-size: 0; height: 0; } .ten-menu-item { position: relative; cursor: pointer; white-space: nowrap; width: 100%; float: left; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .ten-menu-item__content { display: flex; align-items: center; position: relative; transition: background-color 0.2s; padding: 4px 0; } .ten-menu-item__content .ten-menu-item__contentinner { width: 100%; padding: 0 8px; line-height: 40px; height: 40px; color: #666; } .ten-menu-item__content .ten-menu-item__contentinner:hover { color: #0052d9; background: #fff; } .ten-menu-item__content .ten-menu-item__contentinner:hover .ten-menu-item__content-icon { color: #0052d9; } .ten-menu-item__content-icon { font-size: 20px; line-height: 20px; color: rgba(0, 0, 0, 0.32); } .ten-menu-item__content-icon .ten-icon { margin-left: 2px; margin-right: 14px; vertical-align: middle; } .ten-menu-item__content-carret { display: block; position: absolute; right: 0px; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); transition: -webkit-transform 0.2s; transition: transform 0.2s; transition: transform 0.2s, -webkit-transform 0.2s; color: rgba(0, 0, 0, 0.32); } .ten-menu-item__content--expanded .ten-menu-item__content-carret { -webkit-transform: translateY(-50%) rotate(180deg); transform: translateY(-50%) rotate(180deg); } .ten-menu-item__content.ten-menu-item__content--selected .ten-menu-item__contentinner { background: #0052d9; color: #fff; } .ten-menu-item__content.ten-menu-item__content--selected .ten-menu-item__contentinner .ten-menu-item__content-icon { color: #fff; } .ten-menu-item--paddingdeep-1 .ten-menu-item__contentinner { padding-left: 56px; } .ten-menu-item--paddingdeep-2 .ten-menu-item__contentinner { padding-left: 72px; } .ten-menu-item--paddingdeep-3 .ten-menu-item__contentinner { padding-left: 92px; } .ten-menu--vertical { display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; width: 232px; } .ten-menu--vertical--collapsable { padding-bottom: 48px; transition: width 0.2s; } .ten-menu--vertical .ten-menu-header { flex: none; } .ten-menu--vertical .ten-menu-nav { flex: 1; padding: 12px 16px 0; height: 100%; overflow-y: auto; } .ten-menu--vertical .ten-menu-item__content .ten-menu-item__content-content, .ten-menu--vertical .ten-menu-item__content-carret { transition: opacity 0.2s; } .ten-menu--vertical .ten-menu-item__content--childrenselected .ten-menu-item__contentinner { color: #0052d9; background: #fff; } .ten-menu--vertical .ten-menu-item__content--childrenselected .ten-menu-item__contentinner .ten-menu-item__content-icon { color: #0052d9; } .ten-menu--vertical--collapsed { width: 72px !important; overflow: hidden; } .ten-menu--vertical--collapsed .ten-menu-nav { padding: 0; overflow: visible; } .ten-menu--vertical--collapsed .ten-menu-item--deep-0 { z-index: 1; } .ten-menu--vertical--collapsed .ten-menu-item--deep-0.ten-menu-item--hoverexpanded { z-index: 2; box-shadow: 3px 3px 8px 2px rgba(0, 0, 0, 0.06); } .ten-menu--vertical--collapsed .ten-menu-item--deep-0 > .ten-menu-item__content { padding: 4px 16px; z-index: 1; } .ten-menu--vertical--collapsed .ten-menu-item--deep-0 > .ten-menu-item__content--childrenselected .ten-menu-item__contentinner, .ten-menu--vertical--collapsed .ten-menu-item--deep-0 > .ten-menu-item__content--selected .ten-menu-item__contentinner { color: #0052d9; background: #fff; } .ten-menu--vertical--collapsed .ten-menu-item--deep-0 > .ten-menu-item__content--childrenselected .ten-menu-item__contentinner .ten-menu-item__content-icon, .ten-menu--vertical--collapsed .ten-menu-item--deep-0 > .ten-menu-item__content--selected .ten-menu-item__contentinner .ten-menu-item__content-icon { color: #0052d9; } .ten-menu--vertical--collapsed .ten-menu-item--deep-0 > .ten-menu-item__content .ten-menu-item__content-content, .ten-menu--vertical--collapsed .ten-menu-item--deep-0 > .ten-menu-item__content .ten-menu-item__content-carret { opacity: 0; } .ten-menu--vertical--collapsed .ten-menu-item--deep-0 > .ten-menu-item__submenu { position: absolute; z-index: 0; top: 0; left: 72px; width: 256px; padding: 3px 16px; background: #fff; box-shadow: 3px 3px 8px 2px rgba(0, 0, 0, 0.06); } .ten-menu--vertical--collapsed.ten-menu--vertical--collapse-all { width: 0; } .ten-menu--vertical--aftercollapsed { overflow: visible; } .ten-menu--vertical--aftercollapsed .ten-menu-item--deep-0 > .ten-menu-item__content .ten-menu-item__content-content, .ten-menu--vertical--aftercollapsed .ten-menu-item--deep-0 > .ten-menu-item__content .ten-menu-item__content-carret { display: none; } .ten-menu--vertical--aftercollapsed.ten-menu--vertical--collapse-all .ten-menu-header { display: none; } .ten-menu--vertical--aftercollapsed.ten-menu--vertical--collapse-all .ten-menu-item--deep-0 > .ten-menu-item__content, .ten-menu--vertical--aftercollapsed.ten-menu--vertical--collapse-all .ten-menu-item--deep-0 > .ten-menu-item__content { display: none; } .ten-menu--vertical--aftercollapsed.ten-menu--vertical--collapse-all .ten-menu__footer { width: 56px; right: 0; } .ten-menu--vertical--aftercollapsed.ten-menu--vertical--collapse-all .ten-menu__footer .ten-menu__footer-carret { right: 21px; transition: none; } .ten-menu--vertical--collapsing { overflow: hidden; } .ten-menu--vertical--collapsing .ten-menu-nav { overflow: hidden; } .ten-menu__footer { flex: none; position: absolute; z-index: 1; left: 0; bottom: 0; width: 100%; height: 40px; border-top: #F0F0F0 1px dashed; overflow: hidden; cursor: pointer; } .ten-menu__footer-carret { display: block; font-size: 16px; position: absolute; top: 12px; right: 16px; transition: all 0.4s ease-in-out; color: rgba(0, 0, 0, 0.32); } .ten-menu__footer--collapsed { width: 100%; } .ten-menu__footer--collapsed .ten-menu__footer-carret { right: 28px; -webkit-transform: rotateY(180deg); transform: rotateY(180deg); } .ten-menu--horizontal .ten-menu-header { float: left; height: 64px; line-height: 62px; width: auto; } .ten-menu--horizontal .ten-menu-item--deep-0 { float: left; margin: 0; width: auto; } .ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content { padding: 0; } .ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content .ten-menu-item__contentinner { padding: 0 24px; line-height: 64px; height: 64px; border-bottom: 2px solid transparent; } .ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content .ten-menu-item__content-carret { right: 24px; } .ten-menu--horizontal .ten-menu-item--deep-0.ten-menu-item--ismenu > .ten-menu-item__content .ten-menu-item__contentinner { padding-right: 50px; } .ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content--childrenselected .ten-menu-item__contentinner, .ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content--selected > .ten-menu-item__contentinner { color: #0052d9; background: #fff; border-bottom: 2px solid #0052d9; } .ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content--childrenselected .ten-menu-item__contentinner .ten-menu-item__content-icon, .ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content--selected > .ten-menu-item__contentinner .ten-menu-item__content-icon { color: #0052d9; } .ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__submenu { position: absolute; z-index: 0; top: 100%; left: 0; width: 256px; padding: 3px 16px; background: #fff; box-shadow: 3px 3px 8px 2px rgba(0, 0, 0, 0.06); } .ten-menu--theme-ghost.ten-menu { background: none; } .ten-menu--theme-ghost.ten-menu .ten-menu-item--deep-0 > .ten-menu-item__content .ten-menu-item__contentinner { color: rgba(255, 255, 255, 0.6); background: none; } .ten-menu--theme-ghost.ten-menu .ten-menu-item--deep-0 > .ten-menu-item__content .ten-menu-item__contentinner:hover { color: #fff; background: none; } .ten-menu--theme-ghost.ten-menu .ten-menu-item--deep-0 > .ten-menu-item__content--selected .ten-menu-item__contentinner, .ten-menu--theme-ghost.ten-menu .ten-menu-item--deep-0 > .ten-menu-item__content--childrenselected .ten-menu-item__contentinner { background: none; } .ten-menu--theme-ghost.ten-menu .ten-menu-item--deep-0 .ten-menu-item--deep-1 > .ten-menu-item__content--childrenselected .ten-menu-item__contentinner { color: #0052d9; background: none; } .ten-menu--theme-ghost.ten-menu.ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content--childrenselected .ten-menu-item__contentinner, .ten-menu--theme-ghost.ten-menu.ten-menu--horizontal .ten-menu-item--deep-0 > .ten-menu-item__content--selected > .ten-menu-item__contentinner { border-bottom: 2px solid #fff; } /** * 紧凑版变量覆写 * 如发现需要用到的变量没有定义,先在样式文件中抽出来在 vars.less 中添加该变量 * 变量命名方式 组件名-属性-修饰 如 button-fontsize-small */ /* input */ /* check */ /* select */ /* popup */ /* menu */ /* steps */ /* tabs */ /* modal */ /* table */ /* pagination */ /* upload */ /* form */