优化首页返回定位与发布在线时间表单
移动端首页用列表缓存和内部滚动恢复浏览位置;发布页在线时间改为全天+起止时间单行布局。
This commit is contained in:
@@ -8,9 +8,6 @@ import InAppBrowserPrompt from './components/InAppBrowserPrompt.vue'
|
||||
import AdminLayout from './layouts/AdminLayout.vue'
|
||||
import AppLayout from './layouts/AppLayout.vue'
|
||||
|
||||
/** 移动端从详情返回时保留列表状态与滚动位置 */
|
||||
const mobileKeepAliveIncludes = ['MobileHomeView']
|
||||
|
||||
const route = useRoute()
|
||||
const layout = computed(() => {
|
||||
if (route.path === '/m' || route.path.startsWith('/m/')) {
|
||||
@@ -26,11 +23,7 @@ const layout = computed(() => {
|
||||
<AdminLayout v-if="layout === 'admin'">
|
||||
<RouterView />
|
||||
</AdminLayout>
|
||||
<RouterView v-else-if="layout === 'blank'" v-slot="{ Component }">
|
||||
<KeepAlive :include="mobileKeepAliveIncludes" :max="5">
|
||||
<component :is="Component" />
|
||||
</KeepAlive>
|
||||
</RouterView>
|
||||
<RouterView v-else-if="layout === 'blank'" />
|
||||
<AppLayout v-else>
|
||||
<RouterView />
|
||||
</AppLayout>
|
||||
|
||||
Reference in New Issue
Block a user