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:
@@ -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',
|
||||
// });
|
||||
|
Reference in New Issue
Block a user