优化首页返回定位与发布在线时间表单

移动端首页用列表缓存和内部滚动恢复浏览位置;发布页在线时间改为全天+起止时间单行布局。
This commit is contained in:
yml2213
2026-07-12 23:02:01 +08:00
parent 42b250cd2c
commit acd9d9b7f1
11 changed files with 359 additions and 327 deletions
+1 -8
View File
@@ -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>