摘要: let ipRegex = /^(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|[1-9])\.((([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))))\.((([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0- 阅读全文
posted @ 2021-01-25 11:21 a茶色 阅读(532) 评论(0) 推荐(0) 编辑
摘要: js: // 规则库上传前检查格式 beforeUploadCheck = (file, fileList) => { return new Promise(function(resolve,reject){ Modal.confirm({ content: intl.get('Intl_uploa 阅读全文
posted @ 2020-11-26 11:37 a茶色 阅读(654) 评论(0) 推荐(0) 编辑
摘要: onclick = { 'click': this.onChartClick.bind(this) } onChartClick(param) { console.log(param) } render() { return ( <div> <ReactEcharts option={option} 阅读全文
posted @ 2020-11-03 15:32 a茶色 阅读(3083) 评论(0) 推荐(0) 编辑
摘要: function cutbytestr(str, len) { var str_length = 0; var str_len = 0; var str_cut; str_cut = new String(); str_len = str.length; for (var i = 0; i < st 阅读全文
posted @ 2020-08-31 10:12 a茶色 阅读(379) 评论(0) 推荐(1) 编辑
摘要: 使用echarts关系图点击之后,走了很多次接口,发现添加一个off事件就可以解决了,具体如下: renderEcharts = () => { const { location: { query }, fileModel } = this.props; const { fileMd5 } = fi 阅读全文
posted @ 2020-08-28 15:00 a茶色 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 效果图: css: .box { display: flex; align-items: center; padding: 140px 0; .target { width: 120px; height: 120px; background: #198ce1; border-radius: 50%; 阅读全文
posted @ 2020-08-12 09:54 a茶色 阅读(248) 评论(0) 推荐(0) 编辑
摘要: // 父组件 class Parent extends Component { handleChild = ()=> { this.$Child.childConsole(); // this上有了子组件方法 } render() { return ( <div> <Child onRef={(re 阅读全文
posted @ 2020-08-05 18:31 a茶色 阅读(8753) 评论(0) 推荐(1) 编辑
摘要: 项目中需要做一个类似于Table的展示列表,但是需要循环滚动播放列表内容 不多说直接上代码: js部分: export default class RealTime extends PureComponent { state = { sectionDomHeight: 0 } componentDi 阅读全文
posted @ 2020-07-23 14:06 a茶色 阅读(4334) 评论(0) 推荐(1) 编辑
摘要: // 校验角色名字唯一 getName = (rule, value, callback) => { const { dispatch } = this.props; const { recodes } = this.state; if (value) { //这里调后端接口 dispatch({ 阅读全文
posted @ 2020-07-10 13:53 a茶色 阅读(604) 评论(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茶色 阅读(210) 评论(0) 推荐(0) 编辑