Files
autoAiWorkSys/app/main.js
张成 e17d5610f5 1
2025-12-22 16:26:59 +08:00

46 lines
1.0 KiB
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.
// Vue 应用入口文件
import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
// 引入全局样式
import './css/index.less';
// 引入 PrimeVue
import PrimeVue from 'primevue/config';
import Aura from '@primevue/themes/aura';
import 'primeicons/primeicons.css';
// 创建并挂载 Vue 应用
const app = createApp(App);
// 配置 PrimeVue使用 Aura 主题,扁平化设计)
app.use(PrimeVue, {
theme: {
preset: Aura,
options: {
darkModeSelector: false, // 暂时不使用深色模式
cssLayer: false
}
}
});
// 使用 Vue Router 和 Vuex
app.use(router);
app.use(store);
// 等待 DOM 加载完成后再挂载应用
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => {
app.mount('#app');
window.app = app;
console.log('Vue 应用已挂载');
});
} else {
app.mount('#app');
window.app = app;
console.log('Vue 应用已挂载');
}