设置多个系统---vue-el-admin
2024-10-20 11:31:15
1. 修改\src\settings.js
const ppp= {
title: 'XXXX System',
titleZH: 'XXXX系統',
flag: 'ppp'
} const system = particle
module.exports = { title: system.title,
titleZH: system.titleZH,
flag: system.flag, /**
* @type {boolean} true | false
* @description Whether fix the header
*/
fixedHeader: false, /**
* @type {boolean} true | false
* @description Whether show the logo in sidebar
*/
sidebarLogo: true
}
2. 修改src\router\index.js
const defaultSettings = require('../settings')
const systemRoutes = {
particle: [
{
path: '/login',
component: () => import('@/views/login/index'),
hidden: true
}, {
path: '/',
component: Layout,
redirect: '/dashboard',
children: [{
path: 'dashboard',
name: 'Dashboard',
component: () => import('@/views/dashboard/index'),
meta: { title: '首頁', icon: 'dashboard' }
}]
}]} export const constantRoutes = systemRoutes[defaultSettings.flag]
3. 修改src\views\dashboard\index.vue
<template>
<div class="dashboard-container">
<img src="http://10.195.227.208:6868/asset/image/logo.png" alt="">
<div class="dashboard-text">歡迎來到{{titleZH}} !</div>
<!-- <div class="dashboard-text">Welcome To Particle Monitor System !</div> -->
<!-- <div class="dashboard-text">name: {{ name }}</div> -->
</div>
</template> <script>
import { mapGetters } from 'vuex'
import defaultSettings from '../../settings.js'
export default {
name: 'Dashboard',
data(){
return {
titleZH: defaultSettings.titleZH
}
},
computed: {
...mapGetters([
'name'
])
}
}
</script> <style lang="scss" scoped>
.dashboard {
&-container {
margin: 30px;
display:flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
&-text {
font-size: 40px;
line-height: 46px;
}
}
</style>
最新文章
- 使用Struts2实现数据校验
- CMake命令/函数汇总(翻译自官方手册)
- Hello, Android 快速入门
- IP碎片原理:攻击和防护
- CentOS6.5_Nginx1.40_Php5.57_MySQL5.5.35编译安装全记录
- oracle行号排序问题
- JavaScript之面向对象学习七(动态原型模式、寄生构造函数模式、稳妥构造函数模式创建自定义类型)
- PHP事件机制
- MySQL插入去重命令_REPLACE INTO
- [jQ]使用jQuery将多条数据插入模态框的方法
- springboot + mybatis + 多数据源
- 菜鸟调错(三)——Jboss与jdk版本不兼容导致WebService调用出错
- 虚拟机三种网络模式详解(Bridge,Nat,Host-only)
- Codeforces 788A Functions again - 贪心
- 2015 -&;gt; 2016
- python的FTP模块
- Python导入不同文件夹下模块
- SQL Server 2016,2014 &ldquo;无法找到数据库引擎启动句柄&rdquo;
- php数组合并
- 很不错的js特效
热门文章
- 【JavaWeb】学习笔记——Ajax、Axios
- 题解 P6355 [COCI2007-2008#3] DEJAVU
- ModuleNotFoundError: No module named &#39;XXX&#39;
- JavaScript 实现地图搜索功能
- Aspose.Words利用Word模板导出Word文档
- Redis系列11:内存淘汰策略
- 【Shell案例】【awk每行执行一次】11、转置文件的内容
- K8S 核心组件 kubelet 与 kube-proxy 分析
- hook详解和应用
- 记一次 .NET 某工控MES程序 崩溃分析