vue el-backtop 回归不到顶部
回归不到顶部
原因是在引入页面的外层使用了布局
原代码:
<template>
<div class="project_style">
<el-container>
<el-header>
<headIIndex></headIIndex>
</el-header>
<el-main>
<MiddlerIndex></MiddlerIndex>
</el-main>
<el-footer>
<footerIndex></footerIndex>
</el-footer>
</el-container>
</div>
</template>
<script>
import headIIndex from "@/views/product/head/index.vue"
import MiddlerIndex from "@/views/product/middle/index.vue"
import footerIndex from "@/views/product/footer/index.vue"
解决方法:把外层的布局直接去掉
新代码:
<template>
<div class="project_style">
<headIIndex></headIIndex>
<MiddlerIndex></MiddlerIndex>
<footerIndex></footerIndex>
</div>
</template>
<script>
import headIIndex from "@/views/product/head/index.vue"
import MiddlerIndex from "@/views/product/middle/index.vue"
import footerIndex from "@/views/product/footer/index.vue"
原文地址:https://blog.csdn.net/CMDN123456/article/details/140616738
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!