mirror of
https://gitee.com/yiming_chang/vue-pure-admin.git
synced 2024-12-03 11:49:21 +08:00
feat: 添加无Layout
的空白页面示例
This commit is contained in:
parent
8314df9faf
commit
e0c8781bcc
@ -21,6 +21,7 @@ buttons:
|
|||||||
menus:
|
menus:
|
||||||
hshome: Home
|
hshome: Home
|
||||||
hslogin: Login
|
hslogin: Login
|
||||||
|
hsempty: Empty Page
|
||||||
hssysManagement: System Manage
|
hssysManagement: System Manage
|
||||||
hsUser: User Manage
|
hsUser: User Manage
|
||||||
hsDict: Dict Manage
|
hsDict: Dict Manage
|
||||||
|
@ -21,6 +21,7 @@ buttons:
|
|||||||
menus:
|
menus:
|
||||||
hshome: 首页
|
hshome: 首页
|
||||||
hslogin: 登录
|
hslogin: 登录
|
||||||
|
hsempty: 无Layout页
|
||||||
hssysManagement: 系统管理
|
hssysManagement: 系统管理
|
||||||
hsUser: 用户管理
|
hsUser: 用户管理
|
||||||
hsDict: 字典管理
|
hsDict: 字典管理
|
||||||
|
752
pnpm-lock.yaml
752
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
1
src/assets/svg/back.svg
Normal file
1
src/assets/svg/back.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg width="32" height="32" viewBox="0 0 48 48"><path fill="#2F88FF" fill-rule="evenodd" stroke="#000" stroke-linejoin="round" stroke-width="4" d="M44 40.8361C39.1069 34.8632 34.7617 31.4739 30.9644 30.6682C27.1671 29.8625 23.5517 29.7408 20.1182 30.303V41L4 23.5453L20.1182 7V17.167C26.4667 17.2172 31.8638 19.4948 36.3095 24C40.7553 28.5052 43.3187 34.1172 44 40.8361Z" clip-rule="evenodd"/></svg>
|
After Width: | Height: | Size: 399 B |
@ -69,7 +69,7 @@ watch(
|
|||||||
router
|
router
|
||||||
unique-opened
|
unique-opened
|
||||||
mode="vertical"
|
mode="vertical"
|
||||||
class="outer-most"
|
class="outer-most select-none"
|
||||||
:collapse="isCollapse"
|
:collapse="isCollapse"
|
||||||
:default-active="route.path"
|
:default-active="route.path"
|
||||||
:collapse-transition="false"
|
:collapse-transition="false"
|
||||||
@ -79,8 +79,8 @@ watch(
|
|||||||
v-for="routes in menuData"
|
v-for="routes in menuData"
|
||||||
:key="routes.path"
|
:key="routes.path"
|
||||||
:item="routes"
|
:item="routes"
|
||||||
class="outer-most"
|
|
||||||
:base-path="routes.path"
|
:base-path="routes.path"
|
||||||
|
class="outer-most select-none"
|
||||||
/>
|
/>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
@ -28,6 +28,17 @@ const remainingRouter = [
|
|||||||
component: () => import("/@/layout/redirect.vue")
|
component: () => import("/@/layout/redirect.vue")
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
// 下面是一个无layout菜单的例子(一个全屏空白页面),因为这种情况极少发生,所以只需要在前端配置即可(配置路径:src/router/modules/remaining.ts)
|
||||||
|
{
|
||||||
|
path: "/empty",
|
||||||
|
name: "Empty",
|
||||||
|
component: () => import("/@/views/empty/index.vue"),
|
||||||
|
meta: {
|
||||||
|
title: $t("menus.hsempty"),
|
||||||
|
showLink: false,
|
||||||
|
rank: 105
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
35
src/views/empty/index.vue
Normal file
35
src/views/empty/index.vue
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import back from "/@/assets/svg/back.svg?component";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "Empty"
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="back" title="返回上一页" @click="$router.go(-1)">
|
||||||
|
<back class="w-80px h-80px" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.back {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 18px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
background: rgba(138, 150, 160, 0.08);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgba(138, 150, 160, 0.2);
|
||||||
|
transition: background 0.6s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -93,5 +93,10 @@ function onCloseTags() {
|
|||||||
<br />
|
<br />
|
||||||
开启方式:在页面最右上角有个设置的小图标,点进去,会看到项目配置面板,找到标签页持久化开启即可。
|
开启方式:在页面最右上角有个设置的小图标,点进去,会看到项目配置面板,找到标签页持久化开启即可。
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<el-divider />
|
||||||
|
<el-button @click="$router.push({ name: 'Empty' })">
|
||||||
|
跳转无Layout的空白页面
|
||||||
|
</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user