chore: 同步完整版代码

This commit is contained in:
xiaoxian521
2024-03-23 08:58:13 +08:00
parent dcd687fe86
commit fda66ee37c
8 changed files with 54 additions and 29 deletions

View File

@@ -89,7 +89,8 @@ let isAutoCloseSidebar = true;
useResizeObserver(appWrapperRef, entries => {
if (isMobile) return;
const entry = entries[0];
const [{ inlineSize: width }] = entry.borderBoxSize;
const [{ inlineSize: width, blockSize: height }] = entry.borderBoxSize;
useAppStoreHook().setViewportSize({ width, height });
width <= 760 ? setTheme("vertical") : setTheme(useAppStoreHook().layout);
/** width app-wrapper类容器宽度
* 0 < width <= 760 隐藏侧边栏