mirror of
https://github.com/imsyy/home.git
synced 2024-11-16 11:42:18 +08:00
21 lines
552 B
JavaScript
21 lines
552 B
JavaScript
import { createApp } from 'vue';
|
|
import '@/style/style.scss';
|
|
import App from '@/App.vue';
|
|
// 引入 pinia
|
|
import { createPinia } from 'pinia';
|
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
|
|
|
const app = createApp(App);
|
|
const pinia = createPinia();
|
|
pinia.use(piniaPluginPersistedstate);
|
|
|
|
app.use(pinia);
|
|
app.mount('#app');
|
|
|
|
// PWA
|
|
navigator.serviceWorker.addEventListener('controllerchange', () => {
|
|
// 弹出更新提醒
|
|
console.log('站点已更新,刷新后生效');
|
|
ElMessage('站点已更新,刷新后生效');
|
|
});
|