electron 端的持久化引擎。
# npm
npm install foca-electron-storage
# yarn
yarn add foca-electron-storage
# pnpm
pnpm add foca-electron-storage
import { store } from 'foca';
+import { electronStorage } from 'foca-electron-storage';
store.init({
persist: [
{
key: 'my-project',
version: '1',
+ engine: electronStorage,
models: [],
},
],
});
也可以定制参数
import { store } from 'foca';
+import { createElectronStorage } from 'foca-electron-storage';
store.init({
persist: [
{
key: 'my-project',
version: '1',
+ engine: createElectronStorage({...}),
models: [],
},
],
});