fix: 🐛 点击菜单栏显示/隐藏时transition动画失效的问题

This commit is contained in:
hxr 2023-08-28 23:06:39 +08:00
parent 82c51004bd
commit b1cbf2e738
3 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ const appStore = useAppStore();
* 左侧菜单栏显示/隐藏
*/
function toggleSideBar() {
appStore.toggleSidebar(true);
appStore.toggleSidebar();
}
</script>

View File

@ -72,7 +72,7 @@ function handleOutsideClick() {
}
function toggleSideBar() {
appStore.toggleSidebar(true);
appStore.toggleSidebar();
}
</script>

View File

@ -32,9 +32,9 @@ export const useAppStore = defineStore("app", () => {
});
// actions
function toggleSidebar(withoutAnimation: boolean) {
function toggleSidebar() {
sidebar.opened = !sidebar.opened;
sidebar.withoutAnimation = withoutAnimation;
sidebar.withoutAnimation = false;
if (sidebar.opened) {
sidebarStatus.value = "opened";
} else {