会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
leahtao的前端积累
人生不能太过圆满,求而不得未必是遗憾
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
28
下一页
2021年11月29日
react-router v6 嵌套路由中子路由页面不渲染问题
摘要: BasicLayout是我的父组件,menu.js 配置了所有的子组件路由 如下 父组件路由配置 1 export default [ 2 { 3 path: '/nomatch/:type', 4 component: NoMatch, 5 }, 6 { 7 path: '', 8 compone
阅读全文
posted @ 2021-11-29 11:56 leahtao
阅读(3504)
评论(0)
推荐(0)
2021年11月23日
'Switch' is not exported from 'react-router-dom'
摘要: https://stackoverflow.com/questions/63124161/attempted-import-error-switch-is-not-exported-from-react-router-dom Switch 由 Routes 代替
阅读全文
posted @ 2021-11-23 17:45 leahtao
阅读(759)
评论(0)
推荐(0)
'Redirect' is not exported from 'react-router-dom'
摘要: https://stackoverflow.com/questions/63690695/react-redirect-is-not-exported-from-react-router-dom/66985282 react-router-dom 6版本移除了 Redirect,用 Navigati
阅读全文
posted @ 2021-11-23 17:44 leahtao
阅读(1045)
评论(0)
推荐(0)
2021年11月11日
Fix the upstream dependency conflict, or retry 41 error this command with --force, or --legacy-peer-deps
摘要: https://stackoverflow.com/questions/64936044/fix-the-upstream-dependency-conflict-installing-npm-packages
阅读全文
posted @ 2021-11-11 17:20 leahtao
阅读(1201)
评论(0)
推荐(0)
2021年3月16日
yarn start 启动项目报错 Command failed. Exit code: 127 Command: node build.js || nodejs build.js
摘要: error /Users/admin/Desktop/workspace/xxxxx/xx/xxxx/task-platform1/node_modules/fibers: Command failed.Exit code: 127Command: node build.js || nodejs b
阅读全文
posted @ 2021-03-16 11:29 leahtao
阅读(7614)
评论(0)
推荐(0)
2021年1月26日
日期格式与标准时间之间互转
摘要: 转时间格式 moment().format("YYYY-MM-DD") // 2020-01-26 再转标准时间 new Date('2021-01-26') // Fri Jun 05 2020 09:17:00 GMT+0800 (中国标准时间)
阅读全文
posted @ 2021-01-26 21:18 leahtao
阅读(156)
评论(0)
推荐(0)
2021年1月19日
git rebse 操作失误回退到上一步
摘要: git rebase 误操作导致文件丢失撤销并恢复文件 第一步 执行 git reflog查看本地操作记录 找到本次rebase之前的操作id 例如:89356d0 第二步 执行恢复命令 git reset --hard 89356d0 出现提示则输入y确认
阅读全文
posted @ 2021-01-19 15:08 leahtao
阅读(768)
评论(0)
推荐(0)
2021年1月3日
js判断数组中某个值是否存在
摘要: 1.indexOf() -> ES5:返回索引,大于0则存在,-1不存在 const array = ['apple', 'banance', 'orange'] array.indexOf('apple') // 0 存在 array.indexOf('strawBerry') // -1不存在
阅读全文
posted @ 2021-01-03 17:09 leahtao
阅读(1526)
评论(0)
推荐(0)
2020年12月30日
git 不区分文件名大小写 解决办法
摘要: 本地修改了文件名大小写后,发现并没有更新到git上,git上依旧是之前的小写。原因是git 默认不区分大小写。 解决方法:在当前项目目录下运行:git config core.ignorecase false 关闭默认。 修改完成后,当你修改文件名大小写时,Git 就会提示有提交信息了。 提交上去之
阅读全文
posted @ 2020-12-30 19:47 leahtao
阅读(1074)
评论(0)
推荐(0)
2020年12月29日
React + antd 实现动态表单添加删除功能
摘要: 类似下面这种功能: 点击添加表增加一行,删除表删除一行, 思路:将这个表单抽成一个单独的组件,维护一个时间戳数组,这个数组的作用就是通过map循环来生成动态表单,每次点击添加就在数组里添加一个时间戳。最终遍历有几个item就渲染几个表单。 实现: dynamic.js 动态表单 子组件 import
阅读全文
posted @ 2020-12-29 14:24 leahtao
阅读(4005)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
28
下一页
公告