一、安装md5包
npm install js-md5 -s
二、main.js中引入,Vue原型链上添加md5为公用方法
import md5 from 'js-md5' //引入
Vue.prototype.$md5 = md5;//添加
三、使用
this.$md5('需要加密的内容')
一、安装md5包
npm install js-md5 -s
二、main.js中引入,Vue原型链上添加md5为公用方法
import md5 from 'js-md5' //引入
Vue.prototype.$md5 = md5;//添加
三、使用
this.$md5('需要加密的内容')