feat: 新增权限测试页面

This commit is contained in:
WANGFAN\wangf 2025-04-01 15:20:13 +08:00
parent 69b5d9d091
commit 2a9591320f
7 changed files with 111 additions and 9 deletions

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743488804156" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3516" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 0m292.576 0l438.848 0q292.576 0 292.576 292.576l0 438.848q0 292.576-292.576 292.576l-438.848 0q-292.576 0-292.576-292.576l0-438.848q0-292.576 292.576-292.576Z" fill="#DC95D7" p-id="3517"></path><path d="M750.496 364.992c-15.424-88.992-99.424-148.384-187.52-132.736-88 15.68-162.4 84.224-146.848 173.12 3.36 19.232 12.64 49.216 23.584 70.784l-159.904 230.72c-5.92 8.48-9.28 23.808-7.488 34.112l6.944 39.456c-6.624-38.016 1.76 13.76 6.912 13.536l52.672 0.8c10.176-1.792 22.944-10.4 28.512-19.136l63.296-98.976 0.576-0.64 55.232 4.352 73.92-115.84c24.288 4.096 59.04 2.656 79.744-0.928 87.68-15.68 126.048-109.696 110.4-198.624zM323.072 722.688l-13.824 8.736 3.2-15.68 150.08-214.784 10.4 7.296-149.856 214.432z m349.472-312.16c-24.256 34.88-48.96 10.272-83.52-14.208-34.56-24.48-65.984-39.456-41.728-74.464a76 76 0 0 1 106.464-19.04 77.888 77.888 0 0 1 18.784 107.712z" fill="#FFFFFF" p-id="3518"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,5 +1,5 @@
<template>
<div class="snow-page-pure">
<div class="snow-fill-pure">
<div class="link-page-box">
<div v-if="!isLoading" class="loading-page">
<div class="dc-loader"></div>

View File

@ -91,6 +91,9 @@ export default {
["disable-menu"]: "disable-menu",
["hide-menu"]: "hide-menu",
["i18n"]: "i18n",
["amap"]: "amap"
["amap"]: "amap",
["permission"]: "permission",
["test-1"]: "test-1",
["test-2"]: "test-2"
}
};

View File

@ -91,6 +91,9 @@ export default {
["disable-menu"]: "停用菜单",
["hide-menu"]: "隐藏菜单",
["i18n"]: "国际化",
["amap"]: "高德地图"
["amap"]: "高德地图",
["permission"]: "权限测试",
["test-1"]: "测试-1",
["test-2"]: "测试-2"
}
};

View File

@ -1198,7 +1198,66 @@ export default [
}
},
{
id: "15",
id: "13",
parentId: "0",
path: "/permission",
name: "permission",
redirect: "/permission/test1",
meta: {
title: "permission",
hide: false,
disable: false,
keepAlive: true,
affix: false,
link: "",
iframe: false,
roles: ["admin"],
svgIcon: "permission",
sort: 13
},
children: [
{
id: "1301",
parentId: "13",
path: "/permission/test1",
name: "test1",
component: "permission/test1/test1",
meta: {
title: "test-1",
hide: false,
disable: false,
keepAlive: true,
affix: false,
link: "",
iframe: false,
roles: ["admin"],
icon: "icon-menu",
sort: 1
}
},
{
id: "1302",
parentId: "13",
path: "/permission/test2",
name: "test2",
component: "permission/test2/test2",
meta: {
title: "test-2",
hide: false,
disable: false,
keepAlive: true,
affix: false,
link: "",
iframe: false,
roles: ["common"],
icon: "icon-menu",
sort: 2
}
}
]
},
{
id: "14",
parentId: "0",
path: "/gaodemap",
name: "gaodemap",
@ -1213,11 +1272,11 @@ export default [
iframe: true, // 区分是否内链 true内链 false外链
roles: ["admin"],
svgIcon: "amap",
sort: 12
sort: 14
}
},
{
id: "13",
id: "15",
parentId: "0",
path: "/i18n",
name: "i18n",
@ -1232,11 +1291,11 @@ export default [
iframe: false,
roles: ["admin", "common"],
svgIcon: "earth",
sort: 13
sort: 15
}
},
{
id: "14",
id: "16",
parentId: "0",
path: "/about",
name: "about",
@ -1251,7 +1310,7 @@ export default [
iframe: false,
roles: ["admin", "common"],
svgIcon: "about",
sort: 14
sort: 16
}
}
];

View File

@ -0,0 +1,17 @@
<template>
<div class="snow-page">
<div class="snow-inner">
<a-alert>
当前页面为
<a-tag color="green"> 超级管理员 </a-tag>
权限页面
<a-tag color="orange"> 普通角色 </a-tag>
无法查看
</a-alert>
</div>
</div>
</template>
<script setup lang="ts"></script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,19 @@
<template>
<div class="snow-page">
<div class="snow-inner">
<a-alert>
当前页面为
<a-tag color="orange"> 普通角色 </a-tag>
权限页面
<a-tag color="green"> 超级管理员 </a-tag>
<a-tag color="orange"> 普通角色 </a-tag>
都可查看
</a-alert>
</div>
</div>
</template>
<script setup lang="ts"></script>
<style lang="scss" scoped></style>