接口:Pinia
pinia.Pinia
Every application must own its own pinia to be able to create stores
层次结构
Pinia
属性
state
• state: Ref
<Record
<string
, StateTree
>>
root state
定义于
方法
install
▸ install(app
): void
参数
Name | Type |
---|---|
app | App <any > |
返回值
void
定义于
use
▸ use(plugin
): Pinia
添加 store 插件来扩展每一个 store
参数
Name | Type | Description |
---|---|---|
plugin | PiniaPlugin | store plugin to add |