npm i antanklayout
main.ts
// script
import { createApp } from 'vue';
import App from './App.vue';
import antanklayout from "antanklayout"
const app = createApp(App);
app.use(antanklayout); //全局注册
app.mount('#app');
Create a Vue page named "layout" and map all dynamic routes to it simultaneously. layout.vue
<template>
<div class="app-container">
<antanklayout>
code here ...
</antanklayout>
</div>
</template>
Each DynameicMenuList ,router mapping
DynameicMenuList.push({
path: "/layout",
name: "layout",
component: Layout,
redirect: item.path,
children:[
item
]
})