index.css 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. /* ==================== Tailwind CSS 配置 ==================== */
  2. @layer tailwind-base, semi, tailwind-components, tailwind-utils;
  3. @layer tailwind-base {
  4. @tailwind base;
  5. }
  6. @layer tailwind-components {
  7. @tailwind components;
  8. }
  9. @layer tailwind-utils {
  10. @tailwind utilities;
  11. }
  12. /* ==================== 全局基础样式 ==================== */
  13. body {
  14. margin: 0;
  15. padding-top: 0;
  16. font-family:
  17. Lato, 'Helvetica Neue', Arial, Helvetica, 'Microsoft YaHei', sans-serif;
  18. -webkit-font-smoothing: antialiased;
  19. -moz-osx-font-smoothing: grayscale;
  20. scrollbar-width: none;
  21. color: var(--semi-color-text-0) !important;
  22. background-color: var(--semi-color-bg-0) !important;
  23. height: 100vh;
  24. }
  25. body::-webkit-scrollbar {
  26. display: none;
  27. }
  28. code {
  29. font-family:
  30. source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
  31. }
  32. #root {
  33. height: 100%;
  34. display: flex;
  35. flex-direction: column;
  36. overflow: hidden;
  37. }
  38. /* ==================== 布局相关样式 ==================== */
  39. .semi-layout-content::-webkit-scrollbar,
  40. .semi-sider::-webkit-scrollbar {
  41. width: 6px;
  42. height: 6px;
  43. }
  44. .semi-layout-content::-webkit-scrollbar-thumb,
  45. .semi-sider::-webkit-scrollbar-thumb {
  46. background: var(--semi-color-tertiary-light-default);
  47. border-radius: 3px;
  48. }
  49. .semi-layout-content::-webkit-scrollbar-thumb:hover,
  50. .semi-sider::-webkit-scrollbar-thumb:hover {
  51. background: var(--semi-color-tertiary);
  52. }
  53. .semi-layout-content::-webkit-scrollbar-track,
  54. .semi-sider::-webkit-scrollbar-track {
  55. background: transparent;
  56. }
  57. /* ==================== 导航和侧边栏样式 ==================== */
  58. /* 导航项样式 */
  59. .semi-navigation-sub-title,
  60. .semi-chat-inputBox-sendButton,
  61. .semi-page-item,
  62. .semi-navigation-item,
  63. .semi-tag-closable,
  64. .semi-datepicker-range-input {
  65. border-radius: 9999px !important;
  66. }
  67. .semi-navigation-item {
  68. margin-bottom: 4px !important;
  69. }
  70. .semi-navigation-item-icon {
  71. justify-items: center;
  72. align-items: center;
  73. }
  74. .semi-navigation-item-icon-info {
  75. margin-right: 0;
  76. }
  77. .semi-navigation-sub-title {
  78. height: 100% !important;
  79. }
  80. .semi-navigation-item-collapsed {
  81. height: 44px !important;
  82. }
  83. #root>section>header>section>div>div>div>div.semi-navigation-header-list-outer>div.semi-navigation-list-wrapper>ul>div>a>li>span {
  84. font-weight: 600 !important;
  85. }
  86. /* 自定义侧边栏样式 */
  87. .sidebar-container {
  88. height: 100%;
  89. display: flex;
  90. flex-direction: column;
  91. transition: width 0.3s ease;
  92. }
  93. .sidebar-nav {
  94. flex: 1;
  95. width: 100%;
  96. background: var(--semi-color-bg-0);
  97. height: 100%;
  98. overflow: hidden;
  99. border-right: none;
  100. overflow-y: auto;
  101. scrollbar-width: none;
  102. -ms-overflow-style: none;
  103. }
  104. .sidebar-nav::-webkit-scrollbar {
  105. display: none;
  106. }
  107. /* 侧边栏导航项样式 */
  108. .sidebar-nav-item {
  109. border-radius: 6px;
  110. margin: 3px 8px;
  111. transition: all 0.15s ease;
  112. padding: 8px 12px;
  113. }
  114. .sidebar-nav-item:hover {
  115. background-color: rgba(var(--semi-blue-0), 0.08);
  116. color: var(--semi-color-primary);
  117. }
  118. .sidebar-nav-item-selected {
  119. background-color: rgba(var(--semi-blue-0), 0.12);
  120. color: var(--semi-color-primary);
  121. font-weight: 500;
  122. }
  123. /* 图标容器样式 */
  124. .sidebar-icon-container {
  125. width: 22px;
  126. height: 22px;
  127. display: flex;
  128. align-items: center;
  129. justify-content: center;
  130. margin-right: 10px;
  131. transition: all 0.2s ease;
  132. }
  133. .sidebar-sub-icon-container {
  134. width: 18px;
  135. height: 18px;
  136. display: flex;
  137. align-items: center;
  138. justify-content: center;
  139. margin-right: 10px;
  140. margin-left: 1px;
  141. transition: all 0.2s ease;
  142. }
  143. /* 分割线样式 */
  144. .sidebar-divider {
  145. margin: 4px 8px;
  146. opacity: 0.15;
  147. }
  148. /* 分组标签样式 */
  149. .sidebar-group-label {
  150. padding: 4px 15px 8px;
  151. color: var(--semi-color-text-2);
  152. font-size: 12px;
  153. text-transform: uppercase;
  154. letter-spacing: 0.5px;
  155. opacity: 0.8;
  156. }
  157. /* 底部折叠按钮 */
  158. .sidebar-collapse-button {
  159. display: flex;
  160. justify-content: center;
  161. align-items: center;
  162. padding: 12px;
  163. cursor: pointer;
  164. background-color: var(--semi-color-bg-0);
  165. position: sticky;
  166. bottom: 0;
  167. z-index: 10;
  168. box-shadow: 0 -10px 10px -5px var(--semi-color-bg-0);
  169. backdrop-filter: blur(4px);
  170. border-top: 1px solid rgba(var(--semi-grey-0), 0.08);
  171. }
  172. .sidebar-collapse-button-inner {
  173. width: 28px;
  174. height: 28px;
  175. border-radius: 9999px;
  176. display: flex;
  177. align-items: center;
  178. justify-content: center;
  179. background-color: var(--semi-color-fill-0);
  180. transition: all 0.2s ease;
  181. }
  182. .sidebar-collapse-icon-container {
  183. display: inline-block;
  184. transition: transform 0.3s ease;
  185. }
  186. /* 侧边栏区域容器 */
  187. .sidebar-section {
  188. padding-top: 12px;
  189. }
  190. /* ==================== 聊天界面样式 ==================== */
  191. .semi-chat {
  192. padding-top: 0 !important;
  193. padding-bottom: 0 !important;
  194. height: 100%;
  195. max-width: 100% !important;
  196. width: 100% !important;
  197. overflow: hidden !important;
  198. }
  199. .semi-chat-chatBox {
  200. max-width: 100% !important;
  201. overflow: hidden !important;
  202. }
  203. .semi-chat-chatBox-wrap {
  204. max-width: 100% !important;
  205. overflow: hidden !important;
  206. }
  207. .semi-chat-chatBox-content {
  208. min-width: auto;
  209. word-break: break-word;
  210. max-width: 100% !important;
  211. overflow-wrap: break-word !important;
  212. }
  213. .semi-chat-content {
  214. max-width: 100% !important;
  215. overflow: hidden !important;
  216. }
  217. .semi-chat-list {
  218. max-width: 100% !important;
  219. overflow-x: hidden !important;
  220. }
  221. .semi-chat-container {
  222. overflow-x: hidden !important;
  223. }
  224. .semi-chat-chatBox-action {
  225. column-gap: 0 !important;
  226. }
  227. .semi-chat-inputBox-clearButton.semi-button .semi-icon {
  228. font-size: 20px !important;
  229. }
  230. /* 隐藏所有聊天相关区域的滚动条 */
  231. .semi-chat::-webkit-scrollbar,
  232. .semi-chat-chatBox::-webkit-scrollbar,
  233. .semi-chat-chatBox-wrap::-webkit-scrollbar,
  234. .semi-chat-chatBox-content::-webkit-scrollbar,
  235. .semi-chat-content::-webkit-scrollbar,
  236. .semi-chat-list::-webkit-scrollbar,
  237. .semi-chat-container::-webkit-scrollbar {
  238. display: none;
  239. }
  240. .semi-chat,
  241. .semi-chat-chatBox,
  242. .semi-chat-chatBox-wrap,
  243. .semi-chat-chatBox-content,
  244. .semi-chat-content,
  245. .semi-chat-list,
  246. .semi-chat-container {
  247. -ms-overflow-style: none;
  248. scrollbar-width: none;
  249. }
  250. /* ==================== 组件特定样式 ==================== */
  251. /* Tabs组件样式 */
  252. .semi-tabs-content {
  253. padding: 0 !important;
  254. height: calc(100% - 40px) !important;
  255. flex: 1 !important;
  256. }
  257. .semi-tabs-content .semi-tabs-pane {
  258. height: 100% !important;
  259. overflow: hidden !important;
  260. }
  261. .semi-tabs-content .semi-tabs-pane>div {
  262. height: 100% !important;
  263. }
  264. /* 表格样式 */
  265. .tableShow {
  266. display: revert;
  267. }
  268. .tableHiddle {
  269. display: none !important;
  270. }
  271. /* 页脚样式 */
  272. .custom-footer {
  273. font-size: 1.1em;
  274. }
  275. /* ==================== 调试面板特定样式 ==================== */
  276. .debug-panel .semi-tabs {
  277. height: 100% !important;
  278. display: flex !important;
  279. flex-direction: column !important;
  280. }
  281. .debug-panel .semi-tabs-bar {
  282. flex-shrink: 0 !important;
  283. }
  284. .debug-panel .semi-tabs-content {
  285. flex: 1 !important;
  286. overflow: hidden !important;
  287. }
  288. /* ==================== 滚动条样式统一管理 ==================== */
  289. /* 表格滚动条样式 */
  290. .semi-table-body::-webkit-scrollbar {
  291. width: 6px;
  292. height: 6px;
  293. }
  294. .semi-table-body::-webkit-scrollbar-thumb {
  295. background: rgba(var(--semi-grey-2), 0.3);
  296. border-radius: 2px;
  297. }
  298. .semi-table-body::-webkit-scrollbar-thumb:hover {
  299. background: rgba(var(--semi-grey-2), 0.5);
  300. }
  301. .semi-table-body::-webkit-scrollbar-track {
  302. background: transparent;
  303. }
  304. /* 侧边抽屉滚动条样式 */
  305. .semi-sidesheet-body::-webkit-scrollbar {
  306. width: 6px;
  307. height: 6px;
  308. }
  309. .semi-sidesheet-body::-webkit-scrollbar-thumb {
  310. background: rgba(var(--semi-grey-2), 0.3);
  311. border-radius: 2px;
  312. }
  313. .semi-sidesheet-body::-webkit-scrollbar-thumb:hover {
  314. background: rgba(var(--semi-grey-2), 0.5);
  315. }
  316. .semi-sidesheet-body::-webkit-scrollbar-track {
  317. background: transparent;
  318. }
  319. /* 隐藏模型设置区域的滚动条 */
  320. .model-settings-scroll::-webkit-scrollbar,
  321. .thinking-content-scroll::-webkit-scrollbar,
  322. .custom-request-textarea .semi-input::-webkit-scrollbar,
  323. .custom-request-textarea textarea::-webkit-scrollbar {
  324. display: none;
  325. }
  326. .model-settings-scroll,
  327. .thinking-content-scroll,
  328. .custom-request-textarea .semi-input,
  329. .custom-request-textarea textarea {
  330. -ms-overflow-style: none;
  331. scrollbar-width: none;
  332. }
  333. /* 图片列表滚动条样式 */
  334. .image-list-scroll::-webkit-scrollbar {
  335. width: 6px;
  336. height: 6px;
  337. }
  338. .image-list-scroll::-webkit-scrollbar-thumb {
  339. background: var(--semi-color-tertiary-light-default);
  340. border-radius: 3px;
  341. }
  342. .image-list-scroll::-webkit-scrollbar-thumb:hover {
  343. background: var(--semi-color-tertiary);
  344. }
  345. .image-list-scroll::-webkit-scrollbar-track {
  346. background: transparent;
  347. }
  348. /* ==================== 响应式/移动端样式 ==================== */
  349. @media only screen and (max-width: 767px) {
  350. #root>section>header>section>div>div>div>div.semi-navigation-footer>div>a>li {
  351. padding: 0 0;
  352. }
  353. #root>section>header>section>div>div>div>div.semi-navigation-header-list-outer>div.semi-navigation-list-wrapper>ul>div>a>li {
  354. padding: 0 5px;
  355. }
  356. #root>section>header>section>div>div>div>div.semi-navigation-footer>div:nth-child(1)>a>li {
  357. padding: 0 5px;
  358. }
  359. .semi-navigation-horizontal .semi-navigation-header {
  360. margin-right: 0;
  361. }
  362. /* 确保移动端内容可滚动 */
  363. .semi-layout-content {
  364. -webkit-overflow-scrolling: touch !important;
  365. overscroll-behavior-y: auto !important;
  366. }
  367. /* 修复移动端下拉刷新 */
  368. body {
  369. overflow: visible !important;
  370. overscroll-behavior-y: auto !important;
  371. position: static !important;
  372. height: 100% !important;
  373. }
  374. /* 确保内容区域在移动端可以正常滚动 */
  375. #root {
  376. overflow: visible !important;
  377. height: 100% !important;
  378. }
  379. /* 移动端表格样式调整 */
  380. .semi-table-tbody,
  381. .semi-table-row,
  382. .semi-table-row-cell {
  383. display: block !important;
  384. width: auto !important;
  385. padding: 2px !important;
  386. }
  387. .semi-table-row-cell {
  388. border-bottom: 0 !important;
  389. }
  390. .semi-table-tbody>.semi-table-row {
  391. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  392. }
  393. }