28 lines
610 B
TypeScript
28 lines
610 B
TypeScript
import "./index.css";
|
|
import { createApp } from "vue";
|
|
import { createPinia } from "pinia";
|
|
import router from "./router";
|
|
import App from "./App.vue";
|
|
import Layout from "./layout/index.vue";
|
|
import ElementPlus from 'element-plus'
|
|
import 'element-plus/dist/index.css'
|
|
import locale from 'element-plus/es/locale/lang/zh-cn'
|
|
|
|
// 创建 Vue 应用实例
|
|
const app = createApp(App);
|
|
|
|
// 使用 Pinia 状态管理
|
|
app.use(createPinia());
|
|
|
|
// 注册 Layout 组件
|
|
app.component('Layout', Layout);
|
|
|
|
// 使用 Vue Router
|
|
app.use(router);
|
|
app.use(ElementPlus, {
|
|
locale,
|
|
})
|
|
|
|
// 挂载应用到 DOM
|
|
app.mount("#app");
|