sk-smarty-ui
Version:
简洁快速的vue ui框架
50 lines • 1.21 kB
JavaScript
export default {
namespaced: true,
state: {
navBar : {
title : '',
iconl : '',
iconr : ''
},
background : '',
tapl : false,
tapr : false,
},
mutations: {
CONFIG (state, options) {
state.navBar = options.navBar ? options.navBar : {};
state.background = options.background ? options.background : '';
},
TAPL (state, value) {
state.tapl = value;
},
TAPR (state, value) {
state.tapr = value;
}
},
actions: {
'config' : (commit, options) => {
commit('CONFIG', options);
},
'tapl' : (commit, value) => {
commit('TAPL', value);
},
'tapr' : (commit, value) => {
commit('TAPR', value);
}
},
getters: {
navBar : state => {
return state.navBar
},
tapl : state => {
return state.tapl
},
tapr : state => {
return state.tapr
},
config : state => {
return state;
}
}
}