如何使用点差运算符将其作为单行代码:
const module = extractVuexModule( Activities )
export const state = module.state
export const getters = module.getters
export const mutations = module.mutations
export const actions = module.actions
答案 0 :(得分:2)
您可以object destructuring使用named exports:
export const { state, getters, mutations, actions } = extractVuexModule(Activities);