| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- /* 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);
- }
|