![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react
菜鸟小佳
小菜佳
展开
-
You may need an additional loader to handle the result of these loaders,React
webpack 无法识别react原创 2023-03-06 15:18:55 · 1368 阅读 · 1 评论 -
删除数据的时候删不掉
map遍历时注意key原创 2022-11-02 15:24:02 · 86 阅读 · 0 评论 -
you need to install the latest version of Visual Studio
you need to install the latest version of Visual Studio原创 2022-08-30 17:08:49 · 8802 阅读 · 0 评论 -
python is not set from command line or npm configuration
python is not set from command line or npm configuration原创 2022-08-29 15:52:05 · 5751 阅读 · 0 评论 -
Jest 测不到 uuid
jest测uuid原创 2022-05-05 15:42:04 · 325 阅读 · 0 评论 -
用jest测试React.createContext
jest 测试 React.Context原创 2022-04-20 13:50:48 · 725 阅读 · 0 评论 -
实现点击按钮A,隐藏或显示弹出表格A,点击空白区域,隐藏A
/** hidden other link box (on top right of topNavBar) */ private hiddenBox(e: MouseEvent) { const target = e.target as Node; const gearIcon = document.getElementById("tes-topNavBar-gear"); const {showBox} = this.state; if (gearIcon?.c...原创 2021-08-13 14:09:31 · 575 阅读 · 0 评论 -
kendo-react UI库踩坑(treeview组件)
使用Help-function时需要注意,当你完全采用Kendo UI库推荐的方法时,会遇到一个问题下面是完全按照Kendo推荐的方法写的当用户选择1A 和1D打印check你会看到ids中包含选中项序列号,而非1A,1D如果这个列表的内容一直固定,则没有问题,因为你的序列号和内容始终对应, 如“0_0” 对应1A但是当列表内容是动态的,则不能这么做,因为序列号和内容不一定匹配比如,当列表是动态的,这个时候选择第四项,然后页面内容是这样的打印check如下i.原创 2020-12-16 10:14:23 · 616 阅读 · 0 评论 -
ts+react画canvas饼状图
最终效果如下:没有动态效果,如果你想有动态效果,可以参考这个大佬的文章, 或者这个大佬的github下面是代码在组件a的render 方法中 <canvas width={height * 2} height={height} id="tes-dashbaords-pieChart-blockingAlarms"></canvas>然后 在组件a的componentDidMount方法中//在组件a的componentDidMount方法中执行下面这.原创 2020-08-18 17:37:21 · 813 阅读 · 0 评论 -
ts+react 单元测试 测react-route
组件如下import {Link, Route, Switch, Redirect, withRouter, RouteComponentProps} from "react-router-dom";/** path of router */export interface IRoutePath { a: string; b: string; c: string; d: string; e: string; f: string;} //在组件的Prop接口中加 ex原创 2020-07-01 10:57:48 · 487 阅读 · 0 评论 -
ts+react路由react-router-dom
记录自己项目中写的内容路由入口是一个组件, 路由出口用Switch包着,大概如下 <TopNavigationBarWithRoute routePath={this.state.routePath} /> <Switch>{this.renderAllRoutes()}</Switch>//我们看一下 this.state.routePath const routePath: IR原创 2020-07-01 10:40:13 · 5048 阅读 · 2 评论 -
react+ts实现点击按钮下载图片,兼容IE
(适用于react+ts)第一种```<FontAwesomeIconicon={faDownload}onClick={() => this.downloadCurrentImage()}className="ImageFrame-downloadIcon"/>private downloadCurrentImage() { const image = new Image(); image.crossOrigin = "anonymous"; im...转载 2020-06-09 12:08:17 · 2845 阅读 · 0 评论