- 博客(3)
- 收藏
- 关注
原创 mpvue vuex持久化缓存
mpvue vuex持久化缓存 , 使用vuex-persistedstate插件 npm install vuex-persistedstate --save 在store/index.js中添加plugins: export default new Vuex.Store({ state, mutations, getters, actions, plugins: [ createPersistedState({ stor
2021-03-15 11:33:24 156
转载 async
async 函数 含义 ES2017 标准引入了 async 函数,使得异步操作变得更加方便。 async 函数是什么?一句话,它就是 Generator 函数的语法糖。 前文有一个 Generator 函数,依次读取两个文件。 const fs = require('fs'); const readFile = function (fileName) { return new Promis...
2019-07-10 14:30:16 111
转载 let和const命令
let 和 const 命令 let 命令 基本用法 ES6 新增了let命令,用来声明变量。它的用法类似于var,但是所声明的变量,只在let命令所在的代码块内有效。 { let a = 10; var b = 1; } a // ReferenceError: a is not defined. b // 1 上面代码在代码块之中,分别用let和var声明了两个变量。然后在代码块之...
2019-07-10 14:26:31 65
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人