From 6c13dc1b6517ba5f4a68e4e2d67d60698e7166aa Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Tue, 20 Oct 2026 19:01:58 +0800 Subject: [PATCH] =?UTF-8?q?chore(uniapp):=20=E6=B8=85=E7=90=86=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E6=96=87=E4=BB=B6=EF=BC=8C=E5=88=A0=E9=99=A4=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E9=85=8D=E7=BD=AE=E3=80=81Vue3=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E8=84=9A=E6=9C=AC=E4=B8=8E=E6=96=87=E6=A1=A3=E3=80=81?= =?UTF-8?q?uni-app-x=E7=A9=BA=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 26 -- .idea/.gitignore | 8 + .idea/git_toolbox_blame.xml | 6 + .idea/git_toolbox_prj.xml | 15 + .idea/vcs.xml | 6 + .vscode/launch.json | 15 - VUE3_MIGRATION.md | 73 ---- VUE3_MIGRATION_PLAN.md | 638 ---------------------------- package.json | 1 - scripts/migrate-filters-usage.js | 39 -- scripts/migrate-navbar-props.js | 51 --- scripts/migrate-uview-components.js | 37 -- scripts/migrate-vue3.js | 145 ------- 13 files changed, 35 insertions(+), 1025 deletions(-) delete mode 100644 .hbuilderx/launch.json create mode 100644 .idea/.gitignore create mode 100644 .idea/git_toolbox_blame.xml create mode 100644 .idea/git_toolbox_prj.xml create mode 100644 .idea/vcs.xml delete mode 100644 .vscode/launch.json delete mode 100644 VUE3_MIGRATION.md delete mode 100644 VUE3_MIGRATION_PLAN.md delete mode 100644 scripts/migrate-filters-usage.js delete mode 100644 scripts/migrate-navbar-props.js delete mode 100644 scripts/migrate-uview-components.js delete mode 100644 scripts/migrate-vue3.js diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json deleted file mode 100644 index 1e1eb6a..0000000 --- a/.hbuilderx/launch.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ - // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 - "version" : "0.0", - "configurations" : [ - { - "app-plus" : { - "launchtype" : "remote" - }, - "default" : { - "launchtype" : "remote" - }, - "h5" : { - "launchtype" : "remote" - }, - "mp-weixin" : { - "launchtype" : "remote" - }, - "type" : "uniCloud" - }, - { - "playground" : "standard", - "type" : "uni-app:app-android" - } - ] -} diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml new file mode 100644 index 0000000..7dc1249 --- /dev/null +++ b/.idea/git_toolbox_blame.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml new file mode 100644 index 0000000..02b915b --- /dev/null +++ b/.idea/git_toolbox_prj.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 0d22b58..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - // 使用 IntelliSense 了解相关属性。 - // 悬停以查看现有属性的描述。 - // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "pwa-chrome", - "request": "launch", - "name": "Launch Chrome against localhost", - "url": "http://localhost:8080", - "webRoot": "${workspaceFolder}" - } - ] -} \ No newline at end of file diff --git a/VUE3_MIGRATION.md b/VUE3_MIGRATION.md deleted file mode 100644 index 1d8ad48..0000000 --- a/VUE3_MIGRATION.md +++ /dev/null @@ -1,73 +0,0 @@ -# Vue 3 升级说明 - -本项目已从 Vue 2 + uView 1.6 升级到 **Vue 3 + uView Plus**。 - -## 环境要求 - -- HBuilderX 3.8+ -- Node.js 16+(用于安装 `uview-plus`、`vuex@4`、`sass`) - -## 安装依赖 - -```bash -npm install -``` - -## 主要变更 - -| 项 | 变更 | -|---|---| -| `manifest.json` | 增加 `"vueVersion": "3"` | -| `main.js` | 使用 `createSSRApp` + `export function createApp()` | -| UI 库 | `uview-ui` → `uview-plus`(npm 依赖) | -| 状态管理 | Vuex 4 `createStore` | -| 全局 filter | 改为 `main.js` 全局 mixin methods | -| 小程序分享 | `utils/mpShare.js` | -| u-cell-item | 改为 `u-cell` | -| u-verification-code | 改为 `u-code` | -| u-swipe-action | 内层增加 `u-swipe-action-item` | -| u-upload | 关闭 `auto-upload`,使用 `@afterRead` + `utils/uploadHelper.js` | -| u-parse | `:html` 改为 `:content`,移除 `show-with-animation` / `use-cache` | - -## 编译 - -请使用 HBuilderX 分别运行到 **H5**、**微信小程序**、**App** 进行验证。 - -## 回归测试清单 - -### 核心交易链路(H5 / 小程序) - -- [ ] 首页装修模块加载(轮播、商品、优惠券等) -- [ ] 分类 / 搜索 / 商品详情 -- [ ] 加购 / 购物车 / 填写订单 -- [ ] 支付(H5 微信支付、小程序支付) -- [ ] 订单列表 / 订单详情 / 物流 -- [ ] 售后申请 / 退款 / 评价 -- [ ] 个人中心 / 地址 / 优惠券 / 积分 - -### 微商城专项(H5) - -- [ ] 微信公众号内 JSSDK 分享 -- [ ] 网页授权登录(`wechatH5Login`) -- [ ] `js_sdk/lili-pay/wx-pay.js` 微信支付 -- [ ] 粘贴板分享链接跳转(`h5-copy`) -- [ ] H5 唤起 App 浮窗(`m-airbtn`) - -### 微信小程序专项 - -- [ ] 分包加载正常 -- [ ] `onShareAppMessage` 分享 -- [ ] 定位 / 相册权限 -- [ ] 海报 / 二维码(u-draw-poster、Sansnn-uQRCode) - -### App 端(后续阶段) - -- [ ] 5+ 原生模块:支付 / 分享 / OAuth / 定位 / 地图 / 指纹 -- [ ] 头像裁剪(`okingtz-cropper`) -- [ ] 启动参数 / 唤起逻辑(`App.vue` `checkArguments`) - -## 第三方插件 - -- `Sansnn-uQRCode`:声明支持 Vue3 -- `u-draw-poster`:声明支持 Vue2/3 -- `okingtz-cropper`:需在 App 端实测头像裁剪 diff --git a/VUE3_MIGRATION_PLAN.md b/VUE3_MIGRATION_PLAN.md deleted file mode 100644 index 1a7113c..0000000 --- a/VUE3_MIGRATION_PLAN.md +++ /dev/null @@ -1,638 +0,0 @@ -# Vue 3 语法改造计划 - -> 本文档用于按文件夹逐步改造业务代码。框架层(Vue 3 运行时、uView Plus、Vuex 4)已就绪,目标是让各模块语法与 Vue 3 完全兼容,并可选升级为 Composition API。 - -## 改造目标 - -| 层级 | 说明 | 是否必须 | -| --- | --- | --- | -| L1 兼容性修复 | 模板语法、uView Plus 组件、生命周期等 Vue 3 不兼容写法 | 必须 | -| L2 代码现代化 | Options API → `