From 90f87931ef779e41cef6bf601b1d0588dec107bc Mon Sep 17 00:00:00 2001 From: M2030123 <3420575883@qq.com> Date: Tue, 5 Sep 2023 22:40:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../first_page.vue" | 2 +- .../pet_details.vue" | 7 +++++-- vite.config.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git "a/src/components/\347\224\250\346\210\267\347\225\214\351\235\242/first_page.vue" "b/src/components/\347\224\250\346\210\267\347\225\214\351\235\242/first_page.vue" index 18e263e2..00a2d1c0 100644 --- "a/src/components/\347\224\250\346\210\267\347\225\214\351\235\242/first_page.vue" +++ "b/src/components/\347\224\250\346\210\267\347\225\214\351\235\242/first_page.vue" @@ -413,7 +413,7 @@ const images = [ } .image { - width: 200px; + width: auto; height: 200px; display: block; margin-left: auto; diff --git "a/src/components/\347\224\250\346\210\267\347\225\214\351\235\242/pet_details.vue" "b/src/components/\347\224\250\346\210\267\347\225\214\351\235\242/pet_details.vue" index e0e9b572..a6abeb7c 100644 --- "a/src/components/\347\224\250\346\210\267\347\225\214\351\235\242/pet_details.vue" +++ "b/src/components/\347\224\250\346\210\267\347\225\214\351\235\242/pet_details.vue" @@ -403,11 +403,14 @@ const sortedComments = computed(() => { } .pet-image { flex: 1; + display: flex; + justify-content: center; /* 水平居中 */ + align-items: center; /* 垂直居中 */ padding: 10px; } .pet-image img { - width: 100%; - height: auto; + width: auto; + height: 300px; border-radius: 8px; } .pet-info { diff --git a/vite.config.js b/vite.config.js index b5c8829e..78977c36 100644 --- a/vite.config.js +++ b/vite.config.js @@ -17,7 +17,7 @@ export default defineConfig({ port: 3000, proxy: { "^/api": { - target: "http://localhost:6001/", + target: "http://101.42.19.77:6001/", changeOrigin: true, //rewrite: (path) => path.replace(/^\/api/, ""), },