1.1.2 • Published 2 years ago
@wy_fys/my_storage v1.1.2
@wy_fys/my_storage
storage加密储存
Installation
npm i @wy_fys/my_storage
Import
vite.config.js内导入
import Storage from "@wy_fys/my_storage";
const storage=new Storage(process.env.NODE_ENV);//区分开发环境和生产环境
app.config.globalProperties.$storage=storage;//全局引用
Using
1、字段使用方法
let data='这是测试'
const encryText=this.$storage.encrypt(data);
console.log('加密',encryText)
const decryptText=this.$storage.decrypt(encryText)
console.log(decryptText)