UNPKG

create-sunadmin

Version:

sunadmin-template脚手架工具

35 lines (30 loc) 919 B
//引入项目样式 import "./assets/main.css"; //引入vue import { createApp } from "vue"; //引入项目根组件 import App from "./App.vue"; //创建vue实例 const app = createApp(App); //项目配置和路由配置,请勿修改 import { getRoutes } from "./routes"; import { apiConfig, basePath } from "./config"; //element-plus import ElementPlus from "element-plus"; import "element-plus/dist/index.css"; import zhCn from "element-plus/dist/locale/zh-cn.mjs"; app.use(ElementPlus, { locale: zhCn }); import * as ElementPlusIconsVue from "@element-plus/icons-vue"; for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component); } //安装sunadmin import "sunadmin-core/dist/style.css"; import { SunAdmin } from "sunadmin-core"; app.use(SunAdmin, { apiConfig: apiConfig, routes: getRoutes(), basePath: basePath, }); //挂载vue实例到app节点 app.mount("#app");