会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
a茶色
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
下一页
2021年1月25日
正则校验IP、IP-IP、IP/IP(去重)
摘要: 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茶色
阅读(631)
评论(0)
推荐(0)
2020年11月26日
antd 上传前加提示框
摘要: js: // 规则库上传前检查格式 beforeUploadCheck = (file, fileList) => { return new Promise(function(resolve,reject){ Modal.confirm({ content: intl.get('Intl_uploa
阅读全文
posted @ 2020-11-26 11:37 a茶色
阅读(703)
评论(0)
推荐(0)
2020年11月3日
React Echarts 点击事件(echarts-for-react)
摘要: onclick = { 'click': this.onChartClick.bind(this) } onChartClick(param) { console.log(param) } render() { return ( <div> <ReactEcharts option={option}
阅读全文
posted @ 2020-11-03 15:32 a茶色
阅读(3392)
评论(0)
推荐(0)
2020年8月31日
js 截取指定长度字符串(区分中英文)
摘要: 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茶色
阅读(416)
评论(0)
推荐(1)
2020年8月28日
echarts关系图多次调接口问题
摘要: 使用echarts关系图点击之后,走了很多次接口,发现添加一个off事件就可以解决了,具体如下: renderEcharts = () => { const { location: { query }, fileModel } = this.props; const { fileMd5 } = fi
阅读全文
posted @ 2020-08-28 15:00 a茶色
阅读(555)
评论(0)
推荐(0)
2020年8月12日
手写鱼骨图
摘要: 效果图: 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茶色
阅读(284)
评论(0)
推荐(0)
2020年8月5日
React父组件调用子组件中的方法
摘要: // 父组件 class Parent extends Component { handleChild = ()=> { this.$Child.childConsole(); // this上有了子组件方法 } render() { return ( <div> <Child onRef={(re
阅读全文
posted @ 2020-08-05 18:31 a茶色
阅读(8840)
评论(0)
推荐(1)
2020年7月23日
用antd的List做动态滚动展示
摘要: 项目中需要做一个类似于Table的展示列表,但是需要循环滚动播放列表内容 不多说直接上代码: js部分: export default class RealTime extends PureComponent { state = { sectionDomHeight: 0 } componentDi
阅读全文
posted @ 2020-07-23 14:06 a茶色
阅读(4685)
评论(0)
推荐(1)
2020年7月10日
form表单自定义调接口校验
摘要: // 校验角色名字唯一 getName = (rule, value, callback) => { const { dispatch } = this.props; const { recodes } = this.state; if (value) { //这里调后端接口 dispatch({
阅读全文
posted @ 2020-07-10 13:53 a茶色
阅读(631)
评论(0)
推荐(0)
2020年7月9日
根据最新时间计算过去的时分秒
摘要: constructor(props){ super(props); this.state = { date: Date.now()//获取当前时间戳 }; } componentDidMount() { this.timerID = setInterval( () =>this.tick(), 10
阅读全文
posted @ 2020-07-09 14:10 a茶色
阅读(231)
评论(0)
推荐(0)
上一页
1
2
3
4
下一页
公告