configCss.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. .container {
  2. max-width: 800px;
  3. margin: 0 auto;
  4. background: white;
  5. border-radius: 4px;
  6. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  7. overflow: hidden;
  8. }
  9. .header {
  10. padding: 15px;
  11. border-bottom: 1px solid #e8e8e8;
  12. background-color: #fafafa;
  13. }
  14. .header h2 {
  15. font-size: 16px;
  16. font-weight: normal;
  17. margin-bottom: 15px;
  18. color: #333;
  19. }
  20. .search-box {
  21. display: flex;
  22. align-items: center;
  23. gap: 10px;
  24. margin-bottom: 10px;
  25. }
  26. .search-input {
  27. flex: 1;
  28. padding: 8px 12px;
  29. border: 1px solid #d9d9d9;
  30. border-radius: 4px;
  31. font-size: 14px;
  32. }
  33. .checkbox-label {
  34. display: flex;
  35. align-items: center;
  36. font-size: 14px;
  37. color: #666;
  38. white-space: nowrap;
  39. }
  40. .checkbox-label input {
  41. margin-right: 5px;
  42. }
  43. .field-list {
  44. height: 400px;
  45. overflow-y: auto;
  46. padding: 10px 0;
  47. }
  48. .tree-node {
  49. padding: 5px 15px;
  50. cursor: pointer;
  51. display: flex;
  52. align-items: center;
  53. transition: background-color 0.2s;
  54. }
  55. .tree-node:hover {
  56. background-color: #f0f7ff;
  57. }
  58. .tree-node.selected {
  59. background-color: #e6f7ff;
  60. }
  61. .tree-node-content {
  62. display: flex;
  63. align-items: center;
  64. flex: 1;
  65. }
  66. .expand-icon {
  67. width: 16px;
  68. height: 16px;
  69. margin-right: 5px;
  70. display: flex;
  71. align-items: center;
  72. justify-content: center;
  73. cursor: pointer;
  74. color: #666;
  75. font-size: 12px;
  76. transition: transform 0.2s ease;
  77. }
  78. .expand-icon.expanded {
  79. transform: rotate(90deg);
  80. }
  81. .node-checkbox {
  82. margin-right: 8px;
  83. }
  84. .node-text {
  85. font-size: 14px;
  86. color: #333;
  87. }
  88. .node-type {
  89. margin-left: 8px;
  90. font-size: 12px;
  91. color: #999;
  92. background: #f0f0f0;
  93. padding: 1px 5px;
  94. border-radius: 3px;
  95. }
  96. .children {
  97. margin-left: 20px;
  98. max-height: 0;
  99. overflow: hidden;
  100. transition: max-height 0.3s ease;
  101. }
  102. .children.expanded {
  103. max-height: 1000px; /* 足够大的值以容纳所有内容 */
  104. }
  105. .footer {
  106. padding: 15px;
  107. border-top: 1px solid #e8e8e8;
  108. display: flex;
  109. justify-content: space-between;
  110. gap: 10px;
  111. background-color: #fafafa;
  112. }
  113. .footer-left {
  114. display: flex;
  115. gap: 10px;
  116. }
  117. .btn {
  118. padding: 6px 16px;
  119. border: 1px solid #d9d9d9;
  120. border-radius: 4px;
  121. background-color: white;
  122. cursor: pointer;
  123. font-size: 14px;
  124. transition: all 0.3s;
  125. }
  126. .btn-primary {
  127. background-color: #1890ff;
  128. color: white;
  129. border-color: #1890ff;
  130. }
  131. .btn-primary:hover {
  132. background-color: #40a9ff;
  133. }
  134. .btn:hover {
  135. border-color: #40a9ff;
  136. }
  137. .empty-state {
  138. text-align: center;
  139. padding: 40px 20px;
  140. color: #999;
  141. }
  142. .info-text {
  143. font-size: 12px;
  144. color: #999;
  145. margin-top: 10px;
  146. padding: 0 15px;
  147. }
  148. /* 添加层级缩进线 */
  149. .tree-node[data-level="1"] {
  150. padding-left: 35px;
  151. position: relative;
  152. }
  153. .tree-node[data-level="1"]::before {
  154. content: "";
  155. position: absolute;
  156. left: 25px;
  157. top: 0;
  158. bottom: 0;
  159. width: 1px;
  160. background-color: #e8e8e8;
  161. }
  162. .tree-node[data-level="2"] {
  163. padding-left: 55px;
  164. position: relative;
  165. }
  166. .tree-node[data-level="2"]::before {
  167. content: "";
  168. position: absolute;
  169. left: 45px;
  170. top: 0;
  171. bottom: 0;
  172. width: 1px;
  173. background-color: #e8e8e8;
  174. }
  175. .tree-node[data-level="3"] {
  176. padding-left: 75px;
  177. position: relative;
  178. }
  179. .tree-node[data-level="3"]::before {
  180. content: "";
  181. position: absolute;
  182. left: 65px;
  183. top: 0;
  184. bottom: 0;
  185. width: 1px;
  186. background-color: #e8e8e8;
  187. }
  188. /* 添加连接线 */
  189. .tree-node:not(:last-child)::after {
  190. content: "";
  191. position: absolute;
  192. left: 15px;
  193. top: 50%;
  194. width: 10px;
  195. height: 1px;
  196. background-color: #e8e8e8;
  197. }
  198. .tree-node[data-level="1"]::after {
  199. left: 35px;
  200. }
  201. .tree-node[data-level="2"]::after {
  202. left: 55px;
  203. }
  204. .tree-node[data-level="3"]::after {
  205. left: 75px;
  206. }
  207. .select-field-input {
  208. padding: 8px 12px;
  209. border: 1px solid #d9d9d9;
  210. border-radius: 4px;
  211. font-size: 14px;
  212. width: 200px;
  213. }
  214. .status-bar {
  215. display: flex;
  216. align-items: center;
  217. font-size: 12px;
  218. color: #666;
  219. }