fix: remove pwa to fix cdn conflict

This commit is contained in:
YunYouJun
2022-06-27 08:49:55 +08:00
parent 7b94e19b20
commit fe47e4d2e7
8 changed files with 50 additions and 1866 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { installPrompt } from './utils/pwa'
// import { installPrompt } from './utils/pwa'
import { isDark } from '~/composables'
// https://github.com/vueuse/head
// you can use this to manipulate the document head in any components,
@@ -18,7 +18,7 @@ useHead({
],
})
installPrompt()
// installPrompt()
</script>
<template>

View File

@@ -1,12 +1,13 @@
import { type UserModule } from '~/types'
// https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const install: UserModule = ({ isClient, router }) => {
if (!isClient)
return
// if (!isClient)
// return
router.isReady().then(async () => {
const { registerSW } = await import('virtual:pwa-register')
registerSW({ immediate: true })
})
// router.isReady().then(async () => {
// const { registerSW } = await import('virtual:pwa-register')
// registerSW({ immediate: true })
// })
}

View File

@@ -19,9 +19,9 @@ title: 帮助
## **友情提示**
- 点击首页最上方的大锅图标,可清空所选食材和工具。
- 本项目支持 PWA使用浏览器打开时可将其添加到主屏幕以获得近原生 APP 的体验。
<!-- - 本项目支持 PWA使用浏览器打开时可将其添加到主屏幕以获得近原生 APP 的体验。 -->
<InstallPwa />
<!-- <InstallPwa /> -->
## FAQ