当前位置:网站首页>11 pinia使用
11 pinia使用
2022-07-31 15:06:00 【是云呀!】
一,pinia与vuex区别
二,使用
npm i pinia
在src目录下创建stores文件夹(目前pinia还没有形成统一命名规范,因为pinia可以创建多个store,所以叫stores),在创建index文件作为入口文件
定义某个模块数据
store名称要保持唯一,也是devtools的依据
返回的函数命名规范是use加store的名称
三,state
操作state
四,getters使用
访问getters
五,actions使用
边栏推荐
- 工程水文学试卷
- R语言向前或者向后移动时间序列数据(自定义滞后或者超前的期数):使用dplyr包中的lag函数将时间序列数据向前移动一天(设置参数n为正值)
- The paper manual becomes 3D animation in seconds, the latest research of Wu Jiajun of Stanford University, selected for ECCV 2022
- Trigonometric identity transformation formula
- 为什么毕业季不要表白?
- 思路迪医药冲刺港股:5个月亏2.9亿 泰格医药与先声药业是股东
- R语言ggstatsplot包ggbarstats函数可视化条形图、并添加假设检验结果(包含样本数、统计量、效应大小及其置信区间、显著性、组间两两比较、贝叶斯假设)、检验结果报告符合APA标准
- 公告
- How useful is four-quadrant time management?
- charles进行弱网测试(app弱网测试怎么做)
猜你喜欢
abaqus find contact pairs报错:surface name is already in use
Essential Learning for Getting Started with Unity Shader - Transparency Effect
使用 Chainlink Keepers 实现智能合约函数的自动化执行
乡村基冲刺港交所:5个月期内亏2224万 SIG与红杉中国是股东
Female service community product design
The meaning of node_exporter performance monitoring information collection in Prometheus
三、数组
华医网冲刺港股:5个月亏2976万 红杉与姚文彬是股东
Five dimensions to start MySQL optimization
AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware
随机推荐
格林美瑞交所IPO:募资3.8亿美元 更多中国企业将赴欧洲上市
Message queue data storage MySQL table design
The meaning of node_exporter performance monitoring information collection in Prometheus
公告
网银被盗?这篇文章告诉你如何安全使用网银
工程水文学名词解释总结
Advanced Mathematics - Commonly Used Indefinite Integral Formulas
STM32(十)------- SPI通信
力扣:56. 合并区间
The paper manual becomes 3D animation in seconds, the latest research of Wu Jiajun of Stanford University, selected for ECCV 2022
TRACE32 - Common Operations
Matlab矩阵基本操作(定义,运算)
R language ggplot2 visualization: use the ggboxplot function of the ggpubr package to visualize the box plot, use the font function to customize the font size, color, style (bold, italic) of the legen
力扣:738.单调递增的数字
Introduction to BigDecimal, common methods
自动化测试如何创造业务价值?
MySql总结
R语言的画图代码及差异性分析[通俗易懂]
【CUDA学习笔记】初识CUDA
英文语法-时与态