Commit 916bc99e authored by “yiyousong”'s avatar “yiyousong”

perf: 优化页面

parent a04dfb47
...@@ -27,6 +27,7 @@ export default { ...@@ -27,6 +27,7 @@ export default {
"SET_permissions", "SET_permissions",
"SET_routes", "SET_routes",
"SET_menusList", "SET_menusList",
"SET_secondaryRoutes",
]), ]),
// 获取token和站点信息 // 获取token和站点信息
async getInfo() { async getInfo() {
...@@ -57,9 +58,9 @@ export default { ...@@ -57,9 +58,9 @@ export default {
this.SET_menusList(menus); this.SET_menusList(menus);
this.setBtnPermissions(menuList); this.setBtnPermissions(menuList);
calcMenu(); calcMenu();
if (routes.length) { if (routes.length) {
let path = routes[0].path; let path = routes[0].path;
this.SET_secondaryRoutes(path);
this.$router.push(path); this.$router.push(path);
} else { } else {
this.$message.warning("暂无页面权限,请联系管理员!"); this.$message.warning("暂无页面权限,请联系管理员!");
......
<template> <template>
<div class="system"> <div class="page-tab-view">
<el-tabs :value="activeKey" @tab-click="changeRouter"> <el-tabs :value="activeKey" @tab-click="changeRouter">
<el-tab-pane v-for="v in secondaryRoutes" :key="v.path" :name="v.path"> <el-tab-pane v-for="v in secondaryRoutes" :key="v.path" :name="v.path">
<template slot="label"> <template slot="label">
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</template> </template>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="system-out-box"> <div class="out-box">
<router-view></router-view> <router-view></router-view>
</div> </div>
</div> </div>
...@@ -52,13 +52,13 @@ export default { ...@@ -52,13 +52,13 @@ export default {
} }
} }
} }
.system { .page-tab-view {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #fff; background: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.system-out-box { .out-box {
flex: 1; flex: 1;
padding: 15px; padding: 15px;
overflow-y: auto; overflow-y: auto;
......
...@@ -136,7 +136,11 @@ export default { ...@@ -136,7 +136,11 @@ export default {
if (row.url) { if (row.url) {
return row.url.split(",").map((v) => { return row.url.split(",").map((v) => {
return ( return (
<el-tag class="mb-2 mr-2" type="info" size="mini"> <el-tag
style="margin-right: 5px; margin-bottom: 5px;"
type="info"
size="mini"
>
{v} {v}
</el-tag> </el-tag>
); );
......
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
formatter: (row) => { formatter: (row) => {
if (row.roleIds) { if (row.roleIds) {
return ( return (
<div class="flex justify-center gap-2"> <div style="display: flex; justify-content: center; gap:4px">
{row.roleIds.split(",").map((v) => { {row.roleIds.split(",").map((v) => {
return ( return (
<el-tag size="small" type="info"> <el-tag size="small" type="info">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment