The first time I came into contact with Vue, I followed the video to learn, and found that each component appeared twice in the main body, and I couldn’t understand the blogs written by others. I could only watch the video and check slowly, but still found no errors.
But it was found that only the main body was repeated twice, and neither the sidebar nor the navigation bar appeared twice
<template>
<div>
<!-- 头部-->
<Header />
<!-- 主体-->
<div style="display: flex">
<!-- 侧边栏-->
<Aside />
<!-- 内容区域-->
<router-view style="flex: 1"/>
</div>
</div>
<router-view/>这一行删除就好了
</template>
This is related to router-view, I wrote it twice, just delete the latter