From 81095f57a1567b7511247bffec3606f40eaf0077 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 6 Apr 2024 10:21:06 +0800 Subject: [PATCH] 1 --- package-lock.json | 6 ++ package.json | 1 + src/layout/index.vue | 4 - src/router/index.js | 4 +- src/utils/axios.js | 8 +- src/views/home/index.vue | 2 +- src/views/order/component/order.vue | 144 ++++++++++++---------------- src/views/order/indexList.vue | 1 - src/vite-env.d.ts | 2 + tsconfig.json | 2 + vite.config.ts | 1 + 11 files changed, 82 insertions(+), 93 deletions(-) diff --git a/package-lock.json b/package-lock.json index 236db18..6ae3644 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@element-plus/icons-vue": "^2.3.1", "axios": "^1.6.8", "element-plus": "^2.6.3", + "mitt": "^3.0.1", "pinia": "^2.1.7", "sass": "^1.72.0", "vue": "^3.4.21", @@ -1308,6 +1309,11 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" + }, "node_modules/muggle-string": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", diff --git a/package.json b/package.json index 120e1db..7c40b8c 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@element-plus/icons-vue": "^2.3.1", "axios": "^1.6.8", "element-plus": "^2.6.3", + "mitt": "^3.0.1", "pinia": "^2.1.7", "sass": "^1.72.0", "vue": "^3.4.21", diff --git a/src/layout/index.vue b/src/layout/index.vue index 8ebbb8e..7f2b3b9 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,10 +1,6 @@ @@ -51,95 +98,30 @@ const keyword = ref('') .header-input{ padding: 1rem; padding-top: 0; - padding-bottom: 2rem; - height: 1.5rem; + height: 2.5rem; border-bottom: 1px solid #eee; } .order-list { - height: calc(100vh - 100px - 14rem); + height: calc(100vh - 100px - 8.2rem); overflow-y: auto; - .order-item { - display: flex; + .item{ padding: 1rem; - border-bottom: 1px solid #eee; - - .order-item-img { - width: 5rem; - height: 5rem; - border-radius: 0.5rem; - } - .order-item-info { - flex: 1; - box-sizing: border-box; - padding-left: 12px; + .top{ display: flex; - flex-direction: column; justify-content: space-between; - & > div { - display: flex; - align-items: center; - justify-content: space-between; - } - .order-item-title { - .title { - width: 18rem; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .delete { - color: #1890ff; - cursor: pointer; + align-items: flex-end; + .sn{ + font-weight: bold; + font-size: 0.9rem; + &::before{ + } } - .order-item-sku { - cursor: pointer; + .create-time{ font-size: 0.8rem; - color: #999; } } } } - .order-footer { - position: absolute; - bottom: 0; - left: 0; - width: 100%; - box-shadow: 0 -1px 10px #eee; - - .order-total { - height: 2.5rem; - padding: 1rem 2rem; - display: flex; - justify-content: space-between; - border-bottom: 1px solid #eee; - align-items: center; - .price { - display: flex; - align-items: center; - .total-item { - padding-right: 1.5rem; - span { - color: #f5222d; - } - } - } - .update-price { - .btn { - border-radius: 3rem; - } - } - } - .order-btn { - height: 3.2rem; - padding: 1rem 1.5rem; - .btn { - width: 100%; - height: 100%; - font-size: 1.2rem; - border-radius: 3rem; - } - } - } } diff --git a/src/views/order/indexList.vue b/src/views/order/indexList.vue index f714567..6f9e21b 100644 --- a/src/views/order/indexList.vue +++ b/src/views/order/indexList.vue @@ -2,7 +2,6 @@ import { ref } from "vue"; import { orderListApi, - groupOrderListApi, orderStatusApi, orderLadingApi, cartListApi diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 11f02fe..bd01096 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -1 +1,3 @@ /// +declare module 'element-plus/dist/locale/zh-cn.mjs' +declare module './router' \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 9e03e60..0db6bf2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,8 @@ "noEmit": true, "jsx": "preserve", + "allowJs": true, + /* Linting */ "strict": true, "noUnusedLocals": true, diff --git a/vite.config.ts b/vite.config.ts index 9732daa..3611be8 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,6 +4,7 @@ import vue from '@vitejs/plugin-vue' // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], + base: './', server: { port: '5175', host: '0.0.0.0',