table-styles.css 2.22 KB
/* 统一表格样式 - 主题适配 */

/* 表格基础样式 */
:deep(.el-table) {
  background: var(--color-card) !important;
  border: none !important;
}

/* 表头样式 */
:deep(.el-table th) {
  background: var(--color-card) !important;
  color: var(--color-text) !important;
  border: none !important;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 8px;
}

/* 表格行背景色 - 交替色 */
:deep(.el-table td) {
  background: var(--color-card) !important;
  color: var(--color-text) !important;
  border: none !important;
}

/* 智能表格样式 - 根据CSS变量自动适配主题 */
:deep(.el-table .el-table__row:nth-child(even) td) {
  background: var(--table-row-even, #23252e) !important;
}

:deep(.el-table .el-table__row:nth-child(odd) td) {
  background: var(--table-row-odd, #1e1f25) !important;
}

:deep(.el-table .el-table__row:hover > td) {
  background: var(--table-row-hover, #343746) !important;
}

/* 表格内按钮样式 */
:deep(.el-table .el-button) {
  color: #3399ff !important;
  background: transparent !important;
  border: none !important;
  transition: all 0.2s;
  font-size: 14px !important;
  margin: 0 2px;
  border-radius: 4px;
  font-weight: 300 !important;
}

:deep(.el-button--danger) {
  color: #ff4d4f !important;
}

:deep(.el-table .el-button:hover) {
  color: #3399ff !important;
  background: rgba(51, 153, 255, 0.1) !important;
}

:deep(.el-button--danger:hover) {
  color: #ff4d4f !important;
  background: rgba(255, 77, 79, 0.1) !important;
}

/* 表格内标签样式 */
:deep(.el-table .el-tag) {
  background: var(--color-accent, #00d4aa) !important;
  border-color: var(--color-accent, #00d4aa) !important;
  color: #fff !important;
}

/* 表格内图标样式 */
:deep(.el-table i) {
  color: #3399ff !important;
  font-size: 14px !important;
  font-weight: 300 !important;
}

:deep(.el-table .el-button:hover i) {
  color: #3399ff !important;
}

:deep(.el-button--danger i) {
  color: #ff4d4f !important;
}

:deep(.el-button--danger:hover i) {
  color: #ff4d4f !important;
}

/* 操作栏文字颜色 */
:deep(.el-table .cell) {
  color: #3399ff !important;
}

/* 表格边框移除 */
:deep(.el-table::before) {
  display: none !important;
}

:deep(.el-table::after) {
  display: none !important;
}