vue-cli整合vuex的时候,修改actions和mutations,实现热部署的方法
作者:BeArchitect 时间:2024-05-13 09:13:16
在store.js里面添加如下的代码就可以了:
// 热重载
if (module.hot) {
// 指定要监控的文件
module.hot.accept(['./mutations'], () => {
const mutations = require('./mutations').default
// Vuex 提供的热重载接口
store.hotUpdate({
mutations
})
})
}
来源:https://blog.csdn.net/s8460049/article/details/53812199
标签:vue-cli,vuex,actions,mutations
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Pandas聚合运算和分组运算的实现示例
2023-11-10 03:49:14
python中可以声明变量类型吗
2022-02-13 19:44:05
再谈动态添加样式规则
2009-09-02 13:10:00
Mysql中如何删除某个字段的最后四个字符
2024-01-28 22:44:07
Python学习之configparser模块的使用详解
2022-07-21 23:21:25
![](https://img.aspxhome.com/file/2023/0/66380_0s.png)
Python中使用logging模块代替print(logging简明指南)
2023-05-13 16:02:04
python 将numpy维度不同的数组相加相乘操作
2022-03-26 06:14:06
![](https://img.aspxhome.com/file/2023/5/93425_0s.jpg)
pytorch中的weight-initilzation用法
2022-03-22 23:28:24
python利用numpy存取文件案例教程
2023-05-22 03:55:53
![](https://img.aspxhome.com/file/2023/5/95295_0s.png)
Python的Flask站点中集成xhEditor文本编辑器的教程
2023-04-05 00:41:06
![](https://img.aspxhome.com/file/2023/6/72236_0s.jpg)
Golang切片删除指定元素的三种方法对比
2024-02-16 00:14:21
MySQL创建用户与授权方法
2024-01-19 02:43:55
连接pandas以及数组转pandas的方法
2021-11-12 12:12:09
mysql 8.0.12 winx64详细安装教程
2024-01-26 12:37:19
![](https://img.aspxhome.com/file/2023/2/116742_0s.jpg)
教你两步解决conda安装pytorch时下载速度慢or超时的问题
2022-04-12 17:19:59
![](https://img.aspxhome.com/file/2023/5/110435_0s.png)
Python chardet库识别编码原理解析
2021-03-18 16:41:54
asp下用OracleInProcServer完成对Oracle的连接和操作
2008-04-13 07:10:00
Mootools常用方法扩展(四)
2009-02-21 11:12:00
Python函数式编程之返回函数实例详解
2021-10-31 03:46:26
![](https://img.aspxhome.com/file/2023/2/80402_0s.png)
浅谈MySQL 有哪些死锁场景
2024-01-13 13:45:54