docs: add vxe-table doc (#4807)

* docs: init vxe-table demos

* style: fix vxe-table index.scss import error

* docs: fix vxe-table style & theme toggle problem

* docs: add rest demos

* docs: add vxe-table demo desc

* fix: add maximumFileSizeToCacheInBytes to fix build error

* fix: fix vxe-table set-theme build error

* docs: fix vitepress ssr render problem

* docs: add some tips for vitepress compatibility
This commit is contained in:
Arthur Darkstone
2024-11-06 21:44:02 +08:00
committed by GitHub
parent 6b54cb7563
commit 33ce4d3cf3
21 changed files with 1529 additions and 36 deletions

View File

@@ -32,6 +32,21 @@ watch(
() => nextTick(() => initZoom()),
);
function setVxeTheme(name?: string) {
const theme = !name || name === 'default' ? 'light' : name;
if (typeof document !== 'undefined') {
const documentElement = document.documentElement;
if (documentElement) {
documentElement.dataset.vxeUiTheme = theme;
}
}
}
watch(isDark, (dark) => {
setVxeTheme(dark ? 'dark' : 'light');
});
// initPreferences({
// namespace: 'docs',
// });