@neosjs/pinia-sync-store
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

@neosjs/pinia-sync-store

Npm Version Npm Week Downloads Npm Month Downloads Minzip License pinia sync store

多窗口间 pinia store 共享数据

安装

pnpm add @neosjs/pinia-sync-store

npm install @neosjs/pinia-sync-store

yarn add @neosjs/pinia-sync-store

使用

import type { App } from 'vue'
import { createPinia } from 'pinia'
import { createPiniaSyncStore } from '@neosjs/pinia-sync-store'

const store = createPinia()
const install = (app: App<Element>): any => {
  // 使用插件
  store.use(createPiniaSyncStore({
    enable: true, // 是否启用
    persist: false // 是否持久化
  }))
  app.use(store)
}
export { install, store }

License

MIT License © 2021-PRESENT NeosJS

Dependencies (0)

    Dev Dependencies (11)

    Package Sidebar

    Install

    npm i @neosjs/pinia-sync-store

    Weekly Downloads

    182

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    7 kB

    Total Files

    6

    Last publish

    Collaborators

    • bobo.xiao