No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

document-list.component.scss 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. .document-list-container {
  2. display: flex;
  3. flex-direction: column;
  4. height: 100%;
  5. background: #f8f9fa;
  6. }
  7. .document-list-header {
  8. display: flex;
  9. align-items: center;
  10. gap: 8px;
  11. padding: 12px 16px;
  12. border-bottom: 1px solid #e0e0e0;
  13. background: #ffffff;
  14. flex-shrink: 0;
  15. .header-icon {
  16. color: #1976d2;
  17. }
  18. .header-title {
  19. margin: 0;
  20. font-size: 16px;
  21. font-weight: 500;
  22. color: #333;
  23. }
  24. }
  25. .document-items {
  26. flex: 1;
  27. overflow-y: auto;
  28. padding: 8px;
  29. }
  30. .document-item {
  31. background: #ffffff;
  32. border-radius: 8px;
  33. margin-bottom: 8px;
  34. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  35. transition: all 0.2s ease;
  36. &:hover {
  37. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  38. }
  39. &.has-content {
  40. border-left: 4px solid #1976d2;
  41. }
  42. &.loading {
  43. opacity: 0.8;
  44. }
  45. &.empty {
  46. opacity: 0.6;
  47. border-left: 4px solid #ccc;
  48. }
  49. }
  50. .document-header {
  51. display: flex;
  52. align-items: center;
  53. justify-content: space-between;
  54. padding: 12px 16px;
  55. cursor: pointer;
  56. user-select: none;
  57. min-height: 48px;
  58. &:hover {
  59. background-color: #f5f5f5;
  60. border-radius: 8px 8px 0 0;
  61. }
  62. }
  63. .document-icon-title {
  64. display: flex;
  65. align-items: center;
  66. gap: 8px;
  67. flex: 1;
  68. min-width: 0;
  69. .document-icon {
  70. color: #666;
  71. font-size: 20px;
  72. height: 20px;
  73. width: 20px;
  74. flex-shrink: 0;
  75. }
  76. .document-title {
  77. font-size: 14px;
  78. font-weight: 500;
  79. color: #333;
  80. white-space: nowrap;
  81. overflow: hidden;
  82. text-overflow: ellipsis;
  83. }
  84. .document-loading-spinner {
  85. margin-left: 8px;
  86. }
  87. }
  88. .document-actions {
  89. display: flex;
  90. align-items: center;
  91. gap: 8px;
  92. flex-shrink: 0;
  93. .document-updated {
  94. font-size: 12px;
  95. color: #888;
  96. white-space: nowrap;
  97. }
  98. .expand-icon {
  99. color: #999;
  100. font-size: 20px;
  101. height: 20px;
  102. width: 20px;
  103. transition: transform 0.2s ease;
  104. }
  105. }
  106. .document-content {
  107. padding: 16px;
  108. border-top: 1px solid #f0f0f0;
  109. background: #ffffff;
  110. border-radius: 0 0 8px 8px;
  111. max-height: 400px;
  112. overflow-y: auto;
  113. .document-content-inner {
  114. font-size: 13px;
  115. line-height: 1.6;
  116. color: #444;
  117. // Markdown内容样式
  118. :deep(h1), :deep(h2), :deep(h3) {
  119. margin-top: 0;
  120. margin-bottom: 12px;
  121. font-weight: 600;
  122. }
  123. :deep(h1) { font-size: 16px; }
  124. :deep(h2) { font-size: 15px; }
  125. :deep(h3) { font-size: 14px; }
  126. :deep(p) {
  127. margin: 8px 0;
  128. }
  129. :deep(ul), :deep(ol) {
  130. padding-left: 20px;
  131. margin: 8px 0;
  132. }
  133. :deep(li) {
  134. margin: 4px 0;
  135. }
  136. :deep(code) {
  137. background: #f5f5f5;
  138. padding: 2px 4px;
  139. border-radius: 3px;
  140. font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  141. font-size: 12px;
  142. }
  143. :deep(pre) {
  144. background: #f5f5f5;
  145. padding: 12px;
  146. border-radius: 6px;
  147. overflow-x: auto;
  148. margin: 12px 0;
  149. }
  150. }
  151. }
  152. .document-empty {
  153. display: flex;
  154. flex-direction: column;
  155. align-items: center;
  156. justify-content: center;
  157. padding: 32px 16px;
  158. color: #999;
  159. text-align: center;
  160. mat-icon {
  161. font-size: 32px;
  162. height: 32px;
  163. width: 32px;
  164. margin-bottom: 12px;
  165. color: #ccc;
  166. }
  167. p {
  168. margin: 4px 0;
  169. font-size: 14px;
  170. }
  171. .loading-text {
  172. color: #666;
  173. font-size: 12px;
  174. }
  175. }
  176. .document-preview {
  177. padding: 8px 16px 12px 16px;
  178. border-top: 1px solid #f0f0f0;
  179. background: #fafafa;
  180. border-radius: 0 0 8px 8px;
  181. .preview-text {
  182. font-size: 12px;
  183. color: #666;
  184. line-height: 1.4;
  185. display: -webkit-box;
  186. -webkit-line-clamp: 2;
  187. -webkit-box-orient: vertical;
  188. overflow: hidden;
  189. }
  190. }
  191. .document-status {
  192. .status-text {
  193. font-size: 12px;
  194. color: #999;
  195. font-style: italic;
  196. }
  197. }
  198. // 响应式调整
  199. @media (max-height: 700px) {
  200. .document-content {
  201. max-height: 300px;
  202. }
  203. }
  204. @media (max-height: 600px) {
  205. .document-content {
  206. max-height: 250px;
  207. }
  208. }