From 7204fcd9b48ddcc8d8016fc133e6c46f3ada1692 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 24 Jan 2024 18:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/areaList.vue | 2 +- src/view/index/components/leftItme1.vue | 7 ++++++- vite.config.js | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/areaList.vue b/src/components/areaList.vue index 9af013f..0b678a2 100644 --- a/src/components/areaList.vue +++ b/src/components/areaList.vue @@ -81,7 +81,7 @@ const show = () => { } mitt.on("choseTown", (data) => { - console.log(data, ...props.list); + // console.log(data, ...props.list); let town = props.list.find((item) => item.name == data.name); if (town && town.code) { choseTownFn(town) diff --git a/src/view/index/components/leftItme1.vue b/src/view/index/components/leftItme1.vue index b9185a9..c7ef4de 100644 --- a/src/view/index/components/leftItme1.vue +++ b/src/view/index/components/leftItme1.vue @@ -78,7 +78,8 @@ const cell = reactive([ } ]) const initCell = () => { - let all = pendingOrderCount.value + undeliveredOrderCount.value + doneOrderCountQuery.value; + // console.log(pendingOrderCount.value , undeliveredOrderCount.value , doneOrderCountQuery.value); + let all = (pendingOrderCount.value + undeliveredOrderCount.value + doneOrderCountQuery.value) || 1; cell[0].value = (pendingOrderCount.value / all * 100).toFixed(0); cell[0].label = (pendingOrderCount.value / all * 100).toFixed(2) + '%'; cell[0].count = pendingOrderCount.value; @@ -95,6 +96,10 @@ const openList = () => { mitt.emit('showBusinesses') } +mitt.on("more_order_index", (data)=>{ + openList() +}) + const orderCount = ref(0); const pendingOrderCount = ref(0); const undeliveredOrderCount = ref(0); diff --git a/vite.config.js b/vite.config.js index 2e3d686..f024a71 100644 --- a/vite.config.js +++ b/vite.config.js @@ -5,8 +5,9 @@ import path from 'path'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], - server: { - host: '0.0.0.0' + server: { // ← ← ← ← ← ← + host: '0.0.0.0' ,// ← 新增内容 ← + port:"8787" }, optimizeDeps: { // 开发时 解决这些commonjs包转成esm包