当前位置:网站首页>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
- hough变换检测直线原理(opencv霍夫直线检测)
- Essential Learning for Getting Started with Unity Shader - Transparency Effect
- 7、常见面试口语提问问题汇总
- Groupid(artifact id)
- Small test knife: Go reflection helped me convert Excel to Struct
- 做事软件开发-法的重要性所在以及合理结论的认识
- vb中如何连接mysql_vb怎么连接数据库「建议收藏」
- OpenShift 4 - Deploy Redis Cluster with Operator
猜你喜欢

四象限时间管理有多好用?

工程流体力学复习

Jmeter常用的十大组件

格林美瑞交所IPO:募资3.8亿美元 更多中国企业将赴欧洲上市

The meaning of node_exporter performance monitoring information collection in Prometheus

为什么毕业季不要表白?

使用 Chainlink Keepers 实现智能合约函数的自动化执行

《微信小程序-进阶篇》Lin-ui组件库源码分析-Icon组件

Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)

梅克尔工作室-第一次
随机推荐
女性服务社群产品设计
思路迪医药冲刺港股:5个月亏2.9亿 泰格医药与先声药业是股东
Jmeter常用的十大组件
OpenShift 4 - Deploy Redis Cluster with Operator
Groupid(artifact id)
TRACE32——C源码关联
最小费用最大流问题详解
TRACE32 - C source code association
LeetCode二叉树系列——110.平衡二叉树
R语言的画图代码及差异性分析[通俗易懂]
DeepLab Series Learning
做事软件开发-法的重要性所在以及合理结论的认识
公告
The R language ggstatsplot package ggbarstats function visualizes bar charts, and adds hypothesis test results (including sample number, statistics, effect size and its confidence interval, significan
架构实战营模块8消息队列表结构设计
Message queue data storage MySQL table design
radiobutton的使用
看交互设计如何集成到Scrum敏捷流程中
MANIFEST.MF文件(PDB文件)
高等数学——常用不定积分公式