desktop page supports service worker

This commit is contained in:
MaysWind
2023-07-09 13:20:24 +08:00
parent b555af0df7
commit 475ec24528
2 changed files with 16 additions and 1 deletions
+9
View File
@@ -7,6 +7,7 @@
<script>
import { useTheme } from 'vuetify';
import { register } from 'register-service-worker';
import { mapStores } from 'pinia';
import { useSettingsStore } from '@/stores/setting.js';
@@ -69,6 +70,14 @@ export default {
}
}
}
if (isProduction()) {
register('./sw.js', {
registrationOptions: {
scope: './'
}
});
}
},
mounted() {
document.addEventListener('DOMContentLoaded', () => {