improve first screen loading speed

This commit is contained in:
pa
2025-09-24 15:43:24 +09:00
committed by Natsumi
parent b618b7dba5
commit 968abf26fa
2 changed files with 17 additions and 13 deletions

View File

@@ -109,18 +109,19 @@
import Sidebar from './views/Sidebar/Sidebar.vue';
import Feed from './views/Feed/Feed.vue';
import GameLog from './views/GameLog/GameLog.vue';
import PlayerList from './views/PlayerList/PlayerList.vue';
import Search from './views/Search/Search.vue';
import Favorites from './views/Favorites/Favorites.vue';
import FriendLog from './views/FriendLog/FriendLog.vue';
import Moderation from './views/Moderation/Moderation.vue';
import Notification from './views/Notifications/Notification.vue';
import FriendList from './views/FriendList/FriendList.vue';
import Charts from './views/Charts/Charts.vue';
import Tools from './views/Tools/Tools.vue';
import Profile from './views/Profile/Profile.vue';
import Settings from './views/Settings/Settings.vue';
const PlayerList = defineAsyncComponent(() => import('./views/PlayerList/PlayerList.vue'));
const Search = defineAsyncComponent(() => import('./views/Search/Search.vue'));
const Favorites = defineAsyncComponent(() => import('./views/Favorites/Favorites.vue'));
const Notification = defineAsyncComponent(() => import('./views/Notifications/Notification.vue'));
const Tools = defineAsyncComponent(() => import('./views/Tools/Tools.vue'));
const Profile = defineAsyncComponent(() => import('./views/Profile/Profile.vue'));
const FriendLog = defineAsyncComponent(() => import('./views/FriendLog/FriendLog.vue'));
const Moderation = defineAsyncComponent(() => import('./views/Moderation/Moderation.vue'));
const FriendList = defineAsyncComponent(() => import('./views/FriendList/FriendList.vue'));
const Charts = defineAsyncComponent(() => import('./views/Charts/Charts.vue'));
import UserDialog from './components/dialogs/UserDialog/UserDialog.vue';
import WorldDialog from './components/dialogs/WorldDialog/WorldDialog.vue';
import AvatarDialog from './components/dialogs/AvatarDialog/AvatarDialog.vue';
@@ -138,8 +139,7 @@
import VRCXUpdateDialog from './components/dialogs/VRCXUpdateDialog.vue';
import VRChatConfigDialog from './views/Settings/dialogs/VRChatConfigDialog.vue';
import PrimaryPasswordDialog from './views/Settings/dialogs/PrimaryPasswordDialog.vue';
import { onMounted, computed, onBeforeMount } from 'vue';
import { defineAsyncComponent, onMounted, computed, onBeforeMount } from 'vue';
import { useI18n } from 'vue-i18n';
import { storeToRefs } from 'pinia';
import { createGlobalStores, useAppearanceSettingsStore } from './stores';

View File

@@ -259,7 +259,7 @@
import { ElMessageBox } from 'element-plus';
import { Loading, Refresh, Close, RefreshLeft } from '@element-plus/icons-vue';
import { storeToRefs } from 'pinia';
import { nextTick, reactive, ref, watch } from 'vue';
import { nextTick, onMounted, reactive, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { friendRequest, userRequest } from '../../api';
import removeConfusables, { removeWhitespace } from '../../service/confusables';
@@ -313,6 +313,10 @@
if (val === 'friendList') nextTick(friendsListSearchChange);
});
onMounted(() => {
friendsListSearchChange();
});
function friendsListSearchChange() {
friendsListLoading.value = true;
let query = '';