当前位置:网站首页>Pinia plugin persist, a data persistence plug-in of Pinia
Pinia plugin persist, a data persistence plug-in of Pinia
2022-07-26 02:23:00 【Weave_ network】
install
yarn add pinia-plugin-persist
To configure
Vue2 Use in
stay store New under file
main.ts
import Vue from 'vue'
import vueCompositionApi from '@vue/composition-api'
import {
createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
import App from './App.vue'
const pinia = createPinia()
pinia.use(piniaPersist)
Vue.use(vueCompositionApi)
Vue.use(pinia)
new Vue({
pinia,
render: h => h(App),
}).$mount('#app')
Vue3
stay store New under file
main.ts
import {
createApp } from 'vue'
import {
createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
const pinia = createPinia()
pinia.use(piniaPersist)
createApp({
})
.use(pinia)
.mount('#app')
Typescript definitions
// tsconfig.json file
{
"compilerOptions": {
"types": [
"pinia-plugin-persist"
]
},
}
边栏推荐
- [cloud native] 4.1 Devops foundation and Practice
- 1. Mx6ul core module use serial TF card read / write test (V)
- MySQL(4)
- scipy.sparse.vstack
- 增删改查业务的快速上手
- numpy.sort
- I came to the library applet check-in process analysis
- 博云容器云、DevOps 平台斩获可信云“技术最佳实践奖”
- [C language brush leetcode] 814. Binary tree pruning (m)
- [C language brush leetcode] 735. Planetary collision (m)
猜你喜欢

Business Intelligence BI full analysis, explore the essence and development trend of Bi

Quick start of adding, deleting, modifying and checking business

C unit test

增删改查业务的快速上手
![[paper reading] coat: CO scale conv attentional image transformers](/img/d4/13ac8cdce07999d4fd51aa23173190.png)
[paper reading] coat: CO scale conv attentional image transformers

1. Mx6ul core module use serialization - view system information (II)

prometheus+blackbox-exporter+grafana 监控服务器端口及url地址

Exclusive interview with ringcentral he Bicang: empowering future mixed office with innovative MVP

I.MX6UL核心模块使用连载-Iot-6ULX核心模块简要介绍 (一)

Sword finger offer 28. symmetric binary tree
随机推荐
图解B+树的插入过程
Implementation of Ti am335x industrial control module network and file system nfs
Mandatory interview questions: 1. shallow copy and deep copy_ Deep copy
18_请求文件
National standard gb28181 protocol video platform easygbs message pop-up mode optimization
Prometheus+blackbox exporter+grafana monitoring server port and URL address
Digital warehouse: on the construction practice of digital warehouse in banking industry
Are you still using ==0 null equal to judge null values? How much do you know about isempty and isblank
信息系统项目管理师---第十章沟通管理和干系人管理历年考题
Exclusive interview with ringcentral he Bicang: empowering future mixed office with innovative MVP
Overview of pytoch's API
Wechat applet decryption and unpacking to obtain source code tutorial
numpy.sort
[early knowledge of activities] list of recent activities of livevideostack
栈题目:文件的最长绝对路径
scipy.sparse.csr_ matrix
[paper reading] coat: CO scale conv attentional image transformers
数仓:浅谈银行业的数仓构建实践
What does the Red Cross in the SQL editor mean (toad and waterdrop have been encountered...)
(CVPR 2019) GSPN: Generative Shape Proposal Network for 3D Instance Segmentation in Point Cloud