修复bug
This commit is contained in:
@@ -68,7 +68,10 @@
|
||||
<view class="content-scroll">
|
||||
<view class="content-inner" :class="{ 'is-mobile': isMobile }">
|
||||
<slot v-if="hasAccess"></slot>
|
||||
<component :is="currentComponent" v-if="hasAccess && !isPageLoading && currentComponent != null"></component>
|
||||
<!-- currentPage 为空字符串说明是顶层路由容器,才允许渲染动态组件;
|
||||
若 currentPage 非空,说明是子页面自己套了 AdminLayout(作为布局壳使用),
|
||||
此时不再渲染 currentComponent,避免递归挂载导致重复请求。 -->
|
||||
<component :is="currentComponent" v-if="hasAccess && !isPageLoading && currentComponent != null && props.currentPage === ''"></component>
|
||||
<AdminPageLoading v-if="isPageLoading"></AdminPageLoading>
|
||||
</view>
|
||||
<AdminFooter></AdminFooter>
|
||||
|
||||
Reference in New Issue
Block a user