/* Excel风格表格样式 */ .excel-table { border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; font-size: 14px; background-color: white; box-shadow: var(--shadow-sm); margin-bottom: 15px; position: relative; width: 100%; max-height: 400px; display: flex; flex-direction: column; } /* 表头样式 */ .excel-header { display: flex; background-color: #f8f9fa; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 2; } .excel-corner-cell { min-width: 40px; height: 30px; border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); background-color: #f1f3f5; display: flex; align-items: center; justify-content: center; font-weight: bold; user-select: none; } .excel-column-header { min-width: 80px; height: 30px; border-right: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; font-weight: bold; user-select: none; position: relative; } .excel-add-column { min-width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background-color: #e9ecef; cursor: pointer; user-select: none; font-weight: bold; color: var(--primary-color); transition: var(--transition); } .excel-add-column:hover { background-color: #dee2e6; } /* 表格主体样式 */ .excel-body { flex: 1; overflow-y: auto; max-height: 350px; } .excel-row { display: flex; border-bottom: 1px solid var(--border-color); } .excel-row:last-child { border-bottom: none; } .excel-row-header { min-width: 40px; height: 30px; border-right: 1px solid var(--border-color); background-color: #f8f9fa; display: flex; align-items: center; justify-content: center; font-weight: bold; user-select: none; position: sticky; left: 0; z-index: 1; } .excel-cell { min-width: 80px; height: 30px; border-right: 1px solid var(--border-color); padding: 0 5px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; outline: none; transition: var(--transition); } .excel-cell:focus, .excel-cell.active { background-color: #e8f4fc; box-shadow: inset 0 0 0 2px var(--primary-color); } .excel-cell:hover:not(:focus):not(.active) { background-color: #f0f7ff; } /* 表格底部样式 */ .excel-footer { display: flex; border-top: 1px solid var(--border-color); } .excel-add-row { min-width: 40px; height: 30px; display: flex; align-items: center; justify-content: center; background-color: #e9ecef; cursor: pointer; user-select: none; font-weight: bold; color: var(--primary-color); transition: var(--transition); } .excel-add-row:hover { background-color: #dee2e6; } /* 响应式样式 */ @media (max-width: 768px) { .excel-table { font-size: 12px; } .excel-column-header, .excel-cell { min-width: 60px; } .excel-corner-cell, .excel-row-header { min-width: 30px; } } /* CSV粘贴模式样式 */ .input-mode { display: none; } .input-mode.active { display: block; } .input-mode-toggle { display: flex; margin-bottom: 15px; } .input-mode-toggle button { padding: 8px 15px; background-color: #f8f9fa; border: 1px solid var(--border-color); cursor: pointer; transition: var(--transition); } .input-mode-toggle button:first-child { border-radius: 4px 0 0 4px; } .input-mode-toggle button:last-child { border-radius: 0 4px 4px 0; } .input-mode-toggle button.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }