【山竹记账前端-react-vue】1.对齐两版前端功能
vue 1~16 react 1~24
大纲链接 §
[toc]
1. 从依赖功能开始对比 ⇧
主要依赖对齐 ⇧
package.json
version: 0.0.2- 构建依赖对比
- 相同依赖:
cn@0.5.2echarts@6.1.0- 需要补齐
axios@1.21.1vh-check@2.0.5处理移动端工具栏遮挡
- 主要框架:
vue@3.5.45v.s.react@19.3.1、react-dom@19.3.1、react-compiler-runtime@1.0.0- 路由框架:
vue-router@5.5.1v.s.react-router-dom@7.18.5- 状态管理框架:
pinia@4.1.0v.s.zustand@5.1.0- 钩子、工具框架:
@vueuse/core@15.0.0v.s.@reactuses/core@6.6.1、ahooks@3.11.0- 发布、订阅工具库
@vueuse/core的useEventBusv.s.nanoevents@10.0.0二次封装
- UI框架:
- vue 专用
vant@4.10.2 - react 专用
sweetalert2@11.26.25、sweetalert2-react-content@5.1.2二次封装 - 专用请求库
- 暂无 v.s.
swr@2.5.1 - 样式组件库
styled-components@6.6.0react 专用 - 动画库
- 暂无 v.s.
@react-spring/web@10.1.2
- 开发依赖对比
- 相同依赖:
- 作用域样式:
@10coding/vite-plugin-jsx-scoped@0.6.0 - 样式预编译:
sass-embedded@1.108.2 - 原子化样式:
unocss@66.13.0@unocss/eslint-plugin@66.13.0@unocss/preset-attributify@66.13.0@unocss/preset-wind4@66.13.0@unocss/vite@66.13.0
vite@8.3.8与插件- 网络
http2证书模拟@vitejs/plugin-basic-ssl@2.3.0、vite-plugin-mkcert@2.1.0- 模拟请求
vite-plugin-mock-dev-server@2.7.1
- 模拟伪造测试数据
@faker-js/faker@10.6.0 - 图标插件
vite-plugin-svg-icons-ng@1.10.0 - 浏览器控制台打印自定义标记文字
vite-plugin-console-banner@0.1.4 - vue 专用
@vitejs/plugin-vue@6.0.11@vitejs/plugin-vue-jsx@5.1.6- 浏览器调试工具
vite-plugin-vue-devtools@8.2.1
- react 专用
@vitejs/plugin-react@6.3.0
- 格式化工具:
@antfu/eslint-config@10.0.0、eslint@10.15.0、oxfmt@0.79.0、oxlint@1.94.0、oxlint-tsgolint@7.0.2007vue专用@vue/eslint-config-typescript@14.9.0eslint-plugin-vue@10.12.1vue-eslint-parser@10.4.2
react专用@typescript-eslint/eslint-plugin@8.73.0、@typescript-eslint/parser@8.73.0eslint-plugin-react-hooks@7.1.1、eslint-plugin-react-refresh@0.5.8
- TS版本:
vue专用typescript@npm:typescript-native-bridge@6.0.3-bridge.18.tsgo.7.0.2react专用typescript@7.0.2- 单元测试
vitest@5.1.0 @vue/test-utils@2.6.0- 状态管理浏览器调试工具
- react 专用
zustand-devtools-bridge - 其他:
- 图标相关:
svgo@4.1.0、svgstore@3.0.1 - 编译器
- vue 专用
vue-tsc@3.3.14 - react 专用
@babel/core@8.1.2、@rolldown/plugin-babel@0.3.1、babel-plugin-react-compiler@1.0.0
- vue 专用
功能对齐 ⇧
axios封装http2证书模拟- 请求模拟服务、伪造测试数据
@/global.d.ts全局类型对齐svg图标自定义插件- 部分
uno样式,动画配置 echarts二次封装组件- 表单类型封装组件、验证逻辑
- PC 屏幕宽时外层套壳模拟手机样式
2. 从路由页面开始对比 ⇧
3. $3 ⇧
4. $3 ⇧
5. $3 ⇧
6. $3 ⇧
·未完待续·
参考文章
- 无
相关文章
- 无
- 作者: Joel
- 文章链接:
- 版权声明
- 非自由转载-非商用-非衍生-保持署名