前端
my_wings
这个作者很懒,什么都没留下…
展开
-
antd Input输入框 onChange防抖动失效解决方法
delayedChange = debounce((value) => { // do something...}, 500);handleChange = (event) => { delayedChange(event.target.value);};<Input onChange={this.handleChange}></Input>原创 2020-09-07 21:39:05 · 5669 阅读 · 0 评论 -
React 字符串自动换行展示
<span style={{whiteSpace:‘pre-line’}}>{log}原创 2020-07-10 11:35:59 · 4805 阅读 · 0 评论 -
ant design of react 解决div内容不溢出,并自动换行
style={{ overflow:“hidden”,wordWrap:“break-word”}}1、wordBreak:“break-all”自动换行,如果该行末端有个英文单词很长,会把单词截断。2、wordWrap:“break-word”例子与上面一样,但区别就是它会把整个单词看成一个整体,如果该行末端宽度不够显示整个单词,它会自动把整个单词放到下一行,而不会把单词截断掉的。...原创 2020-01-09 18:13:26 · 3652 阅读 · 0 评论 -
ant design 解决字体溢出和加横向滚动条
style={{ marginLeft: 10, marginTop: 10,marginRight: 5, marginBottom: 10,overflow:“hidden”,overflowX:“scroll”}}overflow:"hidden” 解决字体溢出overflowX:"scroll“ 加横向滚动条原创 2019-12-26 10:21:10 · 3709 阅读 · 1 评论 -
[HPM] Error occurred while trying to proxy request /login/account from localhost:8000 to localhost:8
[HPM] Error occurred while trying to proxy request /login/account from localhost:8000 to localhost:8888/api/ (ENOTFOUND) (https://nodejs.org/api/errors.html#errors_common_system_errors)antd pro 2.0 ...原创 2019-01-02 15:19:56 · 20798 阅读 · 2 评论 -
如何解决Link组件设置target后,页面跳转后,state和query中的参数失效
失效的情况: <Link to={{pathname:'/gui/collection',query:{databaseName:item.name}}} target="_blank"> 查询 </Link>解决方案:<Link to={{pathname:`/gui/collection?databaseName=${item.name}`}...原创 2019-05-08 16:14:45 · 2970 阅读 · 3 评论 -
React中,使用codeMirror设置代码高度自适应
在对应的less文件下,设置样式:global .CodeMirror { /* Set height, width, borders, and global font properties here */ font-family: monospace; height: auto; color: black; direction: ltr;}...原创 2019-05-15 14:21:52 · 4227 阅读 · 0 评论 -
ant design中table组件的filter和sorter,如何在外部控制?
在table的onchange属性中,将filter和sorter放入state中<Table columns={columns} dataSource={data} onChange={this.handleTableChange} />,handleTableChange:handleTa...原创 2019-05-15 14:32:40 · 17958 阅读 · 6 评论