Bez popisu
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.

service-register-config.component.scss 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /* Service Register Config 页面样式 */
  2. /* 采用与工作示例相同的布局结构 */
  3. /* 组件宿主元素 - 继承父容器高度 */
  4. :host {
  5. display: block;
  6. height: 100%;
  7. }
  8. /* ==================== 页面容器 ==================== */
  9. .page-container {
  10. display: flex;
  11. flex-direction: column;
  12. height: 100%;
  13. background: white;
  14. min-height: 0; /* 关键:flex容器需要此属性 */
  15. overflow-y: visible; /* 确保不破坏sticky定位 */
  16. position: relative; /* 为sticky定位创建定位上下文 */
  17. }
  18. /* ==================== 工具条内容样式 ==================== */
  19. .page-toolbar {
  20. display: flex;
  21. justify-content: space-between;
  22. align-items: center;
  23. width: 100%;
  24. min-height: 48px; /* 与组件最小高度匹配 */
  25. padding: 0 16px; /* 与组件toolbar-area内边距匹配 */
  26. }
  27. .toolbar-content {
  28. display: flex;
  29. align-items: center;
  30. }
  31. /* 标题区域 */
  32. .title-section {
  33. display: flex;
  34. align-items: center;
  35. gap: 8px;
  36. }
  37. .title-icon {
  38. color: #3b82f6; /* 蓝色图标 */
  39. font-size: 1.5rem;
  40. width: 1.5rem;
  41. height: 1.5rem;
  42. }
  43. .page-title {
  44. margin: 0;
  45. font-size: 1.25rem; /* text-xl */
  46. font-weight: 600; /* font-semibold */
  47. color: #1f2937; /* text-gray-800 */
  48. }
  49. /* 按钮区域 */
  50. .button-section {
  51. display: flex;
  52. gap: 8px;
  53. }
  54. /* 按钮基础样式 */
  55. .btn {
  56. display: inline-flex;
  57. align-items: center;
  58. gap: 4px;
  59. padding: 0.5rem 1rem; /* px-4 py-2 */
  60. border: none;
  61. border-radius: 0.375rem; /* rounded-md */
  62. font-weight: 500;
  63. cursor: pointer;
  64. transition: background-color 0.2s;
  65. outline: none;
  66. }
  67. .btn:disabled {
  68. opacity: 0.5;
  69. cursor: not-allowed;
  70. }
  71. /* 主要按钮 */
  72. .btn-primary {
  73. background-color: #2563eb; /* bg-blue-600 */
  74. color: white;
  75. }
  76. .btn-primary:hover:not(:disabled) {
  77. background-color: #1d4ed8; /* hover:bg-blue-700 */
  78. }
  79. .btn-primary:focus {
  80. box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5); /* focus:ring-2 focus:ring-blue-500 */
  81. }
  82. /* 次要按钮 */
  83. .btn-secondary {
  84. background-color: #e5e7eb; /* bg-gray-200 */
  85. color: #1f2937; /* text-gray-800 */
  86. }
  87. .btn-secondary:hover:not(:disabled) {
  88. background-color: #d1d5db; /* hover:bg-gray-300 */
  89. }
  90. .btn-secondary:focus {
  91. box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.5); /* focus:ring-2 focus:ring-gray-500 */
  92. }
  93. /* 旋转加载指示器 */
  94. .spinner {
  95. display: inline-block;
  96. width: 1rem;
  97. height: 1rem;
  98. border: 2px solid currentColor;
  99. border-radius: 50%;
  100. border-top-color: transparent;
  101. animation: spin 1s linear infinite;
  102. }
  103. @keyframes spin {
  104. to { transform: rotate(360deg); }
  105. }
  106. /* ==================== 提示区域样式 ==================== */
  107. .page-hint .hint-section {
  108. padding: 1rem; /* p-4 */
  109. background-color: #eff6ff; /* bg-blue-50 */
  110. border-bottom: 1px solid #dbeafe; /* border-blue-100 */
  111. }
  112. .hint-content {
  113. font-size: 0.875rem; /* text-sm */
  114. color: #1e40af; /* text-blue-800 */
  115. }
  116. .hint-content p {
  117. margin: 0;
  118. font-weight: 500; /* font-medium */
  119. }
  120. /* 调试信息区域 */
  121. .debug-section {
  122. padding: 0.75rem; /* p-3 */
  123. background-color: #fffbeb; /* bg-amber-50 */
  124. border-bottom: 1px solid #fef3c7; /* border-amber-100 */
  125. display: grid;
  126. grid-template-columns: 1fr;
  127. gap: 0.75rem; /* gap-3 */
  128. }
  129. @media (min-width: 768px) {
  130. .debug-section {
  131. grid-template-columns: repeat(3, 1fr); /* md:grid-cols-3 */
  132. }
  133. }
  134. .debug-item {
  135. font-size: 0.875rem; /* text-sm */
  136. color: #92400e; /* text-amber-800 */
  137. }
  138. .debug-label {
  139. font-weight: 500; /* font-medium */
  140. }
  141. .debug-value {
  142. margin-left: 0.5rem; /* ml-2 */
  143. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  144. }
  145. /* ==================== 内容区域 ==================== */
  146. /* 内部滚动容器,确保 sticky header 能正确检测滚动 */
  147. /* 采用工作示例的精确配置 */
  148. .content-area {
  149. flex: 1 1 0%; /* 工作示例使用的精确值 */
  150. overflow-y: auto !important; /* 确保优先级 */
  151. overflow-x: hidden; /* 防止水平滚动 */
  152. padding: 16px;
  153. background: white;
  154. min-height: 0; /* flex容器关键设置,防止内容溢出 */
  155. -webkit-overflow-scrolling: touch; /* 移动端平滑滚动 */
  156. position: relative; /* 创建新的堆叠上下文 */
  157. }
  158. /* Tabulator 表格样式 */
  159. #tabulator-table {
  160. border: 1px solid #ddd;
  161. border-radius: 4px;
  162. height: 100% !important; /* 确保表格填满内容区域 */
  163. min-height: 600px; /* 确保有足够内容产生滚动 */
  164. }
  165. /* 旋转图标 - 用于刷新按钮加载状态 */
  166. .spin-icon {
  167. animation: spin 1s linear infinite;
  168. }
  169. @keyframes spin {
  170. from { transform: rotate(0deg); }
  171. to { transform: rotate(360deg); }
  172. }