API 文档 / pinia / Pinia

接口:Pinia

pinia.Pinia

Every application must own its own pinia to be able to create stores

层次结构

属性

state

state: Ref<Record<string, StateTree>>

root state

定义于

pinia/src/rootStore.ts:51

方法

install

install(app): void

参数

NameType
appApp<any>

返回值

void

定义于

pinia/src/rootStore.ts:46


use

use(plugin): Pinia

添加 store 插件来扩展每一个 store

参数

NameTypeDescription
pluginPiniaPluginstore plugin to add

返回值

Pinia

定义于

pinia/src/rootStore.ts:58