This commit is contained in:
liangping
2023-04-07 10:11:48 +08:00
parent 8c31935432
commit d3a7c6f176
14 changed files with 142 additions and 68 deletions
-10
View File
@@ -1,10 +0,0 @@
import type { PiniaPluginContext } from "pinia"
export function DashboardPlugin(context: PiniaPluginContext) {
context.pinia // the pinia created with `createPinia()`
context.app // the current app created with `createApp()` (Vue 3 only)
context.store // the store the plugin is augmenting
context.options // the options object defining the store passed to `defineStore()`
// ...
context.store.$subscribe((m, s) => console.log(m, s))
}