You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.6 KiB

import Vue from 'vue';
import Vuex from 'vuex';
4 months ago
Vue.use(Vuex)
export default new Vuex.Store({
state: {
showSidebar: false,
showFooter:false,
showHeader:false,
menuList:[],//目录菜单
showBreadcrumb:false,//是否展示面包屑
pageTitle:'一般新文献',//页面标题
addServiceList:[],//选中的服务
isLoading: false,//页面loading
},
actions: {
SET_HEADER({ commit }) {
commit('SET_HEADER');
},
SET_SIDEBAR({ commit }) {
commit('SET_SIDEBAR');
},
SET_FOOTER({ commit }) {
commit('SET_FOOTER');
},
SHOW_BREAD({ commit }) {
commit('SHOW_BREAD');
},
SET_PAGETITLE({ commit }) {
commit('SET_PAGETITLE');
},
SET_ADDSERVICELIST({ commit }) {
commit('SET_ADDSERVICELIST');
},
showLoading({ commit }) {
console.log('zhixingle111');
commit('SHOW_LOADING')
},
hideLoading({ commit }) {
console.log('zhixingle222');
commit('HIDE_LOADING')
}
4 months ago
},
mutations: {
SHOW_LOADING(state) {
state.isLoading = true
// state.loadingText = text || '加载中...'
},
HIDE_LOADING(state) {
state.isLoading = false
},
SET_SIDEBAR(state, show) {
state.showSidebar = show;
},
SET_FOOTER(state, show) {
state.showFooter = show;
},
SET_HEADER(state, show) {
state.showHeader = show;
},
SHOW_BREAD(state, show) {
state.showBreadcrumb = show;
},
SET_PAGETITLE(state, title) {
state.pageTitle = title;
},
SET_ADDSERVICELIST(state, list) {
state.addServiceList = list;
}
},
getters: {
4 months ago
},
4 months ago
modules: {
}
})