feat(ui): add border and responsive on table

This commit is contained in:
robin 2023-01-10 15:35:21 +08:00
parent 0954d09db7
commit 2c23b8396b
2 changed files with 29 additions and 2 deletions

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);
});
}

View File

@ -242,6 +242,12 @@ a {
margin-bottom: 0;
}
}
table {
td,
th {
word-break: initial;
}
}
}
.upload-img-wrap {
@ -288,8 +294,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: bg-fade-out 2s ease 0.3s;