当前位置:网站首页>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 pinia
Create 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
边栏推荐
猜你喜欢
Architecture actual combat battalion module 8 message queue table structure design
架构实战营模块8消息队列表结构设计
Recommendation System - Recall Phase - 2013: DSSM (Twin Towers Model) [Embedding (Semantic Vector) Recall] [Microsoft]
基于极限学习机(ELM)进行多变量用电量预测(Matlab代码实现)
NC | 斯坦福申小涛等开发数据可重复分析计算框架TidyMass
网银被盗?这篇文章告诉你如何安全使用网银
LeetCode二叉树系列——110.平衡二叉树
Getting started with UnityShader (3) - Unity's Shader
学习笔记12--路径-速度分解法之局部路径搜索
TRACE32——C源码关联
随机推荐
SQL、HQL、JPQL 到底有什么区别
RecyclerView高效使用第二节
QGIS 加载WMS数据,重新投影
JVM参数解析 Xmx、Xms、Xmn、NewRatio、SurvivorRatio、PermSize、PrintGC「建议收藏」
WPF项目--控件入门基础用法,必知必会XAML
修改SQL语言实现Mysql 多表关联查询优化
使用 Chainlink Keepers 实现智能合约函数的自动化执行
看交互设计如何集成到Scrum敏捷流程中
TRACE32——基于SNOOPer的变量记录
R语言ggstatsplot包ggbarstats函数可视化条形图、并添加假设检验结果(包含样本数、统计量、效应大小及其置信区间、显著性、组间两两比较、贝叶斯假设)、检验结果报告符合APA标准
Female service community product design
【CUDA学习笔记】初识CUDA
Nuget package and upload tutorial
网银被盗?这篇文章告诉你如何安全使用网银
Small test knife: Go reflection helped me convert Excel to Struct
最小费用最大流问题详解
7、常见面试口语提问问题汇总
Gorm—Go语言数据库框架
思路迪医药冲刺港股:5个月亏2.9亿 泰格医药与先声药业是股东
Public Key Retrieval is not allowed error solution when DBeaver connects to MySQL 8.x