1 2 3 4 5 ··· 23 下一页
摘要: 如图: 原因:项目内存在多个 dayjs 版本 查看所有版本: npm ls dayjs 解决方法: 把dayjs升级为同一版本 把依赖删除 重装 yarn 阅读全文
posted @ 2025-09-17 11:07 huihui2014 阅读(17) 评论(0) 推荐(0)
摘要: useLocation, matchRoutes, useAppData或直接使用 useSelectedRoutes import { useLocation, matchRoutes, useAppData } from 'umi' const location = useLocation(); 阅读全文
posted @ 2025-08-25 10:50 huihui2014 阅读(45) 评论(0) 推荐(0)
摘要: Trae主题设置成vscode默认主题 ① 打开vscode安装目录Microsoft VS Code\resources\app\extensions\把theme-defaults整个目录复制到Trae\resources\app\extensions\下面(原来的先改个名字备份一下) ② 打开Trae\resources\app\e 阅读全文
posted @ 2025-08-04 08:52 huihui2014 阅读(177) 评论(0) 推荐(0)
摘要: 首先是用到AccountInfo这个对象,通过接口获取,如下 const accountInfo = wx.getAccountInfoSync() 它有这个属性envVersion var envVersion = accountInfo.miniProgram.envVersion 其值可能是以 阅读全文
posted @ 2025-07-21 10:02 huihui2014 阅读(203) 评论(0) 推荐(0)
摘要: 我正在尝试加载基于 react-router-dom 路由的详细信息视图,该路由应该获取 URL 参数(id)并使用它来进一步填充组件。 我的路线看起来像 /task/:id 并且我的组件加载正常,直到我尝试从 URL 中获取 :id ,如下所示: import React from "react" 阅读全文
posted @ 2024-10-21 11:28 huihui2014 阅读(96) 评论(0) 推荐(0)
摘要: 依次按图点击,在搜索框输入Compact Folders 将Compact Folders勾选去掉即可 文章来源 :https://blog.csdn.net/qq_40955816/article/details/120694465 阅读全文
posted @ 2024-07-11 16:15 huihui2014 阅读(651) 评论(0) 推荐(0)
摘要: import React, { PureComponent } from "react"; import ReactEcharts from 'echarts-for-react'; import { useEventListener } from 'ahooks'; useEventListene 阅读全文
posted @ 2024-03-25 17:08 huihui2014 阅读(496) 评论(0) 推荐(0)
摘要: 最近在用IAR开发项目,因为在我接手之前,代码已经相对完备,我只需要进行一些参数的调整即可,不免要大量用到全局搜索来定位代码 VScode因为兼容的文件类型比较多,在全局搜索上能够看到所有文件,这点就让人很头大,比方说IAR编译生成的.map类型文件和项目的.pbw文件,经常就包含一堆我要搜索的结果 阅读全文
posted @ 2023-09-04 14:56 huihui2014 阅读(1805) 评论(0) 推荐(0)
摘要: 1、scrollIntoView scrollIntoView 方法可以让当前的元素滚动到浏览器窗口的可视区域内。它的使用方法如下: var element = document.getElementById("box"); element.scrollIntoView(); 这个 api 兼容 I 阅读全文
posted @ 2022-10-12 10:48 huihui2014 阅读(769) 评论(0) 推荐(0)
摘要: 由于html每个字符的组成是任意的,要找到img元素的位置只需直接匹配到img的标签<img, /<img/ 同时img标签里可以有多个属性,src属性出现位置也是不固定的,所以得用非贪婪模式*?(向后最近匹配)来匹配到src的位置上,中间的字符用.(匹配除换行符的任意字符)来匹配 /<img.*? 阅读全文
posted @ 2022-08-26 17:19 huihui2014 阅读(1359) 评论(0) 推荐(0)
摘要: 设置 a 标签的 download属性,可以重置 文件名。如下代码,文件名重置为 file.xlsx。 <a href='http://192.168.1.1/abcd.xlsx' download='file.xlsx'>下载</a> 封装一个download方法 const downlad = 阅读全文
posted @ 2022-08-26 17:06 huihui2014 阅读(7747) 评论(0) 推荐(1)
摘要: 今天将项目修改了一部分,然后用 git push origin master 向远程仓库推送的时候报如下错误: error: failed to push some refs to 'https://github.com/ZJyoung1997/JZShop.git' hint: Updates w 阅读全文
posted @ 2021-11-05 10:23 huihui2014 阅读(4847) 评论(0) 推荐(0)
摘要: 今天在安装@types/react-router-dom时突然报错源文本中存在无法识别的标记,最开始还可以直接安装呢,突然就不行了。后来从网上搜了下解决办法。 解决办法:有@符号的依赖包,需给依赖包加上单引号或者双引号。 npm install --save react-router-dom '@t 阅读全文
posted @ 2021-08-24 10:35 huihui2014 阅读(632) 评论(0) 推荐(0)
摘要: 给第三方依赖 xxx 增加类型声明的步骤 1、根目录下新建types文件夹 2、在tsconfigm.json文件的include中引入,如下图 3、在types文件中创建依赖的类型文件xxx.d.ts,文件内容如下 declare module 'xxx' { const content: any 阅读全文
posted @ 2021-08-24 10:05 huihui2014 阅读(272) 评论(0) 推荐(0)
摘要: 在使用yarn install安装的时候,提示 The engine “node” is incompatible with this module 解决办法:运行命令 yarn config set ignore-engines true 即可解决 原文链接,亲测有效 https://www.cn 阅读全文
posted @ 2021-08-07 18:10 huihui2014 阅读(236) 评论(0) 推荐(0)
1 2 3 4 5 ··· 23 下一页