1.0.1 • Published 10 months ago

@neosjs/pinia-sync-store v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@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

1.0.1

10 months ago

1.0.0

10 months ago