From 433c04463bf78ea1f00ceb197511bfe50cdb67a0 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Mon, 23 Dec 2024 13:52:38 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=AD=89=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components.d.ts | 3 +-
package-lock.json | 12 +
package.json | 1 +
postcss.config.js | 18 +
src/App.vue | 5 +-
src/components/Breadcrumb/index.vue | 6 +
src/components/FooterInfo/index.vue | 76 ++--
src/components/Navmenu/index.vue | 19 +-
src/components/TitleTip/index.vue | 2 +-
src/components/equipCardHall/index.vue | 17 +-
src/components/header/index.vue | 2 +-
src/layout/header.vue | 90 ++--
src/style/css/reset.css | 4 +-
src/views/AppMain-old.vue | 47 +++
src/views/AppMain.vue | 27 +-
src/views/cart/index.vue | 561 +++++++++++++------------
src/views/demand-details/index.vue | 29 +-
src/views/equip/detail.vue | 28 +-
src/views/equip/list.vue | 9 +-
src/views/home/index.vue | 51 ++-
src/views/order/index.vue | 413 +++++++++---------
src/views/parity/index.vue | 10 +-
22 files changed, 775 insertions(+), 655 deletions(-)
create mode 100644 postcss.config.js
create mode 100644 src/views/AppMain-old.vue
diff --git a/components.d.ts b/components.d.ts
index 8a1ab83..da40ba6 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -13,6 +13,7 @@ declare module 'vue' {
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']
+ ElCard: typeof import('element-plus/es')['ElCard']
ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElCascader: typeof import('element-plus/es')['ElCascader']
@@ -27,7 +28,6 @@ declare module 'vue' {
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
- ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
@@ -35,7 +35,6 @@ declare module 'vue' {
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
- ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElProgress: typeof import('element-plus/es')['ElProgress']
diff --git a/package-lock.json b/package-lock.json
index f456675..f3cfd16 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -42,6 +42,7 @@
"@vitejs/plugin-vue-jsx": "^3.0.2",
"@vue/tsconfig": "^0.4.0",
"npm-run-all2": "^6.1.1",
+ "postcss-px-to-viewport": "^1.1.1",
"sass": "^1.32.13",
"typescript": "~5.2.0",
"unplugin-auto-import": "^0.17.1",
@@ -3917,6 +3918,17 @@
"node": "^10 || ^12 || >=14"
}
},
+ "node_modules/postcss-px-to-viewport": {
+ "version": "1.1.1",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/postcss-px-to-viewport/-/postcss-px-to-viewport-1.1.1.tgz",
+ "integrity": "sha512-2x9oGnBms+e0cYtBJOZdlwrFg/mLR4P1g2IFu7jYKvnqnH/HLhoKyareW2Q/x4sg0BgklHlP1qeWo2oCyPm8FQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": ">=4.0.1",
+ "postcss": ">=5.0.2"
+ }
+ },
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://repo.huaweicloud.com/repository/npm/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
diff --git a/package.json b/package.json
index dfbf9f9..6ee0cc2 100644
--- a/package.json
+++ b/package.json
@@ -48,6 +48,7 @@
"@vitejs/plugin-vue-jsx": "^3.0.2",
"@vue/tsconfig": "^0.4.0",
"npm-run-all2": "^6.1.1",
+ "postcss-px-to-viewport": "^1.1.1",
"sass": "^1.32.13",
"typescript": "~5.2.0",
"unplugin-auto-import": "^0.17.1",
diff --git a/postcss.config.js b/postcss.config.js
new file mode 100644
index 0000000..b9658e9
--- /dev/null
+++ b/postcss.config.js
@@ -0,0 +1,18 @@
+module.exports = {
+ plugins: {
+ 'postcss-px-to-viewport': {
+ viewportWidth: 1920, // 设计稿的视口宽度
+ viewportHeight: 1080, // 设计稿的视口宽度
+ viewportUnit: 'vw', // 希望使用的视口单位
+ fontViewportUnit: 'vw', // 字体使用的视口单位
+ unitPrecision: 5,
+ propList: ['*'],
+ selectorBlackList: ['.ignore'], // 需要忽略的CSS选择器
+ minPixelValue: 1, // 小于或等于`1px`不转换为视口单位
+ mediaQuery: false, // 允许在媒体查询中转换`px`
+ selectorBlackList: [':root', 'el-'], // 排除 Element Plus 的类名
+ // replace: true,
+ exclude: [/node_modules\/element-plus/], // 排除 Element Plus 的样式文件
+ },
+ },
+}
diff --git a/src/App.vue b/src/App.vue
index 17c5227..3b0b65d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,5 +1,4 @@
-