This commit is contained in:
2025-09-19 14:25:20 +08:00
parent 269893a435
commit fbf3f77229
24949 changed files with 2839404 additions and 0 deletions

42
src/main.js Normal file
View File

@@ -0,0 +1,42 @@
import { createApp } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import App from './App.vue';
import DeviceList from './components/DeviceList.vue';
import Home from './components/Home.vue';
// 导入全局样式
import './assets/styles/main.css';
// 引入新创建的服务和工具(示例)
import ApiService from './services/apiService'; // 示例服务
import * as Utils from './utils/helpers'; // 示例工具函数
// 配置路由
const routes = [
{ path: '/', component: Home },
{ path: '/devices', component: DeviceList }
];
const router = createRouter({
history: createWebHistory(),
routes
});
// 创建Vue应用实例
const app = createApp(App);
// 使用Element Plus组件库
app.use(ElementPlus);
// 使用路由
app.use(router);
// 初始化服务(示例)
// app.config.globalProperties.$api = ApiService;
// app.config.globalProperties.$utils = Utils;
// 挂载应用
app.mount('#app');