Vue报错
发布于 3 年前 作者 hellojiakewei 4906 次浏览 来自 问答
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

App.vue <template>

<router-view v-slot="{ Component,route }"> <keep-alive> <component class="view" :is="Component" /> </keep-alive> </router-view>
</template> <style lang="scss"> </style>

Home.vue <template>home</template>

<script lang="ts"> export default { name: "Home", }; </script> <style lang="scss" scoped> </style>

警告信息 runtime-core.esm-bundler.js?5c40:38 [Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. at <Home onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > class=“view” > at <KeepAlive> at <RouterView> at <App>

回到顶部