当前位置:网站首页>11 pinia use
11 pinia use
2022-07-31 15:12:00 【It's a cloud!】
One, the difference between pinia and vuex

Second, use
npm i piniaCreate a stores folder in the src directory (pinia has not yet formed a unified naming convention, because pinia can create multiple stores, so it is called stores), and create an index file as an entry file


Define a certain module data
The name of the store must be unique, which is also the basis of devtools
The returned function naming convention is the name of use plus store



Three, state
Operation state

Four, getters use

Access getters


Five, actions use


边栏推荐
猜你喜欢

三、数组

Public Key Retrieval is not allowed error solution when DBeaver connects to MySQL 8.x

Kubernetes原理剖析与实战应用手册,太全了

Ubantu专题5:设置静态ip地址

leetcode303场周赛复盘

NC | 中国农大草业学院杨高文组揭示发现多因子干扰会降低土壤微生物多样性的积极效应...

01 邂逅typescript,环境搭建

Architecture actual combat battalion module 8 message queue table structure design

学习笔记12--路径-速度分解法之局部路径搜索

Word表格转到Excel中
随机推荐
R language ggplot2 visualization: use the ggboxplot function of the ggpubr package to visualize the grouped box plot, use the ggpar function to change the graphical parameters (caption, add, modify th
vb中如何连接mysql_vb怎么连接数据库「建议收藏」
Getting started with UnityShader (3) - Unity's Shader
微信聊天记录中搜索红包
01 邂逅typescript,环境搭建
2021 OWASP TOP 10 Vulnerability Guide
公告
Node实现数据加密
为什么黑客领域几乎一片男生?
梅克尔工作室-第一次
Groupid(artifact id)
DBeaver连接MySQL 8.x时Public Key Retrieval is not allowed 错误解决
NC | 斯坦福申小涛等开发数据可重复分析计算框架TidyMass
Destruction order of thread_local variables
名创优品斥资6.95亿购买创始人叶国富所持办公楼股权
Gorm—Go语言数据库框架
Word表格转到Excel中
【MySQL】Mysql范式及外键作用
Web自动化实战——Selenium4(自动化测试环境的搭建)
AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware