refactor(router): 移除未使用的移动端详情页路由和组件
移除不再使用的detailMobile路由配置和对应的组件文件,同时优化移动端布局显示逻辑
This commit is contained in:
parent
0bb96e7cbb
commit
7e2d54fcce
|
|
@ -1,15 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<el-main class="layout-main" :style="isFixedHeader ? `height: calc(100% - ${setMainHeight})` : `minHeight: calc(100% - ${setMainHeight})`">
|
<el-main class="layout-main"
|
||||||
<el-scrollbar
|
:style="isFixedHeader ? `height: calc(100% - ${setMainHeight})` : `minHeight: calc(100% - ${setMainHeight})`">
|
||||||
ref="layoutMainScrollbarRef"
|
<el-scrollbar ref="layoutMainScrollbarRef" class="layout-main-scroll layout-backtop-header-fixed"
|
||||||
class="layout-main-scroll layout-backtop-header-fixed"
|
wrap-class="layout-main-scroll" view-class="layout-main-scroll">
|
||||||
wrap-class="layout-main-scroll"
|
|
||||||
view-class="layout-main-scroll"
|
|
||||||
>
|
|
||||||
<LayoutParentView />
|
<LayoutParentView />
|
||||||
<LayoutFooter v-if="isFooter" />
|
<LayoutFooter v-if="isFooter" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-backtop :target="setBacktopClass" />
|
<el-backtop :target="setBacktopClass" v-if="!isMobileByWidth()" />
|
||||||
</el-main>
|
</el-main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -20,6 +17,7 @@ import { storeToRefs } from 'pinia';
|
||||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||||
import { NextLoading } from '/@/utils/loading';
|
import { NextLoading } from '/@/utils/loading';
|
||||||
|
import { isMobileByWidth } from '/@/utils/Utils'
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const LayoutParentView = defineAsyncComponent(() => import('/@/layout/routerView/parent.vue'));
|
const LayoutParentView = defineAsyncComponent(() => import('/@/layout/routerView/parent.vue'));
|
||||||
|
|
|
||||||
|
|
@ -121,20 +121,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
||||||
roles: ['admin'],
|
roles: ['admin'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/detailMobile',
|
|
||||||
name: 'detailMobile',
|
|
||||||
component: () => import('/@/views/pages/richedit/detailMobile.vue'),
|
|
||||||
meta: {
|
|
||||||
title: '详情',
|
|
||||||
isLink: '',
|
|
||||||
isHide: true,
|
|
||||||
isKeepAlive: true,
|
|
||||||
isAffix: true,
|
|
||||||
isIframe: false,
|
|
||||||
roles: ['admin'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/richeditMobile',
|
path: '/richeditMobile',
|
||||||
name: 'richeditMobile',
|
name: 'richeditMobile',
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
<template>
|
|
||||||
<keep-alive>
|
|
||||||
<DetailDrawer v-model="drawer" :data="newsData" :readOnly="readOnly" :type="newstype"
|
|
||||||
@handleEditStatus="handleEditStatus" @doNewsPublishFn="doNewsPublishFn" @doDeleteNewsFn="doDeleteNewsFn"
|
|
||||||
@getData="getData" />
|
|
||||||
</keep-alive>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts" name="loginIndex">
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { NextLoading } from '/@/utils/loading';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const router = useRouter();
|
|
||||||
const drawer = ref(false);
|
|
||||||
const newsData = ref<any>();
|
|
||||||
const readOnly = ref(false);
|
|
||||||
const newstype = ref(0);
|
|
||||||
|
|
||||||
// 页面加载时
|
|
||||||
onMounted(() => {
|
|
||||||
NextLoading.done();
|
|
||||||
console.log("🚀 ~ route:", route.query)
|
|
||||||
|
|
||||||
drawer.value = true;
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.index {
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in New Issue