Skip to content

Commit

Permalink
refactor: use UIcon replace span icon
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Aug 12, 2024
1 parent fe785eb commit 4ec09e1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
5 changes: 4 additions & 1 deletion apps/client/components/main/StudyVideoLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
:data-tippy-content="NOTE_TIP"
@mouseenter="$lazyTippy"
>
<span class="i-simple-icons-bilibili h-6 w-6 opacity-85"></span>
<UIcon
name="i-simple-icons-bilibili"
class="h-5 w-5"
/>
</NuxtLink>
</template>

Expand Down
24 changes: 13 additions & 11 deletions apps/client/components/main/Tool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
>
{{ currentCourseInfo }}
</div>
<MainStudyVideoLink
class="icon-item ml-1"
:video="courseStore.currentCourse?.video"
/>
<MainStudyVideoLink :video="courseStore.currentCourse?.video" />
</div>

<!-- 右侧 -->
Expand All @@ -34,21 +31,30 @@
@click="pauseGame"
@mouseenter="$lazyTippy"
>
<span class="clickable-item icon-item i-ph-pause-bold"></span>
<UIcon
name="i-ph-pause"
class="clickable-item h-6 w-6"
/>
</div>
<div
data-tippy-content="重置当前课程进度"
@click="handleDoAgain"
@mouseenter="$lazyTippy"
>
<span class="clickable-item icon-item i-ph-arrow-counter-clockwise"></span>
<UIcon
name="i-ph-arrow-counter-clockwise"
class="clickable-item h-6 w-6"
/>
</div>
<div
data-tippy-content="排行榜"
@click="rankingStore.showRankModal"
@mouseenter="$lazyTippy"
>
<span class="clickable-item icon-item i-ph-ranking"></span>
<UIcon
name="i-ph-ranking"
class="clickable-item h-6 w-6"
/>
</div>
</div>

Expand Down Expand Up @@ -146,8 +152,4 @@ function useDoAgain() {
.clickable-item {
@apply cursor-pointer select-none hover:text-fuchsia-500;
}
.icon-item {
@apply h-6 w-6;
}
</style>
7 changes: 4 additions & 3 deletions apps/client/pages/mastered-elements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
@click="removeItem(item)"
class="cursor-pointer transition-transform duration-300 hover:scale-110"
>
<span
class="clickable-item icon-item i-ph-trash-bold h-5 w-5 text-purple-600 dark:text-purple-300"
></span>
<UIcon
name="i-ph-trash-bold"
class="h-5 w-5"
/>
</div>
</div>
</div>
Expand Down

0 comments on commit 4ec09e1

Please sign in to comment.