在src/views/Main.js中:
<template>
<el-container>
<el-aside width="200px">Aside</el-aside>
<el-container>
<el-header>Header</el-header>
<el-main>
<!-- 路由出口 -->
<!-- 路由匹配的组件渲染在这里 -->
<router-view></router-view>
</el-main>
</el-container>
</el-container>
</template>
<script>
export default {
data() {
return {}
}
}
</script>
运行后效果: