diff --git a/src/components/VideoCard.vue b/src/components/VideoCard/VideoCard.vue similarity index 94% rename from src/components/VideoCard.vue rename to src/components/VideoCard/VideoCard.vue index ac570368..51451f36 100644 --- a/src/components/VideoCard.vue +++ b/src/components/VideoCard/VideoCard.vue @@ -23,6 +23,7 @@ const props = defineProps<{ isFollowed?: boolean horizontal?: boolean tag?: string + rank?: number }>() const videoUrl = computed(() => { @@ -144,6 +145,26 @@ function handelMouseLeave() { @mouseleave="handelMouseLeave" >
+
+
+ {{ rank }} +
+
+ {{ rank }} +
+
- - + +
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+ hello world +
+
+
+
+
+ diff --git a/src/contentScripts/views/Home/Home.vue b/src/contentScripts/views/Home/Home.vue index 43296e6b..72215d88 100644 --- a/src/contentScripts/views/Home/Home.vue +++ b/src/contentScripts/views/Home/Home.vue @@ -102,7 +102,7 @@ onUnmounted(() => { :focused-character="settings.searchPageSearchBarFocusCharacter" />
-
+
  • void + const rankingTypes = computed((): RankingType[] => { return [ { name: 'All', rid: 0 }, @@ -34,10 +36,12 @@ const rankingTypes = computed((): RankingType[] => { ] }) +const isLoading = ref(false) const activatedRankingType = reactive({ ...rankingTypes.value[0] }) const videoList = reactive([]) watch(() => activatedRankingType.name, () => { + handleBackToTop() getRankingVideos() }) @@ -46,6 +50,8 @@ onMounted(() => { }) function getRankingVideos() { + videoList.length = 0 + isLoading.value = true browser.runtime.sendMessage({ contentScriptQuery: 'getRankingVideos', rid: activatedRankingType.rid, @@ -54,13 +60,13 @@ function getRankingVideos() { const { list } = response.data Object.assign(videoList, list) } - }) + }).finally(() => isLoading.value = false) }