mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-07 17:07:19 +08:00
fix: fix some route problem
This commit is contained in:
parent
4f873641a5
commit
b79ddfcfbd
@ -84,7 +84,6 @@ export default defineComponent({
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
margin-left: 8px;
|
|
||||||
|
|
||||||
.no-redirect {
|
.no-redirect {
|
||||||
color: #97a8be;
|
color: #97a8be;
|
||||||
|
@ -10,9 +10,14 @@
|
|||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<!-- 全屏 -->
|
<!-- 全屏 -->
|
||||||
<screenfull />
|
<screenfull v-show="!deviceDetection()" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<div class="inter" :title="langs ? '中文' : 'English'" @click="toggleLang">
|
<div
|
||||||
|
v-show="!deviceDetection()"
|
||||||
|
class="inter"
|
||||||
|
:title="langs ? '中文' : 'English'"
|
||||||
|
@click="toggleLang"
|
||||||
|
>
|
||||||
<img :src="langs ? ch : en" />
|
<img :src="langs ? ch : en" />
|
||||||
</div>
|
</div>
|
||||||
<i class="el-icon-setting hsset" :title="$t('message.hssystemSet')" @click="onPanel"></i>
|
<i class="el-icon-setting hsset" :title="$t('message.hssystemSet')" @click="onPanel"></i>
|
||||||
@ -49,6 +54,7 @@ import ch from "/@/assets/ch.png";
|
|||||||
import en from "/@/assets/en.png";
|
import en from "/@/assets/en.png";
|
||||||
import favicon from "/favicon.ico";
|
import favicon from "/favicon.ico";
|
||||||
import { emitter } from "/@/utils/mitt";
|
import { emitter } from "/@/utils/mitt";
|
||||||
|
import { deviceDetection } from "/@/utils/deviceDetection";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "Navbar",
|
name: "Navbar",
|
||||||
@ -105,7 +111,8 @@ export default defineComponent({
|
|||||||
ch,
|
ch,
|
||||||
en,
|
en,
|
||||||
favicon,
|
favicon,
|
||||||
onPanel
|
onPanel,
|
||||||
|
deviceDetection
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -113,9 +120,9 @@ export default defineComponent({
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.navbar {
|
.navbar {
|
||||||
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||||
|
|
||||||
@ -137,16 +144,18 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right-menu {
|
.right-menu {
|
||||||
float: right;
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
height: 48px;
|
||||||
|
line-height: 48px;
|
||||||
.inter {
|
.inter {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
margin-right: 5px;
|
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
@ -169,7 +178,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
.el-dropdown-link {
|
.el-dropdown-link {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 48px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="containerDom" class="tags-view" v-if="!showTags">
|
<div ref="containerDom" class="tags-view" v-if="!showTags">
|
||||||
<el-scrollbar :vertical="false" class="scroll-container">
|
<el-scrollbar wrap-class="scrollbar-wrapper" class="scroll-container">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in dynamicTagList"
|
v-for="(item, index) in dynamicTagList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- 右侧功能按钮 -->
|
<!-- 右侧功能按钮 -->
|
||||||
<ul class="right-func">
|
<ul class="right-button">
|
||||||
<li>
|
<li>
|
||||||
<i
|
<i
|
||||||
:title="$t('message.hsrefreshRoute')"
|
:title="$t('message.hsrefreshRoute')"
|
||||||
@ -327,7 +327,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dynamicTagList: dRoutes,
|
dynamicTagList: useDynamicRoutesHook().dRoutes,
|
||||||
deleteMenu,
|
deleteMenu,
|
||||||
showTags,
|
showTags,
|
||||||
onFresh,
|
onFresh,
|
||||||
@ -352,9 +352,9 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.tags-view {
|
.tags-view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
box-shadow: 0 0 1px #888888;
|
||||||
.scroll-item {
|
.scroll-item {
|
||||||
border-radius: 3px 3px 0 0;
|
border-radius: 3px 3px 0 0;
|
||||||
padding: 2px 8px;
|
padding: 2px 8px;
|
||||||
@ -374,18 +374,22 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scroll-container {
|
.scroll-container {
|
||||||
text-align: left;
|
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 0.5px solid rgba($color: #ccc, $alpha: 0.3);
|
|
||||||
.scroll-item {
|
.scroll-item {
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scrollbar-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
height: 40px;
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.contextmenu {
|
.contextmenu {
|
||||||
@ -399,7 +403,6 @@ export default {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333;
|
color: #333;
|
||||||
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
|
|
||||||
li {
|
li {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 7px 16px;
|
padding: 7px 16px;
|
||||||
@ -411,20 +414,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-scrollbar__wrap) {
|
.right-button {
|
||||||
height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right-func {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 0.5px solid rgba($color: #ccc, $alpha: 0.3);
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
li {
|
li {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 34px;
|
height: 38px;
|
||||||
line-height: 34px;
|
line-height: 38px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-right: 1px solid #ccc;
|
border-right: 1px solid #ccc;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -59,10 +59,12 @@ export function useDynamicRoutesHook() {
|
|||||||
if (route) {
|
if (route) {
|
||||||
let ramStorage = storageLocal.getItem("routesInStorage");
|
let ramStorage = storageLocal.getItem("routesInStorage");
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
if (ramStorage) {
|
||||||
let currentIndex = ramStorage.findIndex((v) => v.path === route.path);
|
let currentIndex = ramStorage.findIndex((v) => v.path === route.path);
|
||||||
if (currentIndex !== -1) return;
|
if (currentIndex !== -1) return;
|
||||||
ramStorage.push({ path: route.path, meta: route.meta });
|
ramStorage.push({ path: route.path, meta: route.meta });
|
||||||
storageLocal.setItem("routesInStorage", ramStorage);
|
storageLocal.setItem("routesInStorage", ramStorage);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,11 +78,6 @@ ul {
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 隐藏滚动条
|
|
||||||
// .element::-webkit-scrollbar { width: 0 !important } //webkit
|
|
||||||
// .element { -ms-overflow-style: none; } //IE 10+
|
|
||||||
// .element { overflow: -moz-scrollbars-none; } //Firefox
|
|
||||||
|
|
||||||
.login,
|
.login,
|
||||||
.register {
|
.register {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user