瀏覽代碼

perf(views): 新增“暂无权限”页面

wangshun 1 天之前
父節點
當前提交
f33fdfd560
共有 3 個文件被更改,包括 41 次插入0 次删除
  1. 二進制
      src/assets/img/not-allow.png
  2. 9 0
      src/router/index.ts
  3. 32 0
      src/views/NotAllow.vue

二進制
src/assets/img/not-allow.png


+ 9 - 0
src/router/index.ts

@@ -446,6 +446,15 @@ const routes: Readonly<RouteRecordRaw[]> = [
       },
     ],
   },
+  {
+    path: '/exception',
+    name: 'exception',
+    component: () => import('@/views/NotAllow.vue'),
+    meta: {
+      hideInMenu: true,
+      requiresAuth: false,
+    },
+  },
   ...dataCenterRoutes,
   ...opsCenterRoutes,
 ];

+ 32 - 0
src/views/NotAllow.vue

@@ -0,0 +1,32 @@
+<template>
+  <AFlex class="content-flex" justify="center" align="center">
+    <div class="content-div">
+      <div>
+        <img class="content-img" src="@/assets/img/not-allow.png" alt="" />
+      </div>
+      {{ $t('common.noPermission') }}
+    </div>
+  </AFlex>
+</template>
+
+<style lang="scss" scoped>
+.content-div {
+  font-size: 14px;
+  font-style: normal;
+  font-weight: 500;
+  line-height: 22px;
+  color: rgb(0 0 0 / 65%);
+  text-align: center;
+}
+
+.content-img {
+  width: 184px;
+  height: 132px;
+  margin-bottom: 8px;
+}
+
+.content-flex {
+  width: 100%;
+  height: 100%;
+}
+</style>