diff --git a/manager/MIGRATION-VUE3.md b/manager/MIGRATION-VUE3.md new file mode 100644 index 00000000..4d127bca --- /dev/null +++ b/manager/MIGRATION-VUE3.md @@ -0,0 +1,59 @@ +# manager Vue 3 + Element Plus 迁移说明 + +## 已完成(P1–P3 骨架) + +- 依赖升级:`vue@3`、`vue-router@4`、`vuex@4`、`vue-i18n@9`、`element-plus` +- 入口:`src/main.js`(`createApp`) +- 路由、动态路由、全局 `$Message` / `$Modal` / `$Notice`、`$filters`、`priceColorScheme`、`vue-qr@5` +- TinyMCE:移除已弃用 `template` 插件 + +## P5 批量修复(Table / 过滤器) + +列表页 **60+** 已 `el-table`;过滤器已改为 `$filters.*`;全项目已无 `$set` / `$options.filters`。 + +## P6 表单 / 弹窗(已完成模块) + +| 模块 | 状态 | +|------|------| +| 地区、秒杀设置、分销设置、修改密码、编辑器、链接弹窗 | ✅ | +| 店铺详情 / 店铺编辑 `shopOperation.vue` | ✅ | +| 售后详情 `afterSaleOrderDetail.vue` | ✅ | +| **系统设置** `sys/setting-manage/**`(19 个 vue + template.js) | ✅ | +| **菜单 / 部门** `sys/menu-manage/`、`sys/department-manage/` | ✅ | +| **页面装修** `views/page-decoration/**`(PC + H5 装修、modelList、wap 模板) | ✅ | +| **文章管理** `views/page/article-manage/**` | ✅ | +| **零散页面** 礼品卡、个人中心、热区、促销编辑、视频号、错误页、短信签名等 | ✅ | + +### 系统设置包含 + +- `settingManage.vue`(Tab 壳) +- `platformSetting.vue` +- `setting/`:基础、商品、订单、积分、提现、物流、OSS、短信、客服 +- `pay/`:支付开关、支付宝、微信 +- `authLogin/`:登录、QQ、微信 +- `smsSettingManage.vue` + +`template.js` 中动态组件已 `markRaw`。 + +## 可选后续 + +- `components/tree-table`:旧 JSX 表格,当前路由未引用;`Spin` 已改 `v-loading`,`beforeUnmount` 已对齐 Vue 3 +- 样式文件中残留的 `.ivu-*` 类名可随页面改版逐步清理(不影响运行) + +## 编译告警处理(2026-05) + +- 全项目 `::v-deep` 已改为 Vue 3 推荐的 `:deep(...)` +- `common.scss` 合并 `table-common.scss`,去掉全局 `@import` 注入告警 +- `vue.config.js` 配置 `sassOptions.silenceDeprecations` 抑制 Sass legacy API 提示 +- `common.scss`:`.search > .el-card + .el-card` 恢复列表页双 Card 间距(原 `.ivu-card` 规则已失效) +- `element.scss`:全局 `el-table--border` 去掉列竖线 + +## 本地运行 + +```bash +cd manager +yarn install +yarn run dev +``` + +Node **18+**,包管理统一 **yarn**。 diff --git a/manager/babel.config.js b/manager/babel.config.js index 2ea5d05b..162a3ea9 100644 --- a/manager/babel.config.js +++ b/manager/babel.config.js @@ -1,10 +1,3 @@ module.exports = { - presets: [ - [ - '@vue/app', - { - useBuiltIns: 'entry' - } - ] - ] -} + presets: ["@vue/cli-plugin-babel/preset"], +}; diff --git a/manager/package.json b/manager/package.json index 472bab85..3e89ee27 100644 --- a/manager/package.json +++ b/manager/package.json @@ -10,51 +10,51 @@ "dev": "vue-cli-service serve" }, "engines": { - "node": ">=14" + "node": ">=16" }, "dependencies": { "@amap/amap-jsapi-loader": "0.0.7", "@antv/g2": "^4.1.12", + "@element-plus/icons-vue": "^2.3.1", "axios": "^0.21.1", - "core-js": "^3.6.5", + "core-js": "^3.36.0", "dplayer": "^1.26.0", + "element-plus": "^2.6.3", "js-cookie": "^2.2.1", + "nprogress": "^0.2.0", "price-color": "1.0.2", "sass": "^1.63.6", "sass-loader": "^10.4.1", "sockjs-client": "^1.4.0", "swiper": "^6.3.5", "uuid": "^8.3.2", - "view-design": "^4.7.0", - "vue": "^2.6.10", + "vue": "^3.4.21", "vue-awesome-swiper": "^4.1.1", - "vue-i18n": "^8.15.1", + "vue-i18n": "^9.10.2", "vue-json-excel": "^0.3.0", - "vue-print-nb": "^1.7.5", - "vue-qr": "^2.3.0", - "vue-router": "^3.1.3", - "vuedraggable": "^2.23.2", - "vuex": "^3.4.0", + "vue-qr": "^5.0.3", + "vue-router": "^4.3.0", + "vuedraggable": "^4.1.0", + "vuex": "^4.1.0", "xss": "^1.0.7" }, "devDependencies": { - "@vue/cli-plugin-babel": "^4.4.4", - "@vue/cli-plugin-router": "^4.4.4", - "@vue/cli-plugin-vuex": "^4.4.4", - "@vue/cli-service": "^4.4.4", - "compression-webpack-plugin": "^4.0.0", - "css-loader": "^5.0.1", - "less": "^3.12.2", - "less-loader": "^6.2.0", - "style-loader": "^2.0.0", - "style-resources-loader": "^1.3.2", - "uglifyjs-webpack-plugin": "^2.2.0", - "vue-cli-plugin-style-resources-loader": "^0.1.4", - "vue-template-compiler": "2.6.14" + "webpack": "^5.95.0", + "@vue/cli-plugin-babel": "^5.0.8", + "@vue/cli-plugin-router": "^5.0.8", + "@vue/cli-plugin-vuex": "^5.0.8", + "@vue/cli-service": "^5.0.8", + "@vue/compiler-sfc": "^3.4.21", + "compression-webpack-plugin": "^10.0.0", + "css-loader": "^6.10.0", + "less": "^4.2.0", + "less-loader": "^11.1.4", + "style-loader": "^3.3.4", + "style-resources-loader": "^1.5.0", + "vue-cli-plugin-style-resources-loader": "^0.1.5" }, "resolutions": { "minimatch": "^3.1.2", - "node-sass": "npm:sass@^1.63.6", "@achrinza/node-ipc": "9.2.2" } } diff --git a/manager/public/index.html b/manager/public/index.html index 8841b671..671140da 100644 --- a/manager/public/index.html +++ b/manager/public/index.html @@ -5,7 +5,8 @@ - + +