Skip to content
该翻译已同步到了 的版本,其对应的 commit hash 是 02a476d。

API 文档 / pinia / Pinia

接口:Pinia ​

pinia.Pinia

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

层次结构 ​

属性 ​

安装 ​

• install: (app: App<any>) => void

类型声明 ​

▸ (app): void

参数 ​
NameType
appApp<any>
返回值 ​

void


state ​

• state: Ref<Record<string, StateTree>>

根 state

方法 ​

use ​

▸ use(plugin): Pinia

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

参数 ​

NameTypeDescription
pluginPiniaPluginstore plugin to add

返回值 ​

Pinia

Released under the MIT License.