全栈开发实战小草看书之Web端(八)主入口
Html文件(index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>小草管理系统</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Vue文件(App.vue)
<template>
<router-view></router-view>
</template>
Js文件(main.js)
import { createApp } from "vue";
import ElementPlus from "element-plus";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import App from "@/App.vue";
import router from "@/router";
import store from "@/store";
import * as Icons from "@element-plus/icons-vue";
import "element-plus/dist/index.css";
import "@/assets/styles/index.less";
const app = createApp(App).use(router).use(store).use(ElementPlus, {
size: "small",
zIndex: 3000,
locale: zhCn,
});
for (var icon in Icons) {
app.component(icon, Icons[icon]);
}
app.mount("#app");
上一章 【全栈开发实战小草看书之Web端(七)Crud增删改查组合式API】
下一章 【全栈开发实战小草看书之Web端(九)登录】