mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-27 05:43:42 +08:00
优化页面显示效果
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<Headbar :changeAssistantVisible="changeAssistantVisible"></Headbar>
|
||||
<Sidebar>
|
||||
</Sidebar>
|
||||
<Headbar :changeAssistantVisible="changeAssistantVisible" :onSidebarToggle="toggleSidebar"></Headbar>
|
||||
<Sidebar ref="sidebarRef" @menu-click="handleMenuClick"></Sidebar>
|
||||
<div class="flex flex-row h-[calc(100vh-3.5rem)] mt-14">
|
||||
<article class="flex-1 sm:ml-44 overflow-y-auto">
|
||||
<RouterView></RouterView>
|
||||
@@ -12,15 +11,28 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { RouterView } from "vue-router";
|
||||
import Assistant from "./Assistant.vue";
|
||||
import Headbar from "./Headbar.vue";
|
||||
import Sidebar from "./Sidebar.vue";
|
||||
import Assistant from "./Assistant.vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
const isAssistantVisible = ref(false);
|
||||
const sidebarRef = ref();
|
||||
|
||||
const changeAssistantVisible = () => {
|
||||
isAssistantVisible.value = !isAssistantVisible.value;
|
||||
};
|
||||
|
||||
const toggleSidebar = () => {
|
||||
if (sidebarRef.value) {
|
||||
sidebarRef.value.toggleSidebar();
|
||||
}
|
||||
};
|
||||
|
||||
const handleMenuClick = () => {
|
||||
if (sidebarRef.value) {
|
||||
sidebarRef.value.closeSidebar();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user