diff --git a/src/contentScripts/views/Favorites/Favorites.vue b/src/contentScripts/views/Favorites/Favorites.vue index 695eba09..5474bc19 100644 --- a/src/contentScripts/views/Favorites/Favorites.vue +++ b/src/contentScripts/views/Favorites/Favorites.vue @@ -8,7 +8,7 @@ const { t } = useI18n() const favoriteCategories = reactive>([]) const favoriteResources = reactive>([]) -const activatedMediaId = ref(0) +const activatedCategoryId = ref(0) const activatedFavoriteTitle = ref() const currentPageNum = ref(1) const keyword = ref() @@ -16,7 +16,7 @@ const keyword = ref() const isLoading = ref() const noMoreContent = ref() -watch(activatedMediaId, (newVal: number, oldVal: number) => { +watch(activatedCategoryId, (newVal: number, oldVal: number) => { if (newVal === oldVal) return @@ -29,7 +29,7 @@ watch(activatedMediaId, (newVal: number, oldVal: number) => { onMounted(async () => { await getFavoriteCategories() - activatedMediaId.value = favoriteCategories[0].id + activatedCategoryId.value = favoriteCategories[0].id activatedFavoriteTitle.value = favoriteCategories[0].title // getFavoriteResources() }) @@ -120,7 +120,7 @@ function deleteWatchLaterItem(index: number, aid: number) { } function changeCategory(categoryItem: FavoriteCategory) { - activatedMediaId.value = categoryItem.id + activatedCategoryId.value = categoryItem.id activatedFavoriteTitle.value = categoryItem.title } @@ -134,11 +134,21 @@ function jumpToLoginPage() {