feat(pwa): 重构 Service Worker 及版本更新机制

This commit is contained in:
PKC278
2026-01-02 20:36:33 +08:00
parent 2281e4224b
commit 6d2916dc9f
10 changed files with 431 additions and 543 deletions
+6 -1
View File
@@ -12,12 +12,17 @@
interface Props {
message: string
refreshText: string
onRefresh?: () => void
}
const props = defineProps<Props>()
const handleRefresh = () => {
window.location.reload()
if (props.onRefresh) {
props.onRefresh()
} else {
window.location.reload()
}
}
</script>