style.scss 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. .cu-tree-node-container {
  2. position: relative;
  3. width: 100%;
  4. height: 100%;
  5. overflow: auto;
  6. .cu-tree-node-box {
  7. display: table;
  8. text-align: center;
  9. &:before, &:after {
  10. content: '';
  11. display: table;
  12. }
  13. &:after {
  14. clear: both;
  15. }
  16. &.horizontal {
  17. position: absolute;
  18. left: 50%;
  19. top: 50%;
  20. transform: translate(-50%, -50%);
  21. }
  22. .cu-tree-node-view, .cu-tree-node-children {
  23. position: relative;
  24. margin: 0;
  25. padding: 0;
  26. list-style-type: none;
  27. &:before, &:after {
  28. transition: all .35s;
  29. }
  30. }
  31. .cu-tree-node-view {
  32. padding-top: 40px;
  33. display: table-cell;
  34. vertical-align: top;
  35. &.is-leaf, &.collapsed {
  36. padding-left: 10px;
  37. padding-right: 10px;
  38. }
  39. &:before, &:after {
  40. content: '';
  41. position: absolute;
  42. top: 0;
  43. left: 0;
  44. width: 50%;
  45. height: 40px;
  46. }
  47. &:after {
  48. left: 50%;
  49. border-left: 1.5px solid #999999;
  50. }
  51. &:not(:first-child):before,
  52. &:not(:last-child):after {
  53. border-top: 1.5px solid #999999;
  54. }
  55. .cu-tree-node-label {
  56. position: relative;
  57. display: inline-block;
  58. z-index: 20;
  59. .cu-tree-node-label-text {
  60. position: relative;
  61. text-align: center;
  62. .cu-tree-node-label-name {
  63. white-space: nowrap;
  64. &:before {
  65. content: "";
  66. display: block;
  67. background: inherit;
  68. filter: blur(5px);
  69. position: absolute;
  70. width: 100%;
  71. height: 100%;
  72. top: 0;
  73. left: 0;
  74. z-index: -1;
  75. opacity: var(--ui-Shadow-opacity-lg);
  76. transform-origin: 0 0;
  77. border-radius: inherit;
  78. transform: scale(1);
  79. }
  80. .el-button[hc-btn] {
  81. box-shadow: 4px 4px 8px 0 rgb(54 92 167 / 15%);
  82. }
  83. }
  84. }
  85. }
  86. }
  87. .cu-tree-node-label-btn {
  88. position: absolute;
  89. top: 100%;
  90. left: 50%;
  91. width: 20px;
  92. height: 20px;
  93. z-index: 10;
  94. background-color: #ffffff;
  95. border: 1px solid #999999;
  96. border-radius: 50%;
  97. box-shadow: 0 0 2px rgba(0, 0, 0, .15);
  98. cursor: pointer;
  99. transition: all .35s ease;
  100. &:hover {
  101. background-color: #e7e8e9;
  102. transform: scale(1.15);
  103. }
  104. &:before, &:after {
  105. content: '';
  106. position: absolute;
  107. }
  108. &:before {
  109. top: 50%;
  110. left: 4px;
  111. right: 4px;
  112. height: 0;
  113. border-top: 1px solid #999999;
  114. }
  115. &:after {
  116. top: 4px;
  117. left: 50%;
  118. bottom: 4px;
  119. width: 0;
  120. border-left: 1px solid #999999;
  121. }
  122. &.expanded:after {
  123. border: none;
  124. }
  125. }
  126. .cu-tree-node-children {
  127. padding-top: 40px;
  128. display: table;
  129. &:before {
  130. content: '';
  131. position: absolute;
  132. top: 0;
  133. left: 50%;
  134. width: 0;
  135. height: 40px;
  136. border-left: 1.5px solid #999999;
  137. }
  138. &:after {
  139. content: '';
  140. display: table;
  141. clear: both;
  142. }
  143. }
  144. &.horizontal {
  145. .cu-tree-node-view {
  146. display: table-cell;
  147. float: none;
  148. padding-top: 0;
  149. padding-left: 40px;
  150. &.is-leaf {
  151. padding-top: 10px;
  152. padding-bottom: 10px;
  153. }
  154. &:before, &:after {
  155. width: 40px;
  156. height: 50%;
  157. }
  158. &:after {
  159. top: 50%;
  160. left: 0;
  161. border-left: 0;
  162. }
  163. &:only-child:before {
  164. top: 1px;
  165. border-bottom: 1.5px solid #999999;
  166. }
  167. &:not(:first-child):before,
  168. &:not(:last-child):after {
  169. border-top: 0;
  170. border-left: 1.5px solid #999999;
  171. }
  172. &:not(:only-child):after {
  173. border-top: 1.5px solid #999999;
  174. }
  175. }
  176. .cu-tree-node-label {
  177. display: table-cell;
  178. vertical-align: middle;
  179. }
  180. & > .cu-tree-node-view:only-child:before {
  181. border-bottom: 0;
  182. }
  183. .cu-tree-node-children {
  184. display: table-cell;
  185. padding-top: 0;
  186. padding-left: 40px;
  187. &:before {
  188. top: 50%;
  189. left: 0;
  190. width: 40px;
  191. height: 0;
  192. border-left: 0;
  193. border-top: 1.5px solid #999999;
  194. }
  195. &:after {
  196. display: none;
  197. }
  198. & > .cu-tree-node-view {
  199. display: block;
  200. }
  201. }
  202. .cu-tree-node-label-btn {
  203. top: 50%;
  204. left: 100%;
  205. margin-top: -10.1px;
  206. margin-left: 10px;
  207. }
  208. }
  209. }
  210. }