From 2f7c60856b87a73c89499be60ff265cafa65d162 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Tue, 3 Jun 2025 13:07:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=BF=E6=8D=A2=20wot-design-uni?= =?UTF-8?q?=20=E4=B8=BA=20sard-uniapp=20=E7=BB=84=E4=BB=B6=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 vite 配置以优化 sard-uniapp 的依赖处理 - 修改全局样式导入和组件引用路径 - 移除 wot-design-uni 相关配置和依赖 - 更新 tsconfig 和页面配置中的类型定义 - 调整布局组件中的配置提供逻辑 --- package.json | 2 +- pages.config.ts | 2 +- pnpm-lock.yaml | 28 +++++++++++++------------ src/App.vue | 1 + src/components/privacy-popup/index.scss | 3 +-- src/layouts/default.vue | 17 +++------------ src/layouts/demo.vue | 16 +++----------- src/pages.json | 5 ++--- src/pages/about/about.vue | 4 ++-- src/pages/mine/index.vue | 8 +++---- tsconfig.json | 2 +- vite.config.ts | 3 +++ 12 files changed, 36 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index f539ee4..a48e86c 100644 --- a/package.json +++ b/package.json @@ -106,8 +106,8 @@ "pinia": "2.0.36", "pinia-plugin-persistedstate": "3.2.1", "qs": "6.5.3", + "sard-uniapp": "^1.17.1", "vue": "^3.5.15", - "wot-design-uni": "^1.9.1", "z-paging": "^2.8.4" }, "devDependencies": { diff --git a/pages.config.ts b/pages.config.ts index 547d0da..630b032 100644 --- a/pages.config.ts +++ b/pages.config.ts @@ -12,7 +12,7 @@ export default defineUniPages({ autoscan: true, custom: { '^fg-(.*)': '@/components/fg-$1/fg-$1.vue', - '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue', + '^sar-(.*)': 'sard-uniapp/components/$1/$1.vue', '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)': 'z-paging/components/z-paging$1/z-paging$1.vue', }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99811ab..d20c0dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -80,12 +80,12 @@ importers: qs: specifier: 6.5.3 version: 6.5.3 + sard-uniapp: + specifier: ^1.17.1 + version: 1.17.1(@dcloudio/types@3.4.14)(vue@3.5.15(typescript@5.7.2)) vue: specifier: ^3.5.15 version: 3.5.15(typescript@5.7.2) - wot-design-uni: - specifier: ^1.9.1 - version: 1.9.1(vue@3.5.15(typescript@5.7.2)) z-paging: specifier: ^2.8.4 version: 2.8.4 @@ -4641,6 +4641,13 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + sard-uniapp@1.17.1: + resolution: {integrity: sha512-XbBM0hQ777nmV+PjRlmjpH6ZihUhSTDXlDZju2QOLrXmwn5uVICw4YcOgAo6qzKp7nDtmM6pTSmQIUlILdn3pg==} + engines: {HBuilderX: ^3.6.0} + peerDependencies: + '@dcloudio/types': ^3.4.8 + vue: ^3.3.13 + sass@1.77.8: resolution: {integrity: sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==} engines: {node: '>=14.0.0'} @@ -5229,12 +5236,6 @@ packages: engines: {node: '>= 8'} hasBin: true - wot-design-uni@1.9.1: - resolution: {integrity: sha512-bZBt6xt5HfvmHBm76BZWBrvthHKeK7cbR//bbmv2ICjPRLXvD9KKHGZDZrq6C/j+DXHzA4UbcGer3iE8XcuVkw==} - engines: {HBuilderX: ^3.8.7} - peerDependencies: - vue: '>=3.2.47' - wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -11083,6 +11084,11 @@ snapshots: safer-buffer@2.1.2: {} + sard-uniapp@1.17.1(@dcloudio/types@3.4.14)(vue@3.5.15(typescript@5.7.2)): + dependencies: + '@dcloudio/types': 3.4.14 + vue: 3.5.15(typescript@5.7.2) + sass@1.77.8: dependencies: chokidar: 3.6.0 @@ -11709,10 +11715,6 @@ snapshots: dependencies: isexe: 2.0.0 - wot-design-uni@1.9.1(vue@3.5.15(typescript@5.7.2)): - dependencies: - vue: 3.5.15(typescript@5.7.2) - wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 diff --git a/src/App.vue b/src/App.vue index d32c900..c88839f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,6 +14,7 @@ onHide(() => {