mirror of
https://github.com/liubinfighter/csv-lite.git
synced 2026-07-22 05:43:52 +00:00
feat: 调整行列号宽度,优化按钮显示逻辑,确保用户交互体验
This commit is contained in:
parent
503547957a
commit
017bef2510
1 changed files with 42 additions and 6 deletions
48
styles.css
48
styles.css
|
|
@ -287,14 +287,29 @@ td input:focus {
|
|||
cursor: default;
|
||||
}
|
||||
|
||||
th.csv-row-number {
|
||||
width: 100px !important;
|
||||
min-width: 100px !important;
|
||||
max-width: 100px !important;
|
||||
}
|
||||
|
||||
td.csv-row-number{
|
||||
width: 100px !important;
|
||||
min-width: 100px !important;
|
||||
max-width: 100px !important;
|
||||
|
||||
}
|
||||
|
||||
.csv-row-number {
|
||||
width: 40px;
|
||||
min-width: 40px;
|
||||
max-width: 40px;
|
||||
width: 100px !important;
|
||||
min-width: 100px !important;
|
||||
max-width: 100px !important;
|
||||
border-right: 2px solid var(--background-modifier-border);
|
||||
position: sticky;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
overflow: visible; /* 确保按钮不会被遮挡 */
|
||||
position: relative; /* 确保定位的按钮能够正确显示 */
|
||||
}
|
||||
|
||||
.csv-col-number {
|
||||
|
|
@ -316,9 +331,9 @@ td input:focus {
|
|||
left: 0;
|
||||
top: 0;
|
||||
z-index: 11;
|
||||
width: 40px;
|
||||
min-width: 40px;
|
||||
max-width: 40px;
|
||||
width: 80px;
|
||||
min-width: 60px;
|
||||
max-width: 100px;
|
||||
height: 25px;
|
||||
min-height: 25px;
|
||||
max-height: 25px;
|
||||
|
|
@ -587,6 +602,27 @@ td input:focus {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
/* 优化按钮显示逻辑,确保互斥 */
|
||||
.csv-row-number:hover .csv-insert-row-btn,
|
||||
.csv-row-number:hover .csv-del-row-btn {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.csv-row-number:not(:hover) .csv-insert-row-btn,
|
||||
.csv-row-number:not(:hover) .csv-del-row-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.csv-col-number:hover .csv-insert-col-btn,
|
||||
.csv-col-number:hover .csv-del-col-btn {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.csv-col-number:not(:hover) .csv-insert-col-btn,
|
||||
.csv-col-number:not(:hover) .csv-del-col-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 确保操作按钮位于最前面 */
|
||||
.button-container {
|
||||
position: relative; /* 确保可以使用 z-index */
|
||||
|
|
|
|||
Loading…
Reference in a new issue