建网站一般最低多少钱,地方门户模板,wordpress用户前端发文,怎样做网站宣传自己的宾馆1.首先检查页面路由以及页面路径配置是否配置错误。
在router-view 中给路由添加key标识。 #xff01;#xff01;注意#xff1a;有使用layout封装布局的#xff0c;是在layout下的主页面中的 router-view 添加标识#xff0c;不是在src根目录下main.vue中修改#xf…1.首先检查页面路由以及页面路径配置是否配置错误。
在router-view 中给路由添加key标识。 注意有使用layout封装布局的是在layout下的主页面中的 router-view 添加标识不是在src根目录下main.vue中修改在这个文件修改会造成每次切换路由导航标签都会收起
script setup langts
import { useTagsViewStore } from /store/modules/tagsView;import { useRoute} from vue-router;
const tagsViewStore useTagsViewStore();const route useRoute();
const key computed(() {return route.path Math.random();
});
/scripttemplatesection classapp-mainrouter-view v-slot{ Component, route } :keykeytransition namerouter-fade modeout-inkeep-alive :includetagsViewStore.cachedViewscomponent :isComponent :keyroute.fullPath //keep-alive/transition/router-view/section
/template2.如果页面刷新可以出来那证明不是配置的问题其次检查是否在根组件标签最外层包含了个最大的div盒子包裹内容。一般vue3是可以不使用div盒子包裹的 3.最后如果发现上面都没有问题那么问题就在这里了看看是否在template标签下面直接有注释如果有需要把注释写到div里面。这就是导致出现白屏的问题所在人都麻了