perf(admin): 实现切页即时导航与列表 loading 壳

非阻塞 session 刷新、侧边栏 chunk 预取、KeepAlive 对齐,以及按 tab 延迟加载重型列表页。
This commit is contained in:
2026-06-18 16:45:01 +08:00
parent ca482b1916
commit 8da730762b
21 changed files with 321 additions and 117 deletions

View File

@@ -1,5 +1,7 @@
<script setup lang="ts">
import { ref, computed, watch } from 'vue';
defineOptions({ name: 'AdminContents' });
import { ref, computed, watch, onActivated } from 'vue';
import { ElMessage, ElMessageBox } from 'element-plus';
import type { TableInstance } from 'element-plus';
import { useAdminLocale } from '../composables/useAdminLocale';
@@ -237,6 +239,11 @@ watch([activeType, filterStatus], () => {
void load();
});
onActivated(() => {
if (activeType.value === 'INBOX_NOTIFY') return;
if (items.value.length > 0) void load();
});
function onSelectionChange(rows: ContentItem[]) {
selectedRows.value = rows;
}