File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
2+ import useSettingsStore from '@/store/modules/settings'
3+
24defineOptions({
35 name: 'PageReload',
46})
57
8+ const settingsStore = useSettingsStore()
69const mainPage = useMainPage()
710
811const isAnimating = ref(false)
@@ -11,12 +14,24 @@ function handleClick() {
1114 isAnimating.value = true
1215 mainPage.reload()
1316}
17+
18+ function handleCtrlClick() {
19+ location.reload()
20+ }
1421</script>
1522
1623<template>
17- <FaButton variant="ghost" size="icon" @click="handleClick" @animationend="isAnimating = false">
18- <FaIcon name="i-iconoir:refresh-double" class="size-4" :class="{ animation: isAnimating }" />
19- </FaButton>
24+ <FaTooltip side="bottom" :disabled="settingsStore.os !== 'mac'">
25+ <template #content>
26+ <div class="flex-col-center gap-2">
27+ <p>按住 <FaKbd>Ctrl</FaKbd> 键并点击</p>
28+ <p>可切换为浏览器原生刷新</p>
29+ </div>
30+ </template>
31+ <FaButton variant="ghost" size="icon" @click.exact="handleClick" @click.ctrl.exact="handleCtrlClick" @animationend="isAnimating = false">
32+ <FaIcon name="i-iconoir:refresh-double" class="size-4" :class="{ animation: isAnimating }" />
33+ </FaButton>
34+ </FaTooltip>
2035</template>
2136
2237<style scoped>
You can’t perform that action at this time.
0 commit comments