| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- /* Service Register Config 页面样式 */
- /* 采用与工作示例相同的布局结构 */
-
- /* 组件宿主元素 - 继承父容器高度 */
- :host {
- display: block;
- height: 100%;
- }
-
- /* ==================== 页面容器 ==================== */
- .page-container {
- display: flex;
- flex-direction: column;
- height: 100%;
- background: white;
- min-height: 0; /* 关键:flex容器需要此属性 */
- overflow-y: visible; /* 确保不破坏sticky定位 */
- position: relative; /* 为sticky定位创建定位上下文 */
- }
-
- /* ==================== 工具条内容样式 ==================== */
- .page-toolbar {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- min-height: 48px; /* 与组件最小高度匹配 */
- padding: 0 16px; /* 与组件toolbar-area内边距匹配 */
- }
-
- .toolbar-content {
- display: flex;
- align-items: center;
- }
-
- /* 标题区域 */
- .title-section {
- display: flex;
- align-items: center;
- gap: 8px;
- }
-
- .title-icon {
- color: #3b82f6; /* 蓝色图标 */
- font-size: 1.5rem;
- width: 1.5rem;
- height: 1.5rem;
- }
-
- .page-title {
- margin: 0;
- font-size: 1.25rem; /* text-xl */
- font-weight: 600; /* font-semibold */
- color: #1f2937; /* text-gray-800 */
- }
-
- /* 按钮区域 */
- .button-section {
- display: flex;
- gap: 8px;
- }
-
- /* 按钮基础样式 */
- .btn {
- display: inline-flex;
- align-items: center;
- gap: 4px;
- padding: 0.5rem 1rem; /* px-4 py-2 */
- border: none;
- border-radius: 0.375rem; /* rounded-md */
- font-weight: 500;
- cursor: pointer;
- transition: background-color 0.2s;
- outline: none;
- }
-
- .btn:disabled {
- opacity: 0.5;
- cursor: not-allowed;
- }
-
- /* 主要按钮 */
- .btn-primary {
- background-color: #2563eb; /* bg-blue-600 */
- color: white;
- }
-
- .btn-primary:hover:not(:disabled) {
- background-color: #1d4ed8; /* hover:bg-blue-700 */
- }
-
- .btn-primary:focus {
- box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5); /* focus:ring-2 focus:ring-blue-500 */
- }
-
- /* 次要按钮 */
- .btn-secondary {
- background-color: #e5e7eb; /* bg-gray-200 */
- color: #1f2937; /* text-gray-800 */
- }
-
- .btn-secondary:hover:not(:disabled) {
- background-color: #d1d5db; /* hover:bg-gray-300 */
- }
-
- .btn-secondary:focus {
- box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.5); /* focus:ring-2 focus:ring-gray-500 */
- }
-
- /* 旋转加载指示器 */
- .spinner {
- display: inline-block;
- width: 1rem;
- height: 1rem;
- border: 2px solid currentColor;
- border-radius: 50%;
- border-top-color: transparent;
- animation: spin 1s linear infinite;
- }
-
- @keyframes spin {
- to { transform: rotate(360deg); }
- }
-
- /* ==================== 提示区域样式 ==================== */
- .page-hint .hint-section {
- padding: 1rem; /* p-4 */
- background-color: #eff6ff; /* bg-blue-50 */
- border-bottom: 1px solid #dbeafe; /* border-blue-100 */
- }
-
- .hint-content {
- font-size: 0.875rem; /* text-sm */
- color: #1e40af; /* text-blue-800 */
- }
-
- .hint-content p {
- margin: 0;
- font-weight: 500; /* font-medium */
- }
-
- /* 调试信息区域 */
- .debug-section {
- padding: 0.75rem; /* p-3 */
- background-color: #fffbeb; /* bg-amber-50 */
- border-bottom: 1px solid #fef3c7; /* border-amber-100 */
- display: grid;
- grid-template-columns: 1fr;
- gap: 0.75rem; /* gap-3 */
- }
-
- @media (min-width: 768px) {
- .debug-section {
- grid-template-columns: repeat(3, 1fr); /* md:grid-cols-3 */
- }
- }
-
- .debug-item {
- font-size: 0.875rem; /* text-sm */
- color: #92400e; /* text-amber-800 */
- }
-
- .debug-label {
- font-weight: 500; /* font-medium */
- }
-
- .debug-value {
- margin-left: 0.5rem; /* ml-2 */
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- }
-
- /* ==================== 内容区域 ==================== */
- /* 内部滚动容器,确保 sticky header 能正确检测滚动 */
- /* 采用工作示例的精确配置 */
- .content-area {
- flex: 1 1 0%; /* 工作示例使用的精确值 */
- overflow-y: auto !important; /* 确保优先级 */
- overflow-x: hidden; /* 防止水平滚动 */
- padding: 16px;
- background: white;
- min-height: 0; /* flex容器关键设置,防止内容溢出 */
- -webkit-overflow-scrolling: touch; /* 移动端平滑滚动 */
- position: relative; /* 创建新的堆叠上下文 */
- }
-
- /* Tabulator 表格样式 */
- #tabulator-table {
- border: 1px solid #ddd;
- border-radius: 4px;
- height: 100% !important; /* 确保表格填满内容区域 */
- min-height: 600px; /* 确保有足够内容产生滚动 */
- }
-
- /* 旋转图标 - 用于刷新按钮加载状态 */
- .spin-icon {
- animation: spin 1s linear infinite;
- }
-
- @keyframes spin {
- from { transform: rotate(0deg); }
- to { transform: rotate(360deg); }
- }
|