perf(admin): 实现切页即时导航与列表 loading 壳
非阻塞 session 刷新、侧边栏 chunk 预取、KeepAlive 对齐,以及按 tab 延迟加载重型列表页。
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user