当前位置:网站首页>Electric store stores data
Electric store stores data
2022-06-25 05:09:00 【Lijianyi】
I don't use database scheme to store data , Simply storing a small amount of simple data does not involve the use of databases . The choice here is electron-store As the primary storage tool , This tool is excellent even if it is not the primary storage tool for storing only user startup items .
install electron-store, If you use npm If the installation is unsuccessful, use cnpm install , There's always one for you .
Usage method :
const Store = require('electron-store');
const store = new Store();
// If encrypted storage is required Just use the following
//const store = new Store({encryptionKey: ' Encrypted value '});
store.set('unicorn', ' This is what needs to be stored ');
console.log(store.get('unicorn')); //=> ' This is what needs to be stored '
// Use dot-notation to access nested properties
store.set('foo.bar', true);
console.log(store.get('foo')); //=> {bar: true}
store.delete('unicorn');
console.log(store.get('unicorn')); //=> undefined
This code is in main > index.js Try bailing , But in vue The file is surprisingly difficult to use , I'm stuck here 2 Time of day , After adding the corresponding code, the screen will be blank , The page shows nothing , Don't complain .
The final solution is : Downgrade !
When the version is reduced to 4.0 In the future, all the above problems will be solved ~
Not sure 4.0 Can the above version , I tested it directly 4.0, Interested students can test other versions .
Storage uses json file , My storage address here is C:\Users\Administrator\AppData\Roaming\ Project name \config.json
边栏推荐
- How do the defi protocols perform under this round of stress test?
- Creation and use of MySQL index
- Qdebug June 2022
- Use serialize in egg to read and write split tables
- How PHP gets the user's City
- The SQL response is slow. What are your troubleshooting ideas?
- Characteristics of ES6 arrow function
- Mobile number regular expression input box loses focus verification
- Basic knowledge of web pages (URL related)
- buuctf(pwn)
猜你喜欢

Ranorex Studio 10.1 Crack
![H5 canvas drawing circle drawing fillet [detailed explanation]](/img/6f/a33a323b6cd0918066e8b71a22d841.jpg)
H5 canvas drawing circle drawing fillet [detailed explanation]

XSS (cross site script attack) summary (II)

February 20ctf record

IronOCR 2022.1 Crack

ASEMI三相整流桥的工作原理

Rce code execution & command execution (V)

Detailed summary of position positioning

Qdebug June 2022

Kotlin compose perfect todo project surface rendering background and shadow
随机推荐
2021-03-23
epplus复制模板后打印区域变小的问题
JS function to realize simple calculator
DMA double buffer mode of stm32
小白一键重装官网下载使用方法
PHP calls map API
Virtual honeypot Honeyd installation and deployment
ORA-00800: soft external error
Click to jump out and drag the pop-up window
Teach you to write non maintainable PHP code step by step
CTFHUB SSRF
Object creation and invocation code example
Eyeshot Ultimate 2022 Crack By Xacker
ORA-00800: soft external error
Google Earth Engine(GEE)——全球JRC/GSW1_1/YearlyHistory数据集的批量下载(中国区域)
buuctf(re)
【FLink】access closed classloader classloader. check-leaked-classloader
MySQL prevents Chinese garbled code and solves the problem of Chinese garbled code
Precise delay based on Cortex-M3 and M4 (systick delay of system timer can be used for STM32, aducm4050, etc.)
Database overview