步骤: npm安装: $ npm install js-md5 --save 在main.js文件中将md5转换成vue原型 import md5 from 'js-md5'; Vue.prototype.$md5 = md5; 在需要用到的文件中直接使用: this.password=