This commit is contained in:
parent
49fc8520b5
commit
d1d7342eaa
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title>Welcome to Element Plus</title>
|
<title>Welcome to SCUI Admin</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
<div class="screen panel-item" @click="screen">
|
||||||
|
<i class="el-icon-full-screen"></i>
|
||||||
|
</div>
|
||||||
<div class="setting panel-item">
|
<div class="setting panel-item">
|
||||||
<i class="el-icon-setting"></i>
|
<i class="el-icon-setting"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -63,6 +66,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//个人信息
|
||||||
handleUser(command) {
|
handleUser(command) {
|
||||||
if(command == "outLogin"){
|
if(command == "outLogin"){
|
||||||
this.$router.replace({path: '/login'});
|
this.$router.replace({path: '/login'});
|
||||||
|
|
@ -71,6 +75,11 @@
|
||||||
getBreadcrumb(){
|
getBreadcrumb(){
|
||||||
let matched = this.$route.matched;
|
let matched = this.$route.matched;
|
||||||
this.breadList = matched;
|
this.breadList = matched;
|
||||||
|
},
|
||||||
|
//全屏
|
||||||
|
screen(){
|
||||||
|
var element = document.documentElement;
|
||||||
|
this.$TOOL.screen(element)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,12 @@
|
||||||
|
|
||||||
<transition name="el-zoom-in-top">
|
<transition name="el-zoom-in-top">
|
||||||
<ul v-if="contextMenuVisible" :style="{left:left+'px',top:top+'px'}" class="contextmenu" id="contextmenu">
|
<ul v-if="contextMenuVisible" :style="{left:left+'px',top:top+'px'}" class="contextmenu" id="contextmenu">
|
||||||
<li @click="refreshTab()">刷新</li>
|
<li @click="refreshTab()"><i class="el-icon-refresh"></i>刷新</li>
|
||||||
<hr>
|
<hr>
|
||||||
<li @click="closeTabs()" :class="contextMenuItem.meta.affix?'disabled':''">关闭标签</li>
|
<li @click="closeTabs()" :class="contextMenuItem.meta.affix?'disabled':''"><i class="el-icon-close"></i>关闭标签</li>
|
||||||
<li @click="closeOtherTabs()">关闭其他标签</li>
|
<li @click="closeOtherTabs()"><i class="el-icon-folder-delete"></i>关闭其他标签</li>
|
||||||
|
<hr>
|
||||||
|
<li @click="screen()"><i class="el-icon-full-screen"></i>全屏当前标签</li>
|
||||||
</ul>
|
</ul>
|
||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -24,7 +26,7 @@
|
||||||
.contextmenu {
|
.contextmenu {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
margin:0;
|
margin:0;
|
||||||
border-radius: 4px;
|
border-radius: 0px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #e4e7ed;
|
border: 1px solid #e4e7ed;
|
||||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
||||||
|
|
@ -46,6 +48,10 @@
|
||||||
padding: 0 17px;
|
padding: 0 17px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
}
|
}
|
||||||
|
.contextmenu li i {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
.contextmenu li:hover {
|
.contextmenu li:hover {
|
||||||
background-color: #ecf5ff;
|
background-color: #ecf5ff;
|
||||||
color: #66b1ff;
|
color: #66b1ff;
|
||||||
|
|
@ -174,6 +180,19 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.contextMenuVisible = false
|
this.contextMenuVisible = false
|
||||||
|
},
|
||||||
|
//TAB 全屏标签
|
||||||
|
screen(){
|
||||||
|
var nowTag = this.contextMenuItem;
|
||||||
|
this.contextMenuVisible = false
|
||||||
|
//判断是否当前路由,否的话跳转
|
||||||
|
if(this.$route.path != nowTag.path){
|
||||||
|
this.$router.push({
|
||||||
|
path: nowTag.path
|
||||||
|
})
|
||||||
|
}
|
||||||
|
var element = document.getElementById('adminui-main')
|
||||||
|
this.$TOOL.screen(element)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="aminui-body">
|
<div class="aminui-body">
|
||||||
<Head></Head>
|
<Head></Head>
|
||||||
<Tags></Tags>
|
<Tags></Tags>
|
||||||
<div class="adminui-main">
|
<div class="adminui-main" id="adminui-main">
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
.adminui-tags li.active a {color: #fff;}
|
.adminui-tags li.active a {color: #fff;}
|
||||||
|
|
||||||
|
|
||||||
.adminui-main {position: absolute;top:85px;left:0px;right:0px;bottom:0px;overflow: auto;}
|
.adminui-main {position: absolute;top:85px;left:0px;right:0px;bottom:0px;overflow: auto;background-color: #f6f8f9;}
|
||||||
|
|
||||||
|
|
||||||
.el-menu {border: none!important;}
|
.el-menu {border: none!important;}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
const tool = {
|
const tool = {
|
||||||
/* localStorage */
|
/* localStorage */
|
||||||
data: {
|
data: {
|
||||||
set: function(table, settings) {
|
set(table, settings) {
|
||||||
var _set = JSON.stringify(settings)
|
var _set = JSON.stringify(settings)
|
||||||
return localStorage.setItem(table, _set);
|
return localStorage.setItem(table, _set);
|
||||||
},
|
},
|
||||||
get: function(table) {
|
get(table) {
|
||||||
var data = localStorage.getItem(table);
|
var data = localStorage.getItem(table);
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(data)
|
data = JSON.parse(data)
|
||||||
|
|
@ -14,12 +14,37 @@ const tool = {
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
remove: function(table) {
|
remove(table) {
|
||||||
return localStorage.removeItem(table);
|
return localStorage.removeItem(table);
|
||||||
},
|
},
|
||||||
clear: function() {
|
clear() {
|
||||||
return localStorage.clear();
|
return localStorage.clear();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
/* Fullscreen */
|
||||||
|
screen(element){
|
||||||
|
var isFull = !!(document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement || document.fullscreenElement);
|
||||||
|
if(isFull){
|
||||||
|
if(document.exitFullscreen) {
|
||||||
|
document.exitFullscreen();
|
||||||
|
}else if (document.msExitFullscreen) {
|
||||||
|
document.msExitFullscreen();
|
||||||
|
}else if (document.mozCancelFullScreen) {
|
||||||
|
document.mozCancelFullScreen();
|
||||||
|
}else if (document.webkitExitFullscreen) {
|
||||||
|
document.webkitExitFullscreen();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(element.requestFullscreen) {
|
||||||
|
element.requestFullscreen();
|
||||||
|
}else if(element.msRequestFullscreen) {
|
||||||
|
element.msRequestFullscreen();
|
||||||
|
}else if(element.mozRequestFullScreen) {
|
||||||
|
element.mozRequestFullScreen();
|
||||||
|
}else if(element.webkitRequestFullscreen) {
|
||||||
|
element.webkitRequestFullscreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue