|
@@ -25,8 +25,9 @@ const app = {
|
|
|
color: null,
|
|
|
weak: false,
|
|
|
multiTab: true,
|
|
|
- nowRoute: '', // 当前路由
|
|
|
- isShowVideo: false // 是否显示视频弹窗
|
|
|
+ nowRoute: '', // 当前路由
|
|
|
+ isShowVideo: false ,// 是否显示视频弹窗
|
|
|
+ routeList: [] // 路由数组
|
|
|
},
|
|
|
mutations: {
|
|
|
SET_SIDEBAR_TYPE: (state, type) => {
|
|
@@ -77,53 +78,77 @@ const app = {
|
|
|
Vue.ls.set(DEFAULT_MULTI_TAB, bool)
|
|
|
state.multiTab = bool
|
|
|
},
|
|
|
- // 当前路由
|
|
|
- TOGGLE_NOW_ROUTER: (state, bool) => {
|
|
|
- state.nowRoute = bool
|
|
|
- },
|
|
|
- // 是否显示视频弹窗
|
|
|
- IS_ShOW_VIDEO: (state, bool) => {
|
|
|
- state.isShowVideo = bool
|
|
|
- }
|
|
|
+ // 当前路由
|
|
|
+ TOGGLE_NOW_ROUTER: (state, bool) => {
|
|
|
+ state.nowRoute = bool
|
|
|
+ },
|
|
|
+ // 是否显示视频弹窗
|
|
|
+ IS_ShOW_VIDEO: (state, bool) => {
|
|
|
+ state.isShowVideo = bool
|
|
|
+ }
|
|
|
},
|
|
|
actions: {
|
|
|
- setSidebar ({ commit }, type) {
|
|
|
+ setSidebar({
|
|
|
+ commit
|
|
|
+ }, type) {
|
|
|
commit('SET_SIDEBAR_TYPE', type)
|
|
|
},
|
|
|
- CloseSidebar ({ commit }) {
|
|
|
+ CloseSidebar({
|
|
|
+ commit
|
|
|
+ }) {
|
|
|
commit('CLOSE_SIDEBAR')
|
|
|
},
|
|
|
- ToggleDevice ({ commit }, device) {
|
|
|
+ ToggleDevice({
|
|
|
+ commit
|
|
|
+ }, device) {
|
|
|
commit('TOGGLE_DEVICE', device)
|
|
|
},
|
|
|
- ToggleTheme ({ commit }, theme) {
|
|
|
+ ToggleTheme({
|
|
|
+ commit
|
|
|
+ }, theme) {
|
|
|
commit('TOGGLE_THEME', theme)
|
|
|
},
|
|
|
- ToggleLayoutMode ({ commit }, mode) {
|
|
|
+ ToggleLayoutMode({
|
|
|
+ commit
|
|
|
+ }, mode) {
|
|
|
commit('TOGGLE_LAYOUT_MODE', mode)
|
|
|
},
|
|
|
- ToggleFixedHeader ({ commit }, fixedHeader) {
|
|
|
+ ToggleFixedHeader({
|
|
|
+ commit
|
|
|
+ }, fixedHeader) {
|
|
|
if (!fixedHeader) {
|
|
|
commit('TOGGLE_FIXED_HEADER_HIDDEN', false)
|
|
|
}
|
|
|
commit('TOGGLE_FIXED_HEADER', fixedHeader)
|
|
|
},
|
|
|
- ToggleFixSiderbar ({ commit }, fixSiderbar) {
|
|
|
+ ToggleFixSiderbar({
|
|
|
+ commit
|
|
|
+ }, fixSiderbar) {
|
|
|
commit('TOGGLE_FIXED_SIDERBAR', fixSiderbar)
|
|
|
},
|
|
|
- ToggleFixedHeaderHidden ({ commit }, show) {
|
|
|
+ ToggleFixedHeaderHidden({
|
|
|
+ commit
|
|
|
+ }, show) {
|
|
|
commit('TOGGLE_FIXED_HEADER_HIDDEN', show)
|
|
|
},
|
|
|
- ToggleContentWidth ({ commit }, type) {
|
|
|
+ ToggleContentWidth({
|
|
|
+ commit
|
|
|
+ }, type) {
|
|
|
commit('TOGGLE_CONTENT_WIDTH', type)
|
|
|
},
|
|
|
- ToggleColor ({ commit }, color) {
|
|
|
+ ToggleColor({
|
|
|
+ commit
|
|
|
+ }, color) {
|
|
|
commit('TOGGLE_COLOR', color)
|
|
|
},
|
|
|
- ToggleWeak ({ commit }, weakFlag) {
|
|
|
+ ToggleWeak({
|
|
|
+ commit
|
|
|
+ }, weakFlag) {
|
|
|
commit('TOGGLE_WEAK', weakFlag)
|
|
|
},
|
|
|
- ToggleMultiTab ({ commit }, bool) {
|
|
|
+ ToggleMultiTab({
|
|
|
+ commit
|
|
|
+ }, bool) {
|
|
|
commit('TOGGLE_MULTI_TAB', bool)
|
|
|
}
|
|
|
}
|