From 10ad269e92da519730fc41ab2ae80d89b0a1f3b6 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Mon, 29 Jul 2024 13:22:22 +0800 Subject: [PATCH] fix: lint --- src/components/Dock/Dock.vue | 9 +++++++-- src/contentScripts/views/App.vue | 2 +- src/contentScripts/views/Favorites/Favorites.vue | 4 ++-- src/contentScripts/views/Home/components/ForYou.vue | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/Dock/Dock.vue b/src/components/Dock/Dock.vue index 935d1b41..69670a01 100644 --- a/src/components/Dock/Dock.vue +++ b/src/components/Dock/Dock.vue @@ -15,8 +15,13 @@ defineProps<{ activatedPage: AppPage }>() -const emit = defineEmits(['changePage', 'settingsVisibilityChange', 'refresh', 'backToTop']) - +// const emit = defineEmits(['changePage', 'settingsVisibilityChange', 'refresh', 'backToTop']) +const emit = defineEmits<{ + (e: 'changePage', page: AppPage): void + (e: 'settingsVisibilityChange'): void + (e: 'refresh'): void + (e: 'backToTop'): void +}>() const mainStore = useMainStore() const { isDark, toggleDark } = useDark() const { reachTop } = useBewlyApp() diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index deea1868..87498f90 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -282,7 +282,7 @@ provide('BEWLY_APP', { v-if="isHomePage() && !settings.useOriginalBilibiliHomepage" pointer-events-auto :activated-page="activatedPage" - @change-page="pageName => changeActivatePage(pageName)" + @change-page="(page: AppPage) => changeActivatePage(page)" @settings-visibility-change="toggleSettings" @refresh="handleThrottledPageRefresh" @back-to-top="handleThrottledBackToTop" diff --git a/src/contentScripts/views/Favorites/Favorites.vue b/src/contentScripts/views/Favorites/Favorites.vue index dbef183e..f60a938d 100644 --- a/src/contentScripts/views/Favorites/Favorites.vue +++ b/src/contentScripts/views/Favorites/Favorites.vue @@ -27,7 +27,7 @@ const keyword = ref('') const { handlePageRefresh, handleReachBottom, haveScrollbar } = useBewlyApp() const isLoading = ref(false) const isFullPageLoading = ref(false) -const noMoreContent = ref() +const noMoreContent = ref(false) onMounted(async () => { await getFavoriteCategories() @@ -195,7 +195,7 @@ function isMusic(item: FavoriteResource) { bg="$bew-elevated-solid" rounded="$bew-radius" shadow="$bew-shadow-2" mt--2 transition="all 300 ease-in-out" :class="{ hide: shouldMoveCtrlBarUp }" > -