SoFunction
Updated on 2025-04-03

The js-base64 method is introduced into the vue project

vue introduces js-base64

1. Install md5 dependencies

npm install --save js-base64

or

cnpm install --save js-base64

2. Use md5 directly in components that need to use md5

let Base64 = require('js-base64').Base64;
('dsdsdSd');
('3232131');
('6545hgdfg');
('543hfghfhfhggfh');

Decoding with Base64 encoding

1. Download the package

npm install js-base64 -S
// orcnpm install js-base64 -S

2. Reference in the file you need to decode (encode)

let Base64 = require('js-base64').Base64

3. How to use

// Decodevar a = ()
// Encodingvar b = ()

The above is personal experience. I hope you can give you a reference and I hope you can support me more.