上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页

2020年8月11日

antd 踩坑:为什么 Tree defaultExpandAll defaultExpandedKeys 在刷新后会失效?

摘要: 原因其实很简单。 <Tree onSelect={handleTreeClick} defaultExpandedKeys={[rootOrgId]}> {this.renderTreeNodes(OrgTreeData.children)} </Tree> renderTreeNodes = da 阅读全文

posted @ 2020-08-11 20:07 fox_charon 阅读(4746) 评论(0) 推荐(0)

antd踩坑: Select 模糊搜索

摘要: import { Select } from 'antd'; const { Option } = Select; function onChange(value) { console.log(`selected ${value}`); } function onBlur() { console.l 阅读全文

posted @ 2020-08-11 20:00 fox_charon 阅读(8265) 评论(0) 推荐(0)

2020年7月19日

antd4 源码学习 :表单

摘要: 首先。vue 的数据流是双向的,而 react 的数据流是单向的。 这意味着什么? 这意味着,vue 中,子组件可以用 emit 把数据更新传给父组件。而 react 中, 需要通过父组件把回调函数传给子组件实现类似功能。 为什么要说这个?因为框架的设计会影响到组件库的设计。组件库的设计必须配合框架 阅读全文

posted @ 2020-07-19 16:19 fox_charon 阅读(903) 评论(0) 推荐(1)

2020年6月24日

echarts 踩坑 : id必须不同

摘要: 我们可能用react前端框架开发项目。 也就是组件化开发。 一个页面里可能有很多组件。 而echarts是寻找特定ID的DOM去渲染的。 也就是说,如果整个页面。包括所有页面组件,有id相同的DOM,只会渲染其中一个DOM。 就会出现某些图表没有渲染的情况。 结论:一个页面中,所有组件的所有图表的I 阅读全文

posted @ 2020-06-24 19:15 fox_charon 阅读(1897) 评论(0) 推荐(0)

2020年5月17日

javascript算法 最短路径问题

摘要: var obj = { 1: [2, 3], 2: [1, 4, 5], 3: [1, 7, 8], 4: [2, 7], 7: [4, 8], } var 起点 = 1 var 终点 = 8 var f = 起点 => 终点 => 数据 => 路径 => { if (起点 == 终点) retur 阅读全文

posted @ 2020-05-17 14:17 fox_charon 阅读(804) 评论(0) 推荐(0)

2020年4月28日

javascript : 找到一个树型数据的一个节点及其所有父节点

摘要: 如题。 (function () { let tree = { "id": 0, "label": "all", "children": [ { "children": [ { "children": [ { "id": 210, "label": "dashboard_panel" }, { "c 阅读全文

posted @ 2020-04-28 20:49 fox_charon 阅读(1030) 评论(0) 推荐(0)

2020年4月21日

IE11 CSS hack

摘要: IE11 怎么做 CSS hack ? 很简单。 @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { .ant-form-item-control .ant-input { line-height: 0 阅读全文

posted @ 2020-04-21 17:19 fox_charon 阅读(988) 评论(0) 推荐(0)

2020年4月14日

antd实战:表单上传,文件列表的过滤与限制。

摘要: 用表单上传组件最痛苦的地方是: 他的诸多行为与纯上传组件不一样,而表单的文档关于这一块基本上没有提,只能自己试。 比如我想做一个上传前的拦截。 beforeUpload: (file, fileList) => { const isJpgOrPng = file.type 'image/jpeg' 阅读全文

posted @ 2020-04-14 11:20 fox_charon 阅读(1196) 评论(0) 推荐(0)

antd踩坑:日期选择器的可选日期控制的问题

摘要: 有一个需求是日期选择需要加一个日期限制。 于是我兴高采烈的加上去了。 // 日期可选判断方法 disabledDateFunc = current => { const { disabledDateArray } = this.state; if (disabledDateArray) { retu 阅读全文

posted @ 2020-04-14 11:12 fox_charon 阅读(3220) 评论(0) 推荐(0)

2020年3月5日

ant design pro : 依赖项 webpack-theme-color-replacer 最新版导致项目无法启动?

摘要: 重新装了一个项目的依赖,结果发现打不开了? 报错如下: This dependency was not found: * webpack-theme-color-replacer/client in ./src/components/SettingDrawer/themeColor.js To in 阅读全文

posted @ 2020-03-05 19:42 fox_charon 阅读(3056) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页

导航