goldenwater.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. /**
  2. * 通用css样式布局处理
  3. * Copyright (c) 2019 goldenwater
  4. */
  5. /** 基础通用 **/
  6. .pt5 {
  7. padding-top: 5px;
  8. }
  9. .pr5 {
  10. padding-right: 5px;
  11. }
  12. .pb5 {
  13. padding-bottom: 5px;
  14. }
  15. .mt5 {
  16. margin-top: 5px;
  17. }
  18. .mr5 {
  19. margin-right: 5px;
  20. }
  21. .mb5 {
  22. margin-bottom: 5px;
  23. }
  24. .mb8 {
  25. margin-bottom: 8px;
  26. }
  27. .ml5 {
  28. margin-left: 5px;
  29. }
  30. .mt10 {
  31. margin-top: 10px;
  32. }
  33. .mr10 {
  34. margin-right: 10px;
  35. }
  36. .mb10 {
  37. margin-bottom: 10px;
  38. }
  39. .ml10 {
  40. margin-left: 10px;
  41. }
  42. .mt20 {
  43. margin-top: 20px;
  44. }
  45. .mr20 {
  46. margin-right: 20px;
  47. }
  48. .mb20 {
  49. margin-bottom: 20px;
  50. }
  51. .ml20 {
  52. margin-left: 20px;
  53. }
  54. .h1,
  55. .h2,
  56. .h3,
  57. .h4,
  58. .h5,
  59. .h6,
  60. h1,
  61. h2,
  62. h3,
  63. h4,
  64. h5,
  65. h6 {
  66. font-family: inherit;
  67. font-weight: 500;
  68. line-height: 1.1;
  69. color: inherit;
  70. }
  71. .el-form--inline {
  72. .el-form-item {
  73. .el-input,
  74. .el-cascader,
  75. .el-select,
  76. .el-autocomplete {
  77. width: 200px;
  78. }
  79. }
  80. }
  81. .el-form .el-form-item__label {
  82. font-weight: 700;
  83. }
  84. .el-dialog:not(.is-fullscreen) {
  85. margin-top: 6vh !important;
  86. }
  87. .el-dialog.scrollbar .el-dialog__body {
  88. overflow: auto;
  89. overflow-x: hidden;
  90. max-height: 70vh;
  91. padding: 10px 20px 0;
  92. }
  93. .el-table {
  94. .el-table__header-wrapper,
  95. .el-table__fixed-header-wrapper {
  96. th {
  97. word-break: break-word;
  98. background-color: #f8f8f9 !important;
  99. color: #515a6e;
  100. height: 40px !important;
  101. font-size: 13px;
  102. }
  103. }
  104. .el-table__body-wrapper {
  105. .el-button [class*="el-icon-"]+span {
  106. margin-left: 1px;
  107. }
  108. }
  109. }
  110. /** 表单布局 **/
  111. .form-header {
  112. font-size: 15px;
  113. color: #6379bb;
  114. border-bottom: 1px solid #ddd;
  115. margin: 8px 10px 25px 10px;
  116. padding-bottom: 5px
  117. }
  118. /** 表格布局 **/
  119. .pagination-container {
  120. display: flex;
  121. justify-content: flex-end;
  122. margin-top: 16px;
  123. flex-shrink: 0;
  124. background-color: transparent !important;
  125. }
  126. /* 嵌套布局的容器(tabs/col 内部),与 .app-container 保持一致的分页间距 */
  127. .table-page-wrap {
  128. overflow: hidden;
  129. padding-bottom: 16px;
  130. }
  131. /* 紧凑搜索表单 —— 让条件+搜索按钮尽量在同一行 */
  132. .app-container .el-form--inline {
  133. display: flex;
  134. flex-wrap: wrap;
  135. align-items: center;
  136. gap: 0 16px;
  137. .el-form-item {
  138. margin-bottom: 10px;
  139. margin-right: 0;
  140. }
  141. .el-form-item__label {
  142. padding-right: 4px;
  143. white-space: nowrap;
  144. }
  145. /* 搜索/重置按钮组不换行 */
  146. .el-form-item:last-child {
  147. flex-shrink: 0;
  148. }
  149. }
  150. /* 弹窗中的分页器 */
  151. .el-dialog .pagination-container {
  152. position: static !important;
  153. margin: 10px 0 0 0;
  154. padding: 0 !important;
  155. .el-pagination {
  156. position: static;
  157. }
  158. }
  159. /* 移动端适配 */
  160. @media (max-width: 768px) {
  161. .pagination-container {
  162. .el-pagination {
  163. >.el-pagination__jump {
  164. display: none !important;
  165. }
  166. >.el-pagination__sizes {
  167. display: none !important;
  168. }
  169. }
  170. }
  171. }
  172. /* tree border */
  173. .tree-border {
  174. margin-top: 5px;
  175. border: 1px solid var(--el-border-color-light, #e5e6e7);
  176. background: var(--el-bg-color, #FFFFFF) none;
  177. border-radius: 4px;
  178. width: 100%;
  179. }
  180. .el-table .fixed-width .el-button--small {
  181. padding-left: 0;
  182. padding-right: 0;
  183. width: inherit;
  184. }
  185. /* horizontal el menu */
  186. .el-menu--horizontal .el-menu-item .svg-icon+span,
  187. .el-menu--horizontal .el-sub-menu__title .svg-icon+span {
  188. margin-left: 3px;
  189. }
  190. .el-menu--horizontal .el-menu--popup {
  191. min-width: 120px !important;
  192. }
  193. /** 表格更多操作下拉样式 */
  194. .el-table .el-dropdown-link {
  195. cursor: pointer;
  196. color: #409EFF;
  197. margin-left: 10px;
  198. }
  199. .el-table .el-dropdown,
  200. .el-icon-arrow-down {
  201. font-size: 12px;
  202. }
  203. .el-tree-node__content>.el-checkbox {
  204. margin-right: 8px;
  205. }
  206. .list-group-striped>.list-group-item {
  207. border-left: 0;
  208. border-right: 0;
  209. border-radius: 0;
  210. padding-left: 0;
  211. padding-right: 0;
  212. }
  213. .list-group {
  214. padding-left: 0px;
  215. list-style: none;
  216. }
  217. .list-group-item {
  218. border-bottom: 1px solid #e7eaec;
  219. border-top: 1px solid #e7eaec;
  220. margin-bottom: -1px;
  221. padding: 11px 0px;
  222. font-size: 13px;
  223. }
  224. .pull-right {
  225. float: right !important;
  226. }
  227. .el-card__header {
  228. padding: 14px 15px 7px !important;
  229. min-height: 40px;
  230. }
  231. .el-card__body {
  232. padding: 15px 20px 20px 20px !important;
  233. }
  234. .card-box {
  235. margin-bottom: 10px;
  236. }
  237. /* button color */
  238. .el-button--cyan.is-active,
  239. .el-button--cyan:active {
  240. background: #20B2AA;
  241. border-color: #20B2AA;
  242. color: #FFFFFF;
  243. }
  244. .el-button--cyan:focus,
  245. .el-button--cyan:hover {
  246. background: #48D1CC;
  247. border-color: #48D1CC;
  248. color: #FFFFFF;
  249. }
  250. .el-button--cyan {
  251. background-color: #20B2AA;
  252. border-color: #20B2AA;
  253. color: #FFFFFF;
  254. }
  255. /** 详细卡片样式 */
  256. .detail-wrap {
  257. padding: 0 4px;
  258. }
  259. .detail-card {
  260. border: 1px solid #ebeef5;
  261. border-radius: 6px;
  262. margin-bottom: 14px;
  263. overflow: hidden;
  264. }
  265. .detail-card-title {
  266. background: #f7f9fb;
  267. padding: 8px 16px;
  268. font-size: 13px;
  269. font-weight: 600;
  270. color: #333;
  271. border-bottom: 1px solid #ebeef5;
  272. }
  273. .detail-card-title i {
  274. margin-right: 5px;
  275. color: #409EFF;
  276. }
  277. .detail-row {
  278. padding: 0 8px;
  279. }
  280. .detail-item {
  281. display: flex;
  282. align-items: flex-start;
  283. padding: 10px 8px;
  284. font-size: 13px;
  285. border-bottom: 1px solid #f5f7fa;
  286. }
  287. .detail-item:last-child {
  288. border-bottom: none;
  289. }
  290. .detail-label {
  291. flex-shrink: 0;
  292. width: 72px;
  293. color: #909399;
  294. margin-right: 12px;
  295. }
  296. .detail-value {
  297. color: #303133;
  298. flex: 1;
  299. word-break: break-all;
  300. }
  301. .detail-location {
  302. color: #999;
  303. font-size: 12px;
  304. }
  305. .method-tag {
  306. display: inline-block;
  307. padding: 1px 7px;
  308. border-radius: 3px;
  309. font-size: 11px;
  310. font-weight: 700;
  311. margin-right: 6px;
  312. vertical-align: middle;
  313. }
  314. .mono {
  315. font-family: Consolas, 'SFMono-Regular', monospace;
  316. font-size: 12px;
  317. }
  318. .code-body {
  319. padding: 14px;
  320. }
  321. .code-wrap {
  322. background: #f7f9fb;
  323. border: 1px solid #e8ecf0;
  324. border-radius: 4px;
  325. overflow: hidden;
  326. max-height: 260px;
  327. position: relative;
  328. }
  329. .code-action {
  330. position: absolute;
  331. top: 8px;
  332. right: 8px;
  333. z-index: 10;
  334. margin: 0;
  335. padding: 0;
  336. }
  337. .code-action .el-button {
  338. height: 24px;
  339. font-size: 12px;
  340. padding: 4px 8px;
  341. background: rgba(255, 255, 255, 0.9);
  342. border: 1px solid #dcdcdc;
  343. }
  344. .code-action .el-button:hover {
  345. background: #ffffff;
  346. border-color: #409EFF;
  347. }
  348. .code-pre {
  349. margin: 0;
  350. padding: 12px 14px;
  351. font-size: 12px;
  352. line-height: 1.6;
  353. font-family: Consolas, 'SFMono-Regular', monospace;
  354. color: #444;
  355. white-space: pre-wrap;
  356. word-break: break-all;
  357. overflow: auto;
  358. max-height: 240px;
  359. display: block;
  360. }
  361. /* tree-sidebar content */
  362. .tree-sidebar-manage-wrap {
  363. display: flex;
  364. gap: 0;
  365. min-height: calc(100vh - 130px);
  366. padding: 0 !important;
  367. overflow: hidden;
  368. }
  369. .tree-sidebar-content {
  370. flex: 1;
  371. min-width: 0;
  372. overflow: hidden;
  373. background: #fff;
  374. .content-inner {
  375. padding: 12px 16px;
  376. height: 100%;
  377. overflow-y: auto;
  378. }
  379. }
  380. /* error */
  381. .error-title {
  382. color: #c0392b !important;
  383. }
  384. .error-title i {
  385. color: #c0392b !important;
  386. }
  387. .error-body {
  388. padding: 12px 16px;
  389. }
  390. .error-msg {
  391. background: #fff8f8;
  392. border-left: 3px solid #e74c3c;
  393. border-radius: 3px;
  394. padding: 8px 12px;
  395. color: #c0392b;
  396. font-size: 12px;
  397. line-height: 1.7;
  398. word-break: break-all;
  399. white-space: pre-wrap;
  400. }
  401. /* http method */
  402. .method-GET {
  403. background: #e8f5e9;
  404. color: #27ae60;
  405. }
  406. .method-POST {
  407. background: #e3f2fd;
  408. color: #1565c0;
  409. }
  410. .method-PUT {
  411. background: #fff3e0;
  412. color: #e65100;
  413. }
  414. .method-DELETE {
  415. background: #ffebee;
  416. color: #c62828;
  417. }
  418. /* text color */
  419. .text-navy {
  420. color: #1ab394;
  421. }
  422. .text-primary {
  423. color: inherit;
  424. }
  425. .text-success {
  426. color: #1c84c6;
  427. }
  428. .text-info {
  429. color: #23c6c8;
  430. }
  431. .text-warning {
  432. color: #f8ac59;
  433. }
  434. .text-danger {
  435. color: #ed5565;
  436. }
  437. .text-muted {
  438. color: #888888;
  439. }
  440. /* image */
  441. .img-circle {
  442. border-radius: 50%;
  443. }
  444. .img-lg {
  445. width: 120px;
  446. height: 120px;
  447. }
  448. .avatar-upload-preview {
  449. position: absolute;
  450. top: 50%;
  451. transform: translate(50%, -50%);
  452. width: 200px;
  453. height: 200px;
  454. border-radius: 50%;
  455. box-shadow: 0 0 4px #ccc;
  456. overflow: hidden;
  457. }
  458. /* 拖拽列样式 */
  459. .sortable-ghost {
  460. opacity: .8;
  461. color: #fff !important;
  462. background: #42b983 !important;
  463. }
  464. /* 表格右侧工具栏样式 */
  465. .top-right-btn {
  466. margin-left: auto;
  467. }
  468. /* ============================================================
  469. Shared Page Styles — card header / search bar / table / pagination
  470. 所有页面统一引用此文件,无需在各自 <style scoped> 中重复定义
  471. 参考: CLAUDE.md §8 Frontend Page Templates
  472. ============================================================ */
  473. /* 页面容器(独立页面,无侧边栏) */
  474. .system-page {
  475. padding: 0px;
  476. background-color: #f5f7fa;
  477. min-height: calc(100vh - 10px);
  478. .el-input__wrapper {
  479. border-radius: 4px;
  480. }
  481. .el-textarea__inner {
  482. border-radius: 4px;
  483. }
  484. }
  485. /* 卡片容器 */
  486. .page-card {
  487. height: 100%;
  488. border-radius: 1px;
  489. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  490. .el-card__header {
  491. padding: 8px 20px !important;
  492. border-bottom: 1px solid #ebeef5;
  493. background-color: #fff;
  494. border-radius: 8px 8px 0 0;
  495. }
  496. .el-card__body {
  497. height: 100%;
  498. padding: 0px !important;
  499. background-color: #fff;
  500. }
  501. }
  502. /* 卡片页眉 */
  503. .card-header {
  504. display: flex;
  505. justify-content: space-between;
  506. align-items: center;
  507. .header-left {
  508. display: flex;
  509. align-items: center;
  510. gap: 10px;
  511. .page-title {
  512. font-size: 18px;
  513. font-weight: 600;
  514. color: #303133;
  515. }
  516. }
  517. .search-right {
  518. display: flex;
  519. gap: 10px;
  520. }
  521. }
  522. /* 搜索栏 */
  523. .search-bar {
  524. margin-bottom: 0px;
  525. background-color: #f8faff;
  526. padding: 6px 10px;
  527. border-radius: 6px;
  528. border: 0px solid #e6ebf5;
  529. display: flex;
  530. justify-content: space-between;
  531. align-items: center;
  532. .el-form {
  533. display: flex;
  534. flex-wrap: wrap;
  535. gap: 10px;
  536. .el-form-item {
  537. margin-bottom: 0;
  538. margin-right: 15px;
  539. .el-form-item__label {
  540. font-weight: 500;
  541. }
  542. }
  543. }
  544. }
  545. /* 分页 */
  546. .pagination {
  547. margin-top: 8px;
  548. margin-bottom: 8px;
  549. display: flex;
  550. justify-content: flex-end;
  551. }
  552. /* 表格公共样式 */
  553. .el-table {
  554. border-radius: 4px;
  555. overflow: auto;
  556. th.el-table__cell {
  557. background-color: #f5f7fa !important;
  558. color: #606266;
  559. font-weight: 600;
  560. }
  561. .el-button--primary.is-link {
  562. color: #409eff;
  563. }
  564. .el-button--danger.is-link {
  565. color: #f56c6c;
  566. }
  567. }