v2.5.0
版本发布时间: 2017-10-12 03:06:13
vuejs/vuex最新发布版本:v4.0.2(2021-06-17 23:52:07)
New
-
store.registerModule
can now be called while preserving current state if the module is already registered, by passing a 3rd argument as{ preserveState: true }
. Useful in server-side rendering. -
New method:
store.subscribeAction()
- similar tostore.subscribe
, but for actions instead. -
Namespaced modules can now also register global actions using the following syntax:
const module = { actions: { rootAction: { root: true, handler: () => {} } } }
-
The
createLogger
function now also accepts alogger
option, allowing the user to provide a custom implementation of theconsole
object to be used when logging.