API 文档 • 文档
API 文档 / pinia / PiniaPluginContext
接口: PiniaPluginContext<Id, S, G, A>
传递给 Pinia 插件的上下文参数。
类型参数
• Id extends string = string
• S extends StateTree = StateTree
• G = _GettersTree<S>
• A = _ActionsTree
属性
app
app:
App<any>
使用 Vue.createApp() 创建的当前应用程序。
options
options:
DefineStoreOptionsInPlugin<Id,S,G,A>
调用 defineStore() 时定义存储的初始选项。
pinia
pinia:
Pinia
pinia 实例。
store
store:
Store<Id,S,G,A>
当前正在扩展的商店。