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.
53 lines
1.4 KiB
53 lines
1.4 KiB
import Vue from 'vue'
|
|
import Vuex from 'vuex'
|
|
|
|
Vue.use(Vuex)
|
|
|
|
export default new Vuex.Store({
|
|
state: {
|
|
opt: {},
|
|
sign: '',
|
|
pagecontentList: [],
|
|
navHeightTop: '',
|
|
navFixed: false,
|
|
heardHeight: 0
|
|
},
|
|
getters: {
|
|
getOpt: (state) => state.opt,
|
|
getSign: (state) => state.sign,
|
|
getpagecontent: (state) => state.pagecontentList,
|
|
getNavHeightTop: (state) => state.navHeightTop,
|
|
getNavFixed: (state) => state.navFixed,
|
|
getHeardHeight: (state) => state.heardHeight
|
|
},
|
|
mutations: {
|
|
setOpt: (state, opt) => (state.opt = opt),
|
|
setSign: (state, sign) => (state.sign = sign),
|
|
setpagecontent(state, pagecontent) {
|
|
state.pagecontentList = pagecontent
|
|
},
|
|
setNavHeightTop: (state, navHeightTop) => (state.navHeightTop = navHeightTop),
|
|
setNavFixed: (state, navFixed) => (state.navFixed = navFixed),
|
|
setHeardHeight: (state, height) => (state.heardHeight = height),
|
|
},
|
|
actions: {
|
|
acOpt(context, opt) {
|
|
context.commit('setOpt', opt)
|
|
},
|
|
acSign(context, sign) {
|
|
context.commit('setSign', sign)
|
|
},
|
|
acPagecontent(context, pagecontent) {
|
|
context.commit('setpagecontent', pagecontent)
|
|
},
|
|
acNavHeightTop(context, navHeightTop) {
|
|
context.commit('setNavHeightTop', navHeightTop)
|
|
},
|
|
acNavFixed(context, navFixed) {
|
|
context.commit('setNavFixed', navFixed)
|
|
},
|
|
acHeardHeight(context, height) {
|
|
context.commit('setHeardHeight', height)
|
|
}
|
|
},
|
|
})
|
|
|