03 2020 档案

摘要:先看看 react blog, 看官方怎么说的In React blog post: URLs starting with javascript: are a dangerous attack surface because it’s easy to accidentally include uns 阅读全文
posted @ 2020-03-30 14:25 无人问及 阅读(7735) 评论(1) 推荐(0)
摘要:获取当前时间 let now = new Date(); 获取三天前时间 let threeNow = new Date(now.getTime() - 24*60*60*1000*3); 时间格式化 let nowStr = now.format("yyyy-MM-dd hh:mm:ss"); l 阅读全文
posted @ 2020-03-24 11:31 无人问及 阅读(212) 评论(0) 推荐(0)
摘要:Date.prototype.format = function (fmt) { if (Number.isNaN(this.getMonth()) || Number.isNaN(this.getDate()) || Number.isNaN(this.getHours())) return '' 阅读全文
posted @ 2020-03-24 11:24 无人问及 阅读(117) 评论(0) 推荐(0)
摘要:1 getAll(id){ 2 axios.defaults.withCredentials=true; 3 axios.get(`$请求地址}`) 4 .then(result => { 5 console.info( result ); 6 }).catch(error => { 7 conso 阅读全文
posted @ 2020-03-23 20:57 无人问及 阅读(7031) 评论(0) 推荐(0)
摘要:1 if判断,满足条件才渲染 1 if(x < 2) return <div>页面</div> 2 return null ; 2 三元运算符 1 return ( 2 <div> 3 { x <2 4 ? <ItemEdit item={item} /> 5 : <ItemView item={i 阅读全文
posted @ 2020-03-23 09:40 无人问及 阅读(126) 评论(0) 推荐(0)