fix: 🐛 点击菜单栏显示/隐藏时transition动画失效的问题
Former-commit-id: b1cbf2e7385ebf5b56e29c466c7d172364d015ae
This commit is contained in:
@@ -7,7 +7,7 @@ const appStore = useAppStore();
|
|||||||
* 左侧菜单栏显示/隐藏
|
* 左侧菜单栏显示/隐藏
|
||||||
*/
|
*/
|
||||||
function toggleSideBar() {
|
function toggleSideBar() {
|
||||||
appStore.toggleSidebar(true);
|
appStore.toggleSidebar();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ function handleOutsideClick() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toggleSideBar() {
|
function toggleSideBar() {
|
||||||
appStore.toggleSidebar(true);
|
appStore.toggleSidebar();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ export const useAppStore = defineStore("app", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
function toggleSidebar(withoutAnimation: boolean) {
|
function toggleSidebar() {
|
||||||
sidebar.opened = !sidebar.opened;
|
sidebar.opened = !sidebar.opened;
|
||||||
sidebar.withoutAnimation = withoutAnimation;
|
sidebar.withoutAnimation = false;
|
||||||
if (sidebar.opened) {
|
if (sidebar.opened) {
|
||||||
sidebarStatus.value = "opened";
|
sidebarStatus.value = "opened";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user