An0313

An0313的笔记

  • 首页
  • 标签
  • 归档
  • 我的npm包
  • 搜索

vite打包兼容低版本

发表于 2024-01-26 | 更新于: 2024-01-26
1234yarn add @vitejs/plugin-legacy -D// 或yarn add terser --dev 1234567891011121314import legacy from '@vitejs/plugin-legacy'export default ...
阅读全文 »

js兼容低版本globalThis

发表于 2024-01-26 | 更新于: 2024-01-26
1234567891011121314<script> if (typeof globalThis === 'undefined') { if (typeof window !== 'undefined') { ...
阅读全文 »

React在TS中声明函数组件的方式与区别

发表于 2024-01-03 | 更新于: 2024-01-03
方式一1const Component: React.FC<ComponentProps> = (props) => {} 使用React.FC的好处是类型定义更为明确,可以清楚地看出这是一个React函数组件。此外,React.FC还自动为props添加了ch ...
阅读全文 »

vite 清除缓存

发表于 2023-11-20 | 更新于: 2023-11-20
清除办法 --force 选项,来重新构建依赖项; 手动删除 node_modules/.vite 缓存目录 文件系统缓存Vite 将预构建的依赖项缓存到 node_modules/.vite 中。它会基于以下几个来源来决定是否需要重新运行预构建步骤: 包管理器的锁文件内容,例如 packag ...
阅读全文 »

RN项目中遇到的问题.md

发表于 2023-08-28 | 更新于: 2023-12-15
圆角在 ios 设备 Text 中不生效 Text 自带边距 安卓transform skewX 属性不生效 安卓通过measure measureInWindowapi获取不到坐标与元素尺寸,ios可以正常返回,安卓需要给要获取的元素添加 collapsable={false} ...
阅读全文 »

查看某分支的创建commit节点

发表于 2023-08-09 | 更新于: 2023-08-09
123git show-branch <branch-name>// 或git reflog show <branch-name>
阅读全文 »

node 获取命令行参数

发表于 2023-07-11 | 更新于: 2023-07-11
1node index.js --name=abc 1234567891011121314const getArguments = () => { const {length} = process.argv const args = {} ...
阅读全文 »

git 代理

发表于 2023-07-10 | 更新于: 2023-07-10
配置 打开翻墙软件,查看 http 代理服务器。例如 Shadowsocks.app为:127.0.0.1:1087 设置 git 全局代理:git config --global http.proxy SOCKS://127.0.0.1:1087 还原123456# 方式一git config ...
阅读全文 »

homebrew切换源

发表于 2023-07-05 | 更新于: 2023-07-05
清华 12export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"brew update
阅读全文 »

处理 windows 系统 yarn 提示 无法加载文件 D:\nodejs\yarn.ps1,因为在此系统上禁止运行脚本

发表于 2023-06-06 | 更新于: 2023-06-30
错误提示123yarn : 无法加载文件 D:\nodejs\yarn.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_ Execution_Policies。所在位置 行:1 字 ...
阅读全文 »
12…7下一页

64 日志
22 标签
Links
  • 我的导航
  • 我的npm包
© 2018 — 2024 An0313
由 Hexo 强力驱动
|
主题 — NexT.Mist v5.1.4