![](https://img-blog.csdnimg.cn/20190918140145169.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
web基础
web入门
前端新手码农
这个作者很懒,什么都没留下…
展开
-
受控组件与非受控组件
react官方推荐文章: https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ 1.受控组件:组件的值由代码控制 ,用户的输入交给组件(的程序),组件负责自己状态和视图的更新 2.非受控组件:组件的值只能由用户设定,我们只能获取组件的值而不能更改,就如下面input,我们只可通过ref获取它的值,而不能去设定 ...原创 2021-07-04 02:28:49 · 139 阅读 · 0 评论 -
jwt的封装
letcrypto=require('crypto');//引入加密程序 constSECRET='xxxxxx';//密钥 classJWT{ constructor(time=0,user='user'){//time为过期时间,单位是小时(number) this.header=this.GeneratorHeader(); this.payload=this.Generatorpayload(time,user) ...原创 2020-09-12 17:50:16 · 416 阅读 · 0 评论