- 博客(5)
- 收藏
- 关注
原创 节流,防抖
防抖:将多次触发变成只执行最后一次 <input type="text"> <input type="submit" id="input"> <script> let btn = document.getElementById('input') btn.addEventListener('click', debounce(submit), false) function submit(e) {
2022-05-17 15:19:50
68
原创 无法使用 JSX,除非提供了 “--jsx“ 标志。ts(17004)
使用的版本和拥有的版本不一致解决:npm install -g typescript
2021-10-31 18:19:22
2001
原创 无法找到模块“react/jsx-runtime”的声明文件。“d:/工作/学习文件夹/create/node_modules/react/jsx-runtime.js”隐式拥有 “any“ 类型。
npm install -D @types/库的名字
2021-10-31 18:16:57
4236
原创 git命令
git config --global user.name 用户名 设置用户签名git config --global user.email 邮箱设置用户签名本地:git add 文件名 添加到暂存区git commit -m 备注 文件名 提交到本地库git push 提交到远程库git starus 查看本地库状态git init 初始化本地库git reflog 查看历史记录git reset --hard 版本号 版本穿梭git rm --cached 文件名 删除暂存区的文.
2021-10-26 15:15:43
94
1
原创 typescript
类型:简单数据类型:number,string,Boolean, 字面量(相当于常量),any(任意类型),unknown(未知类型),void(空,相当于undefined),never(不能是任何值)复杂数据类型:object :(let b: {name:string})指定对象可以包含的属性,加?表可选属性,加 ([] : 类型) 表示可以添加任意属性function:let d:(a:number, b : numder)=>numder 指定函数的形参和返回值的类型和.
2021-10-09 10:13:37
79
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人