@@ -47,6 +47,11 @@ export default {
drawerOpen: false
}
},
+ provide() {
+ return {
+ adminLayout: this
+ }
+ },
watch: {
$route(val) {
this.setActivated(val)
@@ -62,7 +67,7 @@ export default {
},
computed: {
...mapState('setting', ['isMobile', 'theme', 'layout', 'footerLinks', 'copyright', 'fixedHeader', 'fixedSideBar',
- 'hideSetting']),
+ 'fixedTabs', 'hideSetting', 'multiPage']),
...mapGetters('setting', ['firstMenu', 'subMenu', 'menuData']),
sideMenuWidth() {
return this.collapsed ? '80px' : '256px'
@@ -70,8 +75,7 @@ export default {
headerStyle() {
let width = (this.fixedHeader && this.layout !== 'head' && !this.isMobile) ? `calc(100% - ${this.sideMenuWidth})` : '100%'
let position = this.fixedHeader ? 'fixed' : 'static'
- let transition = this.fixedHeader ? 'transition: width 0.2s' : ''
- return `width: ${width}; position: ${position}; ${transition}`
+ return `width: ${width}; position: ${position};`
},
headMenuData() {
const {layout, menuData, firstMenu} = this
@@ -127,10 +131,22 @@ export default {
.virtual-side{
transition: all 0.2s;
}
+ .virtual-header{
+ transition: all 0.2s;
+ opacity: 0;
+ &.fixed-tabs.multi-page:not(.fixed-header){
+ height: 0;
+ }
+ }
.admin-layout-main{
.admin-header{
top: 0;
right: 0;
+ overflow: hidden;
+ transition: all 0.2s;
+ &.fixed-tabs.multi-page:not(.fixed-header){
+ height: 0;
+ }
}
}
.admin-layout-content{
diff --git a/src/layouts/tabs/TabsHead.vue b/src/layouts/tabs/TabsHead.vue
new file mode 100644
index 0000000..17e74db
--- /dev/null
+++ b/src/layouts/tabs/TabsHead.vue
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+ {{pageName(page)}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/layouts/tabs/TabsView.vue b/src/layouts/tabs/TabsView.vue
index d97cf1e..73a9828 100644
--- a/src/layouts/tabs/TabsView.vue
+++ b/src/layouts/tabs/TabsView.vue
@@ -1,20 +1,14 @@
-
-
- {{pageName(page)}}
-
-
+
@@ -33,11 +27,12 @@ import PageToggleTransition from '@/components/transition/PageToggleTransition'
import {mapState, mapMutations} from 'vuex'
import {getI18nKey} from '@/utils/routerUtil'
import AKeepAlive from '@/components/cache/AKeepAlive'
+import TabsHead from '@/layouts/tabs/TabsHead'
export default {
name: 'TabsView',
i18n: require('./i18n'),
- components: { PageToggleTransition, Contextmenu, AdminLayout , AKeepAlive },
+ components: {TabsHead, PageToggleTransition, Contextmenu, AdminLayout , AKeepAlive },
data () {
return {
clearCaches: [],
diff --git a/src/store/modules/setting.js b/src/store/modules/setting.js
index c0df29c..ce3857d 100644
--- a/src/store/modules/setting.js
+++ b/src/store/modules/setting.js
@@ -91,6 +91,9 @@ export default {
},
setActivatedFirst(state, activatedFirst) {
state.activatedFirst = activatedFirst
+ },
+ setFixedTabs(state, fixedTabs) {
+ state.fixedTabs = fixedTabs
}
}
}