/** * 应用全局状态管理 */ export default { namespaced: true, state: { currentVersion: '1.0.0', isLoading: true, startTime: Date.now() }, mutations: { SET_VERSION(state, version) { state.currentVersion = version; }, SET_LOADING(state, loading) { state.isLoading = loading; } }, actions: { setVersion({ commit }, version) { commit('SET_VERSION', version); }, setLoading({ commit }, loading) { commit('SET_LOADING', loading); } } };