feat(ui): add border and responsive on table

This commit is contained in:
robin
2023-01-10 15:35:21 +08:00
parent 6a3e6da237
commit c08051ec27
2 changed files with 29 additions and 2 deletions
+16
View File
@@ -113,4 +113,20 @@ export function htmlRender(el: HTMLElement | null) {
});
},
);
el.querySelectorAll('table').forEach((table) => {
if (
(table.parentNode as HTMLDivElement)?.classList.contains(
'table-responsive',
)
) {
return;
}
table.classList.add('table', 'table-bordered');
const div = document.createElement('div');
div.className = 'table-responsive';
table.parentNode?.replaceChild(div, table);
div.appendChild(table);
});
}
+13 -2
View File
@@ -239,6 +239,12 @@ a {
margin-bottom: 0;
}
}
table {
td,
th {
word-break: initial;
}
}
}
.upload-img-wrap {
@@ -285,8 +291,13 @@ a {
}
@keyframes bg-fade-out {
0%, 25% {background-color: var(--bs-highlight-bg)}
100% { background-color: transparent }
0%,
25% {
background-color: var(--bs-highlight-bg);
}
100% {
background-color: transparent;
}
}
.bg-fade-out {
animation: 2s ease 1s bg-fade-out;