Added minimal CSS styles for TipTap table borders, cells, and headers

to make table structure visible in the editor
This commit is contained in:
jingrow 2025-11-19 22:42:01 +08:00
parent 0344ef0b2e
commit 3ce344f969

View File

@ -975,55 +975,19 @@ watch(() => props.disabled, (disabled) => {
width: auto !important;
}
/* 表格样式 */
.jeditor table {
border-collapse: collapse;
margin: 8px 0;
table-layout: fixed;
width: 100%;
border: 1px solid #e5e6eb;
border-radius: 4px;
overflow: hidden;
}
.jeditor table td,
.jeditor table th {
min-width: 1em;
border: 1px solid #e5e6eb;
padding: 8px 12px;
vertical-align: top;
box-sizing: border-box;
position: relative;
}
.jeditor table th {
font-weight: 600;
text-align: left;
background-color: #f6f8fa;
color: #24292e;
}
.jeditor table td {
background-color: #ffffff;
}
.jeditor table .selectedCell:after {
z-index: 2;
position: absolute;
content: "";
left: 0; right: 0; top: 0; bottom: 0;
background: rgba(31, 199, 111, 0.1);
pointer-events: none;
}
.jeditor table .column-resize-handle {
position: absolute;
right: -2px;
top: 0;
bottom: -2px;
width: 4px;
background-color: #1fc76f;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s;
}
.jeditor table:hover .column-resize-handle {
opacity: 1;
}
</style>