07 2020 档案

摘要:项目中需要做一个类似于Table的展示列表,但是需要循环滚动播放列表内容 不多说直接上代码: js部分: export default class RealTime extends PureComponent { state = { sectionDomHeight: 0 } componentDi 阅读全文
posted @ 2020-07-23 14:06 a茶色 阅读(4698) 评论(0) 推荐(1)
摘要:// 校验角色名字唯一 getName = (rule, value, callback) => { const { dispatch } = this.props; const { recodes } = this.state; if (value) { //这里调后端接口 dispatch({ 阅读全文
posted @ 2020-07-10 13:53 a茶色 阅读(647) 评论(0) 推荐(0)
摘要:constructor(props){ super(props); this.state = { date: Date.now()//获取当前时间戳 }; } componentDidMount() { this.timerID = setInterval( () =>this.tick(), 10 阅读全文
posted @ 2020-07-09 14:10 a茶色 阅读(232) 评论(0) 推荐(0)
摘要:calc(50%-200px) => 不生效 calc()计算中的两个值必须同运算符号之间存在空格,否则不会起作用 calc(50% - 200px) => 生效 阅读全文
posted @ 2020-07-09 10:11 a茶色 阅读(596) 评论(0) 推荐(0)
摘要:这种情况一般是数据在传递的过程中类型发生了变化,用Number()转化一下数字类型就好了. moment(Number(queryParams.timeBegin)) 阅读全文
posted @ 2020-07-07 11:56 a茶色 阅读(3364) 评论(0) 推荐(1)
摘要:var now = new Date(); var year = now.getFullYear(); //得到年份 var month = now.getMonth();//得到月份 var date = now.getDate();//得到日期 var day = now.getDay();// 阅读全文
posted @ 2020-07-03 14:25 a茶色 阅读(141) 评论(0) 推荐(0)
摘要:echarts里有个属性是axisLabel,当其为1时会隔行显示,设为0时会强制显示所有.示例: xAxis: { data: totalLineChart?totalLineChart.x:[], axisLine: { lineStyle: { color: '#8E8E93' } }, ax 阅读全文
posted @ 2020-07-02 17:47 a茶色 阅读(1629) 评论(0) 推荐(0)