1、vue2,vue3 如何实现路由缓存
vue2
<keep-alive>
<router-view/>
</keep-alive>
vue3
<router-view v-slot="{ Component }">
<keep-alive>
<component :is="Component" />
</keep-alive>
</router-view>
2、JSON schema for the Typescript无法写入文件 ,因为他会覆盖输入文件
解决方案:tsconfig.json文件中,增加配置如下即可 { "compilerOptions": { "outDir": "./" }, "exclude": ["node_modules", "dist"] }