09 2020 档案

摘要:js观察者模式 // config/Event.js class Event { handlers; constructor() { this.handlers={} } on (type, fn) { this.handlers[type] = this.handlers[type] || []; 阅读全文
posted @ 2020-09-25 09:50 happynood 阅读(94) 评论(0) 推荐(0)
摘要:md5是前端常见的加密方式,简单的数字,字母加密很容易破解,因此通常加入“盐”,使他不容易被破解。 Install npm install utility Usage const utils = require('utility'); function md5Pwd(pwd) { const sal 阅读全文
posted @ 2020-09-18 16:26 happynood 阅读(143) 评论(0) 推荐(0)
摘要:使用修饰器 安装依赖,注意babel版本号。 npm install @babel/plugin-proposal-decorators --save 配置babel "babel": { "plugins": [ [ "@babel/plugin-proposal-decorators", { " 阅读全文
posted @ 2020-09-18 16:16 happynood 阅读(358) 评论(0) 推荐(0)