mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
UI Refresh
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<template v-if="watchState.isLoggedIn">
|
||||
<NavMenu></NavMenu>
|
||||
|
||||
<el-splitter @resize-end="setAsideWidth">
|
||||
<el-splitter @resize-end="handleResizeEnd">
|
||||
<el-splitter-panel>
|
||||
<RouterView></RouterView>
|
||||
</el-splitter-panel>
|
||||
@@ -86,6 +85,20 @@
|
||||
const { setAsideWidth } = appearanceStore;
|
||||
const { asideWidth, isSideBarTabShow } = storeToRefs(appearanceStore);
|
||||
|
||||
const handleResizeEnd = (index, sizes) => {
|
||||
if (!Array.isArray(sizes) || sizes.length < 2) {
|
||||
return;
|
||||
}
|
||||
const asideSplitterIndex = sizes.length - 2;
|
||||
if (index !== asideSplitterIndex) {
|
||||
return;
|
||||
}
|
||||
const asideSize = sizes[sizes.length - 1];
|
||||
if (Number.isFinite(asideSize) && asideSize > 0) {
|
||||
setAsideWidth(asideSize);
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => watchState.isLoggedIn,
|
||||
(isLoggedIn) => {
|
||||
|
||||
Reference in New Issue
Block a user