style.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. // 导入全局样式变量
  2. @import '@/styles/variables.scss';
  3. // ===== 审计日志详情页面样式 =====
  4. // 使用全局变量,避免硬编码
  5. .questionAnswerInfo {
  6. width: 100%;
  7. height: 100%;
  8. background: $bg-secondary;
  9. border-radius: $border-radius-base;
  10. &-content {
  11. width: 100%;
  12. height: 100%;
  13. background: $bg-secondary;
  14. padding: $spacing-3 $spacing-lg;
  15. &-title {
  16. width: 100%;
  17. max-width: 646px;
  18. height: 48px;
  19. }
  20. }
  21. .ant-input-underlined[disabled],
  22. .ant-select-selector,
  23. .ant-input-number-input,
  24. .ant-input-affix-wrapper > textarea.ant-input {
  25. color: rgba(48, 49, 51, 0.88) !important;
  26. }
  27. .pl-20 {
  28. padding-left: $spacing-lg;
  29. }
  30. .tags-info {
  31. border: 1px solid $border-base;
  32. width: 100%;
  33. max-width: 646px;
  34. min-height: 46px;
  35. border-radius: $radius-md;
  36. display: flex;
  37. align-items: center;
  38. justify-content: space-between;
  39. flex-wrap: wrap;
  40. padding: $spacing-1 $spacing-sm;
  41. .tags-list {
  42. width: 80%;
  43. }
  44. }
  45. }
  46. .modal_top {
  47. display: flex;
  48. gap: $spacing-2;
  49. margin-bottom: $spacing-2;
  50. .ant-input {
  51. width: 200px !important;
  52. }
  53. .ant-input-affix-wrapper {
  54. width: auto !important;
  55. }
  56. }
  57. .ant-btn-outlined {
  58. background: transparent !important;
  59. border: 1px solid $primary-color !important;
  60. color: $primary-color !important;
  61. }
  62. .cup {
  63. cursor: pointer;
  64. margin-right: $spacing-2;
  65. }
  66. // ===== 布局样式 =====
  67. .flex {
  68. &-center {
  69. &-container {
  70. width: 100%;
  71. min-height: 100%;
  72. background: $bg-secondary;
  73. }
  74. display: flex;
  75. justify-content: center;
  76. align-items: center;
  77. &-top {
  78. display: flex;
  79. justify-content: center;
  80. align-items: center;
  81. padding-top: $spacing-xl;
  82. font-size: $font-md;
  83. }
  84. }
  85. &-between {
  86. display: flex;
  87. justify-content: space-between;
  88. align-items: center;
  89. }
  90. &-start {
  91. display: flex;
  92. justify-content: flex-start;
  93. }
  94. &-end {
  95. display: flex;
  96. justify-content: flex-end;
  97. }
  98. }
  99. // ===== 按钮样式 =====
  100. .btn {
  101. &-cancel {
  102. background: $bg-tertiary;
  103. border: none;
  104. color: $text-primary;
  105. transition: $transition-base;
  106. box-shadow: $shadow-sm;
  107. &:hover {
  108. background: #e8e8e8;
  109. color: $text-primary;
  110. box-shadow: $shadow-md;
  111. transform: translateY(-1px);
  112. }
  113. &:active {
  114. background: #dcdcdc;
  115. color: $text-primary;
  116. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  117. transform: translateY(0);
  118. }
  119. &:focus {
  120. box-shadow: $shadow-sm;
  121. }
  122. }
  123. &-back {
  124. background: $bg-secondary;
  125. border: 1px solid #f0f0f0;
  126. color: $text-secondary;
  127. transition: $transition-base;
  128. box-shadow: $shadow-sm;
  129. &:hover {
  130. background: #fafafa;
  131. border-color: $primary-light;
  132. color: $primary-light;
  133. box-shadow: $shadow-md;
  134. transform: translateY(-1px);
  135. }
  136. &:active {
  137. background: #f0f0f0;
  138. border-color: $primary-color;
  139. color: $primary-color;
  140. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  141. transform: translateY(0);
  142. }
  143. &:focus {
  144. border-color: $primary-light;
  145. box-shadow: 0 0 0 2px rgba($primary-color, 0.2);
  146. }
  147. }
  148. }
  149. // ===== 表单样式 =====
  150. .form {
  151. &-control {
  152. &-width {
  153. width: 100%;
  154. max-width: 646px;
  155. }
  156. &-height {
  157. height: 48px;
  158. }
  159. }
  160. &-input {
  161. &-large {
  162. width: 100%;
  163. max-width: 646px;
  164. padding: $spacing-2;
  165. }
  166. &-number-small {
  167. margin: 0 $spacing-md;
  168. width: 100px;
  169. }
  170. }
  171. &-textarea {
  172. &-large {
  173. height: 120px;
  174. resize: none;
  175. width: 100%;
  176. max-width: 646px;
  177. }
  178. }
  179. }
  180. // ===== 文本区域样式 =====
  181. .textarea {
  182. &-full-width {
  183. width: 100%;
  184. }
  185. &-fixed-height {
  186. height: 300px;
  187. }
  188. }
  189. // ===== 预设问题区域样式 =====
  190. .preset-questions {
  191. margin: $spacing-lg 0;
  192. h4 {
  193. margin-bottom: $spacing-md;
  194. color: $text-primary;
  195. }
  196. .question-item {
  197. display: flex;
  198. align-items: center;
  199. margin-bottom: $spacing-sm;
  200. flex-wrap: wrap;
  201. gap: $spacing-sm;
  202. label {
  203. min-width: 60px;
  204. color: $text-secondary;
  205. flex-shrink: 0;
  206. }
  207. .question-input {
  208. flex: 1;
  209. min-width: 200px;
  210. max-width: 400px;
  211. margin: 0;
  212. }
  213. .question-actions {
  214. display: flex;
  215. gap: $spacing-2;
  216. flex-shrink: 0;
  217. .question-icon {
  218. font-size: $icon-lg;
  219. color: $primary-color;
  220. cursor: pointer;
  221. transition: all 0.3s ease;
  222. &:hover {
  223. color: $primary-color;
  224. transform: scale(1.1);
  225. }
  226. }
  227. }
  228. }
  229. }
  230. // ===== 问题输入框样式(保留向后兼容)=====
  231. .question-input {
  232. width: 100%;
  233. max-width: 300px;
  234. padding-top: $spacing-2;
  235. margin-left: $spacing-lg;
  236. }
  237. .link-more-settings {
  238. color: $primary-color;
  239. cursor: pointer;
  240. text-decoration: none;
  241. &:hover {
  242. text-decoration: underline;
  243. }
  244. }
  245. // ===== 标题样式 =====
  246. .section-title {
  247. font-size: $font-md;
  248. font-weight: $font-weight-medium;
  249. color: $text-primary;
  250. margin-bottom: $spacing-sm;
  251. }
  252. // ===== Prompt 编辑器布局样式 =====
  253. .prompt {
  254. width: 100%;
  255. height: 100%;
  256. display: flex;
  257. flex-direction: column;
  258. overflow-y: auto;
  259. &-info {
  260. padding: $spacing-md $spacing-lg $spacing-sm $spacing-lg;
  261. display: flex;
  262. justify-content: space-between;
  263. align-items: flex-start;
  264. &-text {
  265. .variable-highlight {
  266. color: $primary-color;
  267. font-weight: $font-weight-medium;
  268. padding: 2px $spacing-2;
  269. border-radius: $radius-sm;
  270. font-family: $font-family-mono;
  271. margin: 0 $spacing-1;
  272. }
  273. }
  274. }
  275. &-editor-area {
  276. flex: 1;
  277. display: flex;
  278. flex-direction: column;
  279. padding: 0 $spacing-lg;
  280. .ant-form-item {
  281. margin-bottom: 0;
  282. height: 100%;
  283. .ant-form-item-control {
  284. height: 100%;
  285. .ant-form-item-control-input {
  286. height: 100%;
  287. .ant-form-item-control-input-content {
  288. height: 100%;
  289. .ant-input {
  290. height: 100%;
  291. border: 1px solid $border-base;
  292. border-radius: $radius-lg;
  293. padding: $spacing-lg;
  294. font-size: $font-md;
  295. line-height: 1.6;
  296. resize: none;
  297. &:focus {
  298. border-color: $primary-light;
  299. box-shadow: 0 0 0 2px rgba($primary-color, 0.2);
  300. }
  301. &::placeholder {
  302. color: #bfbfbf;
  303. font-style: italic;
  304. }
  305. }
  306. }
  307. }
  308. }
  309. }
  310. }
  311. }
  312. .half-width {
  313. margin: 0 auto;
  314. width: 50%;
  315. height: 100%;
  316. }
  317. // ===== 间距样式 =====
  318. .padding {
  319. &-top {
  320. &-10 {
  321. padding-top: $spacing-2;
  322. }
  323. &-20 {
  324. padding-top: $spacing-lg;
  325. }
  326. }
  327. &-bottom {
  328. &-10 {
  329. padding-bottom: $spacing-2;
  330. }
  331. &-12 {
  332. padding-bottom: $spacing-md;
  333. }
  334. &-16 {
  335. padding-bottom: $spacing-lg;
  336. }
  337. }
  338. }
  339. // ===== 更多设置区域样式 =====
  340. .more-settings-section {
  341. padding-top: $spacing-lg;
  342. .flex-center {
  343. margin-bottom: $spacing-lg;
  344. }
  345. .section-title {
  346. font-size: $font-md;
  347. font-weight: $font-weight-semibold;
  348. color: $text-primary;
  349. text-align: center;
  350. margin: $spacing-lg 0;
  351. }
  352. }
  353. // ===== Splitter 面板背景样式 =====
  354. .ant-splitter-panel {
  355. &:first-child {
  356. background: $bg-secondary;
  357. }
  358. &:nth-child(2) {
  359. background: $bg-tertiary;
  360. }
  361. &:last-child {
  362. background: $bg-secondary;
  363. }
  364. }
  365. // ===== 隐藏滚动条样式 =====
  366. .questionAnswerInfo {
  367. .ant-splitter-panel,
  368. .prompt,
  369. .prompt-editor-area,
  370. .ant-input {
  371. -ms-overflow-style: none;
  372. scrollbar-width: none;
  373. &::-webkit-scrollbar {
  374. display: none;
  375. width: 0;
  376. height: 0;
  377. }
  378. }
  379. }
  380. // ===== 响应式设计 =====
  381. @media (max-width: $screen-md) {
  382. .questionAnswerInfo {
  383. &-content {
  384. &-title {
  385. max-width: 100%;
  386. }
  387. }
  388. }
  389. .form {
  390. &-control-width,
  391. &-input-large,
  392. &-textarea-large {
  393. max-width: 100%;
  394. }
  395. }
  396. .question-input {
  397. max-width: 100%;
  398. margin-left: 0;
  399. }
  400. .half-width {
  401. width: 100%;
  402. }
  403. .preset-questions {
  404. .question-item {
  405. flex-direction: column;
  406. align-items: flex-start;
  407. gap: $spacing-sm;
  408. label {
  409. min-width: auto;
  410. }
  411. .question-input {
  412. width: 100%;
  413. max-width: 100%;
  414. min-width: auto;
  415. }
  416. .question-actions {
  417. align-self: flex-end;
  418. }
  419. }
  420. }
  421. }
  422. @media (max-width: $screen-sm) {
  423. .questionAnswerInfo {
  424. &-content {
  425. padding: $spacing-md;
  426. }
  427. }
  428. .form {
  429. &-input-large,
  430. &-textarea-large {
  431. padding: $spacing-1;
  432. }
  433. }
  434. .preset-questions {
  435. .question-item {
  436. .question-actions {
  437. align-self: center;
  438. width: 100%;
  439. justify-content: center;
  440. }
  441. }
  442. }
  443. }