后台管理模式项目开发经验总结如下,希望对你们有些帮助:
首先需要一个完整的v2版本的项目
vue2版本思路:首先需要手工创建一个vue@cli
整个项目分为 三部分: 头部(标题:通用管理系统) 主体(左侧下拉列表 和 右侧主体内容) 尾部(Frontend 2022 Csaey)。
正文如下:
一、app 出口位置
<template>
<div id="app">
<router-view></router-view>
<!-- <i class="fa fa-wifi"></i> -->
</div>
</template>
<script>
export default {
name: "App",
components: {
},
mounted() {
},
};
</script>
<style>
@import url("./assets/css/reset.css");
html,
body {
width: 100%;
height: 100%;
}
#app {
width: 100%;
height: 100%;
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
/* margin-top: 60px; */
}
</style>
二 、 index.js 路由配置
完整版:
需要写哪点再配置哪点 慢慢捋思路
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
redirect:'login',
name: '登录页',
hidden:true,
component: ()=>import("@/components/Login")
},
{
path: '/login',
name: 'login',