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

perf: 优化页面

parent a04dfb47
......@@ -27,6 +27,7 @@ export default {
"SET_permissions",
"SET_routes",
"SET_menusList",
"SET_secondaryRoutes",
]),
// 获取token和站点信息
async getInfo() {
......@@ -57,9 +58,9 @@ export default {
this.SET_menusList(menus);
this.setBtnPermissions(menuList);
calcMenu();
if (routes.length) {
let path = routes[0].path;
this.SET_secondaryRoutes(path);
this.$router.push(path);
} else {
this.$message.warning("暂无页面权限,请联系管理员!");
......
<template>
<div class="system">
<div class="page-tab-view">
<el-tabs :value="activeKey" @tab-click="changeRouter">
<el-tab-pane v-for="v in secondaryRoutes" :key="v.path" :name="v.path">
<template slot="label">
......@@ -8,7 +8,7 @@
</template>
</el-tab-pane>
</el-tabs>
<div class="system-out-box">
<div class="out-box">
<router-view></router-view>
</div>
</div>
......@@ -52,13 +52,13 @@ export default {
}
}
}
.system {
.page-tab-view {
width: 100%;
height: 100%;
background: #fff;
display: flex;
flex-direction: column;
.system-out-box {
.out-box {
flex: 1;
padding: 15px;
overflow-y: auto;
......
......@@ -136,7 +136,11 @@ export default {
if (row.url) {
return row.url.split(",").map((v) => {
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}
</el-tag>
);
......
......@@ -114,7 +114,7 @@ export default {
formatter: (row) => {
if (row.roleIds) {
return (
<div class="flex justify-center gap-2">
<div style="display: flex; justify-content: center; gap:4px">
{row.roleIds.split(",").map((v) => {
return (
<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