摘要: 阅读全文
posted @ 2019-01-13 11:15 晨光暖日 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 虽然官方的自动校验很好用,但是很多时候还是需要手动控制报错和错误处理,清除手动设置的错误方案是: this.props.form.setFields({ enableTime: { value: values.enableTime, errors: null, }, }); 将errors设为nul 阅读全文
posted @ 2018-10-15 21:05 晨光暖日 阅读(4314) 评论(0) 推荐(0) 编辑
摘要: 方法一: 1 if ($("#checkbox-id").get(0).checked) { 2 // do something 3 } 方法二: if($('#checkbox-id').is(':checked')) { // do something } 方法三: if ($('#checkbox-id').attr('checked')) { // do som... 阅读全文
posted @ 2017-09-28 11:00 晨光暖日 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 常用正则表达式一、校验数字的js正则表达式 1 数字:^[0-9]*$ 2 n位的数字:^\d{n}$ 3 至少n位的数字:^\d{n,}$ 4 m-n位的数字:^\d{m,n}$ 5 零和非零开头的数字:^(0|[1-9][0-9]*)$ 6 非零开头的最多带两位小数的数字:^([1-9][0-9 阅读全文
posted @ 2017-09-01 11:45 晨光暖日 阅读(265) 评论(0) 推荐(0) 编辑
摘要: var $ajax = axios.create();//向服务器发出请求时 //接收服务响应时 阅读全文
posted @ 2017-07-12 10:15 晨光暖日 阅读(2758) 评论(0) 推荐(0) 编辑
摘要: JSON.stringify(jsObj, null, "\t"); // 缩进一个tabJSON.stringify(jsObj, null, 4); // 缩进4个空格 还有这个console.dir();能够输出对象的解析格式 阅读全文
posted @ 2017-07-10 11:34 晨光暖日 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 需要有专门的postcss.config.js放置在根目录,内容是 阅读全文
posted @ 2017-06-22 10:52 晨光暖日 阅读(1232) 评论(0) 推荐(0) 编辑
摘要: word-break:break-all是全面打断,单词都会被劈开。 word-wap:break-word是只打断单词之间。 阅读全文
posted @ 2017-05-31 11:16 晨光暖日 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1.prototype 2.call,apply 3.构造函数继承 阅读全文
posted @ 2017-05-24 10:09 晨光暖日 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1.createhttp 2.commonjs 3.url 4.querystring 5.http 三次握手四次挥手 阅读全文
posted @ 2017-05-23 17:11 晨光暖日 阅读(80) 评论(0) 推荐(0) 编辑