摘要:
需求: 今天发布的消息则返回“今天 12:12”,昨天的话则返回“昨天 20:20”,其他日期则返回3-13或2020-3-13(去年的情况下) 代码: getPublishTime:()=> (time,full)=>{ let currentTime = new Date(); time = n 阅读全文
摘要:
原文: Arrow functions bind this to the context in which you create the arrow function. const foo = (args) => {/* code */}; is a shortcut for const foo = 阅读全文