Enumeration: MutationType
pinia.MutationType
SubscriptionCallback 的可能类型
Enumeration members
direct
• direct = "direct"
Direct mutation of the state:
store.name = 'new name'
store.$state.name = 'new name'
store.list.push('new item')
定义于
patchFunction
• patchFunction = "patch function"
用 $patch
和一个函数更改了 state:
store.$patch(state => state.name = 'newName')
定义于
patchObject
• patchObject = "patch object"
用 $patch
和一个函数更改了 state:
store.$patch({ name: 'newName' })