摘要: It's because of your IDE! Make sure you have added automatic imports such as If so, remove them. 阅读全文
posted @ 2018-11-27 10:45 begin256 阅读(2033) 评论(0) 推荐(0) 编辑
摘要: function timestampToTime(timestamp) { var date = new Date(timestamp * 1000); //timestamp 为10位需*1000,timestamp 为13位的话不需乘1000 var Y = date.getFullYear() 阅读全文
posted @ 2018-11-25 19:26 begin256 阅读(3204) 评论(0) 推荐(0) 编辑
摘要: index.js: import React from 'react'; import ReactDOM from 'react-dom'; import CardSecond from './CardSecond'; import './index.css'; ReactDOM.render( < 阅读全文
posted @ 2018-11-19 22:01 begin256 阅读(5095) 评论(0) 推荐(0) 编辑
摘要: location 有可能是一个‘’,''.split() 将输出[""],是个含有空字符串的数组,而[]是个什么都没有的数组,两者不同。 code: change initialValue from : initialValue: location.split(',') || [] to: init 阅读全文
posted @ 2018-11-13 14:51 begin256 阅读(1395) 评论(0) 推荐(0) 编辑