2018.12.04
ant组件 Bug
1 | 表格数据更改后,前端不会实时更新 |
2018.12.05
localstorage 没有数组结构
1 | localstroage.getItem('visited').split(',') |
2018.12.06
当播放组件不适应:
1 | 1.组件inline-block |
2018.12.07
1.linux命令
1 | :q 退出 |
2.
1 | Duplicate keys detected:'京东',This may cause an update error. |
2018.12.10
1.设置下拉框的变量,用数字代替
1 | winner=['1','2'] 取代 winner=['角色1','角色2'] |
2.变量尽量完整
3.功能调整实现后,建议先检查一遍这几个功能方法,然后有可能简单整理重构第一次
4.方法可传多个参数,就是一个方法用作多个地方,比如上传和修改
5.想分开哪行传入哪个upload
1 | <el-upload :http-request:'test'> |
2018.12.11
1.添加文本,输入字总是莫名其妙消失
1 | 因为@change=test(row,false) |
2.解决两个页面共同调试
1 | 一个页面开匿名模式(无痕) |
3.改host名
1 | 1.win+R -> drivers |
2018.12.12
1.按多个字符切割
1 | data.split(/[\t\n]/) |
2.eval() 括号内是可执行代码,风险比较大
eval(‘fd.’ + key + ‘=”‘ +char + ‘“‘)
还差 react dns 批量处理 分页
2018.12.13
eval()
1 | a="[{ questionId: 1,index: 1,type: 0,option:'第一个:艺术家,',url: null,optionFlag: '艺术家',correct: true},{questionId: 1,index: 2,type: 0,option: '第二个:水晶饺',url: null,optionFlag: '水晶饺',correct: false}]" |
2018.12.17
纯前端分页
- 创建一个计算变量 为 curry_corpus.
- 创建总页码(total),当前页(page),每页页数(limit) 这三个变量
- 创建一个 map,关联curpus ID和原本全量curpus的Index
然后 curry_corpus 的逻辑是 ,截取 (page-1)*limit 到 page * limit
切换页面直接修改 page。
后台有接口的话,直接传limit offset,没有的话,用slice()
2018.12.28
1.css
1 | :class="{red:corpusIdsText==='缺音频'}" |
2.ant
1 | <a-table :dataSource='corpusArr'...> |
3.写样式
- 尽量以视觉划分
- 尽量用通用class,加一个