import { css } from "@linaria/core"; import { Layout, Menu, Spin } from "ant-design-vue"; import { defineComponent, onMounted, reactive } from "vue"; import { useRoute } from "vue-router"; import { InitControllers } from "@/comm/ctx"; import { menuData } from "@/pages/website/routes"; const { Sider, Content } = Layout; export default defineComponent({ setup() { const state = reactive({ loading: true, menuKey: ["/backend/upload"], }); const menuChange = (keyPath: any) => { state.menuKey = keyPath; }; onMounted(() => { const data = useRoute(); state.menuKey = [data.path]; }); return () => { return (
{ menuChange(item.keyPath); }} > {menuData?.children && menuData.children.map((menu: any) => { return ( {menu.meta.title} ); })}
); }; }, }); const HomeStyle = css` width: 100%; min-height: 100vh; .ant-layout-content { flex: 1; overflow: auto; } .layout_background { background-color: #fff; } .layout_menu { margin-top: 64px; } .header_right { text-align: right; } `;