UNPKG

fork-reap-design

Version:

A high quality UI components Library with Vue.js

267 lines (257 loc) 6.38 kB
// 覆盖 el-tree样式 start TODO 本文件颜色变量? .el-tree-node__content { height: 40px; line-height: 40px; border-bottom: 1px dashed transparent; position: relative; font-size: 14px; .custom-tree-person + .person { background: #fff; } .custom-tree-right { position: absolute; right: 0; top: 0; // background-color: #f0faff; // background-color: #F1F1F1; } } .aui-tree-nodata { font-weight: 500; color: rgba(0,0,0,.65); } .aui-tree-node-hover { position: relative; // background-color: #f0faff; // color: @primary-color; transition: color .2s ease-in-out; // color: @tree-color; // background-color: rgba(0, 110, 255, 0.12); background-color: #F1F1F1; } // 这个颜色还是很单调,建议修改为绿色,对比度高些 .el-tree-node__expand-icon { // 左侧三角 &::before { font-size: 10px; font-family: element-icons !important; speak: none; font-style: normal; font-weight: 400; font-variant: normal; text-transform: none; line-height: 1; vertical-align: middle; display: inline-block; -webkit-font-smoothing: antialiased; color: #333; content: "\E791"; } // 右侧文件夹Icon &::after { font-size: 16px; color: @primary-color; display: inline-block; font-family: Ionicons!important; speak: none; font-style: normal; font-weight: 400; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; vertical-align: middle; content: "\F1D3"; padding: 6px; border-radius: 6px; background-color: #DBE7FB; } &.expanded { transform: none; &::before { transition: transform .3s ease-in-out,-webkit-transform .3s ease-in-out; transform: rotate(90deg); content: "\e791"; } &::after { content: "\F1D1"; } } // 默认空文件夹 &.is-leaf { &::before { content: "\e791"; color: transparent; } &::after { content: "\F1D3"; color: @primary-color; padding: 6px; border-radius: 6px; background-color: #DBE7FB; } } } // 选中状态下的空文件夹 .is-current { .el-tree-node__expand-icon { &.is-leaf { &::before { content: "\e791"; color: transparent; } &::after { content: "\F1D0"; } } } // 激活态 & > .el-tree-node__content { &:extend(.aui-tree-node-hover); color: @tree-color; background-color: rgba(0, 110, 255, 0.12); font-family: MicrosoftYaHei-Bold; font-weight: 700; & > .person { background-color: #f0faff; } } .is-focusable { .el-tree-node__content { // background-color: #fff; color: inherit; &:hover { &:extend(.aui-tree-node-hover); .custom-tree-person + .person { background-color: #f0faff; } } } } } .el-tree-node__content:hover { &:extend(.aui-tree-node-hover); .custom-tree-person + .person { background-color: #f0faff; } } .el-tree-node:focus > .el-tree-node__content { background-color: #edf7ff; } .el-tree-node.is-drop-inner > .el-tree-node__content { // 默认 .el-tree-node__label, // 自定义 .custom-tree-node .custom-tree-left span { color: #fff; background-color: @primary-color; } } // 覆盖 el-tree样式 end .aui-tree-search { display: flex; align-items: center; border-bottom: 1px solid #eee; padding: 13px 10px; } .aui-tree-more-ops-dropdown { .ivu-dropdown-item { padding: 0; & > div { padding: 7px 16px; } } } .aui-tree-iconset { .ivu-poptip-popper { min-width: 100px; } .aui-tree-more-opts-icon { font-size: 24px; cursor: pointer; } } .aui-tree-bd { padding-left: 3px; min-height: 400px; max-height: calc(~'100vh - 220px'); overflow-x: hidden; overflow-y: auto; &::-webkit-scrollbar-thumb { background: #c2c2c2; border-radius: 10px; } &::-webkit-scrollbar { width: 3px; height: 17px; background: 0 0; border-radius: 9px; } //& > .el-tree > .el-tree-node > .el-tree-node__content .el-tree-node__expand-icon::before { // content: ''; // height: 28px; // width: 28px; // background-color: rgba(0, 110, 255, 0.12); // background-image: url('//v.campus.qq.com/reap/static/img/tree-first-icon.png'); // background-repeat: no-repeat; // background-size: 15.5px 12.5px; // background-position: center; // transform: rotate(0deg) !important; //} } .aui-tree-sort { transform: rotate(90deg); font-size: 20px; cursor: pointer; margin-left: 5px; } .custom-icon { cursor: pointer; font-size: 20px; } .custom-tree-node { display: flex; flex: 1; align-items: center; justify-content: start; .aui-tree-opts-icon { font-size: 24px; display: none; cursor: pointer; } &:hover .aui-tree-opts-icon { display: inline-block; } } .custom-tree-left { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .aui-tree-icon-sorting { color: @primary-color; } .aui-tree-sorting { .el-tree-node__content { position: relative; border-bottom: 1px dashed #dcdee2; cursor: move; } .custom-tree-node { // 编辑时,隐藏操作栏 .aui-tree-opts-icon { display: none; } } } // .not-right-icon { // .el-tree-node__expand-icon::after { // // display: none; // } // } // 子节点都不显示图标 .el-tree-node__children .el-tree-node__expand-icon::after { content: none; }