1.安装依赖
cnpm(npm) install --save js-base64
2.应用
import { Base64 } from 'js-base64';
//加密
getEncode(){
console.log('加密',Base64.encode('12'));
},
//解密
getDecode(){
let temp = Base64.encode('12');
console.log('解密:',Base64.decode(temp));
}
2021-07-26 20:28:51
1.安装依赖
cnpm(npm) install --save js-base64
2.应用
import { Base64 } from 'js-base64';
//加密
getEncode(){
console.log('加密',Base64.encode('12'));
},
//解密
getDecode(){
let temp = Base64.encode('12');
console.log('解密:',Base64.decode(temp));
}