Files
bdqr-webview/src/main.js
2026-02-09 15:18:46 +08:00

29 lines
874 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'nprogress/nprogress.css'; // 默认样式,可根据需要自定义样式
import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import 'vant/lib/index.css';
import { useSEO } from './composables/useSEO'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.mount('#app')
// 在应用挂载后初始化SEO功能确保路由已准备好
router.isReady().then(() => {
const { updateSEOByRoute } = useSEO()
})
document.addEventListener('DOMContentLoaded', () => {
const loadingElement = document.getElementById('app-loading');
if (loadingElement) {
loadingElement.style.opacity = '0';
setTimeout(() => {
loadingElement.parentNode.removeChild(loadingElement);
}, 500); // 动画过渡时间
}
});